Jacek Caban : winebuild: Don't use llvm-lib to build static libs containing importlibs.
Alexandre Julliard
julliard at winehq.org
Fri Feb 12 14:37:38 CST 2021
Module: wine
Branch: master
Commit: 6d9b33118455027bebb6a453b7e1477864080fe3
URL: https://source.winehq.org/git/wine.git/?a=commit;h=6d9b33118455027bebb6a453b7e1477864080fe3
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Feb 12 15:35:21 2021 +0100
winebuild: Don't use llvm-lib to build static libs containing importlibs.
It's not supported by LLVM 10.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50653
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tools/winebuild/import.c | 22 +++++++---------------
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
index 3c2547c5584..bc2d8497a47 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -1838,20 +1838,19 @@ static void assemble_files( const char *prefix )
}
/* build a library from the current asm files and any additional object files in argv */
-static void build_library( const char *output_name, char **argv, const char *importlib )
+static void build_library( const char *output_name, char **argv, int create )
{
- int create = !importlib || importlib != output_name;
struct strarray args;
- if (target_platform != PLATFORM_WINDOWS)
+ if (!create || target_platform != PLATFORM_WINDOWS)
{
args = find_tool( "ar", NULL );
- strarray_add( &args, create ? "rc" : "r", output_name, importlib, NULL );
+ strarray_add( &args, create ? "rc" : "r", output_name, NULL );
}
else
{
args = find_link_tool();
- strarray_add( &args, "/lib", strmake( "-out:%s", output_name ), importlib, NULL );
+ strarray_add( &args, "/lib", strmake( "-out:%s", output_name ), NULL );
}
strarray_addall( &args, as_files );
strarray_addv( &args, argv );
@@ -1974,19 +1973,12 @@ void output_static_lib( DLLSPEC *spec, char **argv )
{
if (is_pe())
{
- const char *importlib = NULL;
- if (spec)
- {
- importlib = (argv[0] && target_platform == PLATFORM_WINDOWS)
- ? get_temp_file_name( output_file_name, ".a" )
- : output_file_name;
- build_windows_import_lib( importlib, spec );
- }
- if (argv[0] || !spec) build_library( output_file_name, argv, importlib );
+ if (spec) build_windows_import_lib( output_file_name, spec );
+ if (argv[0] || !spec) build_library( output_file_name, argv, !spec );
}
else
{
if (spec) build_unix_import_lib( spec );
- build_library( output_file_name, argv, NULL );
+ build_library( output_file_name, argv, 1 );
}
}
More information about the wine-cvs
mailing list