From fd71ffb44a325d249f27fc3df34936f2ecb33ee2 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Fri, 31 Jul 2020 16:22:43 +0200 Subject: [PATCH] winegcc: Try using msvc file align syntax if mingw-style is not supported. Allows setting file alignment on LLD 10. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- tools/winegcc/winegcc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 52ab034b3aa..bbb44ff6144 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -525,6 +525,11 @@ static strarray *get_link_args( struct options *opts, const char *output_name ) if (!try_link( opts->prefix, link_args, "-Wl,--file-alignment,0x1000" )) strarray_add( link_args, strmake( "-Wl,--file-alignment,%s", opts->file_align ? opts->file_align : "0x1000" )); + else if (!try_link( opts->prefix, link_args, "-Wl,-Xlink=-filealign:0x1000" )) + /* lld from llvm 10 does not support mingw style --file-alignment, + * but it's possible to use msvc syntax */ + strarray_add( link_args, strmake( "-Wl,-Xlink=-filealign:%s", + opts->file_align ? opts->file_align : "0x1000" )); strarray_addall( link_args, flags ); return link_args;