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 <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-07-31 16:22:43 +02:00 committed by Alexandre Julliard
parent 5e4ca097be
commit fd71ffb44a
1 changed files with 5 additions and 0 deletions

View File

@ -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" )) if (!try_link( opts->prefix, link_args, "-Wl,--file-alignment,0x1000" ))
strarray_add( link_args, strmake( "-Wl,--file-alignment,%s", strarray_add( link_args, strmake( "-Wl,--file-alignment,%s",
opts->file_align ? opts->file_align : "0x1000" )); 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 ); strarray_addall( link_args, flags );
return link_args; return link_args;