Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sam Joan Roque-Worcel
wine
Commits
5d2596ad
Commit
5d2596ad
authored
4 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
makefiles: Explicitly import the CRT library also for test dlls.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
655ab7a8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/makedep.c
+34
-14
34 additions, 14 deletions
tools/makedep.c
with
34 additions
and
14 deletions
tools/makedep.c
+
34
−
14
View file @
5d2596ad
...
...
@@ -2294,6 +2294,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
*/
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment