Jacek Caban : winegcc: Add support for -Wl,--whole-archive option.
Alexandre Julliard
julliard at winehq.org
Tue May 26 17:17:05 CDT 2020
Module: wine
Branch: master
Commit: 0db5f6cf1b2da3c69cbf2c7700c6301f40e1411a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=0db5f6cf1b2da3c69cbf2c7700c6301f40e1411a
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon May 25 20:34:31 2020 +0200
winegcc: Add support for -Wl,--whole-archive option.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tools/winegcc/winegcc.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index a1ba034009..776d2b6473 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -1188,6 +1188,8 @@ static void build(struct options* opts)
add_library(opts, lib_dirs, files, file + 2 );
else if (file[1] == 'x')
lang = file;
+ else if(file[1] == 'W')
+ strarray_add(files, file);
}
/* add the default libraries, if needed */
@@ -1393,6 +1395,9 @@ static void build(struct options* opts)
}
strarray_add(link_args, name);
break;
+ case 'W':
+ strarray_add(link_args, files->base[j]);
+ break;
}
}
@@ -1932,6 +1937,11 @@ int main(int argc, char **argv)
opts.debug_file = strdup( Wl->base[++j] );
continue;
}
+ if (!strcmp(Wl->base[j], "--whole-archive") || !strcmp(Wl->base[j], "--no-whole-archive"))
+ {
+ strarray_add( opts.files, strmake( "-Wl,%s", Wl->base[j] ));
+ continue;
+ }
if (!strcmp(Wl->base[j], "-static")) linking = -1;
strarray_add(opts.linker_args, strmake("-Wl,%s",Wl->base[j]));
}
More information about the wine-cvs
mailing list