Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5d2596ad
Commit
5d2596ad
authored
Sep 10, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makefiles: Explicitly import the CRT library also for test dlls.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
655ab7a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
14 deletions
+34
-14
makedep.c
tools/makedep.c
+34
-14
No files found.
tools/makedep.c
View file @
5d2596ad
...
...
@@ -2295,6 +2295,29 @@ 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
*
imports
)
{
unsigned
int
i
;
const
char
*
crt_dll
=
NULL
;
for
(
i
=
0
;
i
<
imports
->
count
;
i
++
)
{
if
(
strncmp
(
imports
->
str
[
i
],
"msvcr"
,
5
)
&&
strncmp
(
imports
->
str
[
i
],
"ucrt"
,
4
))
continue
;
if
(
crt_dll
)
fatal_error
(
"More than one C runtime DLL imported: %s and %s
\n
"
,
crt_dll
,
imports
->
str
[
i
]
);
crt_dll
=
imports
->
str
[
i
];
}
if
(
!
crt_dll
&&
!
strarray_exists
(
&
make
->
extradllflags
,
"-nodefaultlibs"
))
{
crt_dll
=
!
make
->
testdll
&&
!
make
->
staticlib
?
"ucrtbase"
:
"msvcrt"
;
strarray_add
(
imports
,
crt_dll
);
}
return
crt_dll
;
}
/*******************************************************************
* add_install_rule
*/
static
void
add_install_rule
(
struct
makefile
*
make
,
const
char
*
target
,
...
...
@@ -3041,6 +3064,8 @@ 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
);
if
(
!
dll_flags
.
count
)
dll_flags
=
make
->
extradllflags
;
all_libs
=
add_import_libs
(
make
,
&
dep_libs
,
imports
,
0
,
0
);
add_import_libs
(
make
,
&
dep_libs
,
get_default_imports
(
make
),
0
,
0
);
/* dependencies only */
...
...
@@ -4248,7 +4273,7 @@ static void load_sources( struct makefile *make )
"MANPAGES"
,
NULL
};
const
char
**
var
,
*
crt_dll
=
NULL
;
const
char
**
var
;
unsigned
int
i
;
struct
strarray
value
;
struct
incl_file
*
file
;
...
...
@@ -4338,21 +4363,16 @@ static void load_sources( struct makefile *make )
if
(
make
->
use_msvcrt
)
{
unsigned
int
msvcrt_version
=
0
;
for
(
i
=
0
;
i
<
make
->
imports
.
count
;
i
++
)
{
if
(
strncmp
(
make
->
imports
.
str
[
i
],
"msvcr"
,
5
)
&&
strncmp
(
make
->
imports
.
str
[
i
],
"ucrt"
,
4
))
continue
;
if
(
crt_dll
)
fatal_error
(
"More than one crt DLL imported: %s %s
\n
"
,
crt_dll
,
make
->
imports
.
str
[
i
]
);
crt_dll
=
make
->
imports
.
str
[
i
];
sscanf
(
crt_dll
,
"msvcr%u"
,
&
msvcrt_version
);
}
if
(
!
crt_dll
&&
!
strarray_exists
(
&
make
->
extradllflags
,
"-nodefaultlibs"
))
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
{
crt_dll
=
!
make
->
testdll
&&
!
make
->
staticlib
?
"ucrtbase"
:
"msvcrt"
;
strarray_add
(
&
make
->
imports
,
crt_dll
);
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
(
crt_dll
&&
!
strncmp
(
crt_dll
,
"ucrt"
,
4
))
strarray_add
(
&
make
->
define_args
,
"-D_UCRT"
);
else
strarray_add
(
&
make
->
define_args
,
strmake
(
"-D_MSVCR_VER=%u"
,
msvcrt_version
));
}
LIST_FOR_EACH_ENTRY
(
file
,
&
make
->
includes
,
struct
incl_file
,
entry
)
parse_file
(
make
,
file
,
0
);
...
...
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