Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
27b20c1d
Commit
27b20c1d
authored
Nov 19, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makefiles: Don't add a default crt lib for msvcrt dlls.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
32eae492
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
19 deletions
+31
-19
makedep.c
tools/makedep.c
+24
-18
winegcc.c
tools/winegcc/winegcc.c
+7
-1
No files found.
tools/makedep.c
View file @
27b20c1d
...
...
@@ -2276,7 +2276,7 @@ static struct strarray get_default_imports( const struct makefile *make )
/*******************************************************************
* add_crt_import
*/
static
const
char
*
add_crt_import
(
const
struct
makefile
*
make
,
struct
strarray
*
import
s
)
static
void
add_crt_import
(
const
struct
makefile
*
make
,
struct
strarray
*
imports
,
struct
strarray
*
def
s
)
{
unsigned
int
i
;
const
char
*
crt_dll
=
NULL
;
...
...
@@ -2289,10 +2289,28 @@ static const char *add_crt_import( const struct makefile *make, struct strarray
}
if
(
!
crt_dll
&&
!
strarray_exists
(
&
make
->
extradllflags
,
"-nodefaultlibs"
))
{
crt_dll
=
!
make
->
testdll
&&
!
make
->
staticlib
?
"ucrtbase"
:
"msvcrt"
;
strarray_add
(
imports
,
crt_dll
);
if
(
make
->
module
&&
(
!
strncmp
(
make
->
module
,
"msvcr"
,
5
)
||
!
strncmp
(
make
->
module
,
"ucrt"
,
4
)
||
!
strcmp
(
make
->
module
,
"crtdll.dll"
)))
{
crt_dll
=
make
->
module
;
}
else
{
crt_dll
=
!
make
->
testdll
&&
!
make
->
staticlib
?
"ucrtbase"
:
"msvcrt"
;
strarray_add
(
imports
,
crt_dll
);
}
}
if
(
!
defs
)
return
;
if
(
crt_dll
&&
!
strncmp
(
crt_dll
,
"ucrt"
,
4
))
strarray_add
(
defs
,
"-D_UCRT"
);
else
{
unsigned
int
version
=
0
;
if
(
crt_dll
)
sscanf
(
crt_dll
,
"msvcr%u"
,
&
version
);
strarray_add
(
defs
,
strmake
(
"-D_MSVCR_VER=%u"
,
version
));
}
return
crt_dll
;
}
...
...
@@ -3034,7 +3052,7 @@ static void output_source_spec( struct makefile *make, struct incl_file *source,
const
char
*
debug_file
;
if
(
!
imports
.
count
)
imports
=
make
->
imports
;
else
if
(
make
->
use_msvcrt
)
add_crt_import
(
make
,
&
imports
);
else
if
(
make
->
use_msvcrt
)
add_crt_import
(
make
,
&
imports
,
NULL
);
if
(
!
dll_flags
.
count
)
dll_flags
=
make
->
extradllflags
;
all_libs
=
add_import_libs
(
make
,
&
dep_libs
,
imports
,
0
,
0
);
...
...
@@ -4200,19 +4218,7 @@ static void load_sources( struct makefile *make )
make
->
use_msvcrt
=
1
;
}
if
(
make
->
use_msvcrt
)
{
const
char
*
crt_dll
=
add_crt_import
(
make
,
&
make
->
imports
);
if
(
crt_dll
&&
!
strncmp
(
crt_dll
,
"ucrt"
,
4
))
strarray_add
(
&
make
->
define_args
,
"-D_UCRT"
);
else
{
unsigned
int
msvcrt_version
=
0
;
if
(
crt_dll
)
sscanf
(
crt_dll
,
"msvcr%u"
,
&
msvcrt_version
);
strarray_add
(
&
make
->
define_args
,
strmake
(
"-D_MSVCR_VER=%u"
,
msvcrt_version
));
}
}
if
(
make
->
use_msvcrt
)
add_crt_import
(
make
,
&
make
->
imports
,
&
make
->
define_args
);
LIST_FOR_EACH_ENTRY
(
file
,
&
make
->
includes
,
struct
incl_file
,
entry
)
parse_file
(
make
,
file
,
0
);
LIST_FOR_EACH_ENTRY
(
file
,
&
make
->
sources
,
struct
incl_file
,
entry
)
get_dependencies
(
file
,
file
);
...
...
tools/winegcc/winegcc.c
View file @
27b20c1d
...
...
@@ -1224,7 +1224,13 @@ static void build(struct options* opts)
add_library
(
opts
,
lib_dirs
,
files
,
"winecrt0"
);
if
(
opts
->
use_msvcrt
)
{
if
(
!
crt_lib
)
add_library
(
opts
,
lib_dirs
,
files
,
"ucrtbase"
);
if
(
!
crt_lib
)
{
if
(
strncmp
(
output_name
,
"msvcr"
,
5
)
&&
strncmp
(
output_name
,
"ucrt"
,
4
)
&&
strcmp
(
output_name
,
"crtdll.dll"
))
add_library
(
opts
,
lib_dirs
,
files
,
"ucrtbase"
);
}
else
strarray_add
(
files
,
strmake
(
"-a%s"
,
crt_lib
));
}
if
(
opts
->
win16_app
)
add_library
(
opts
,
lib_dirs
,
files
,
"kernel"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment