Commit 0e4d22bd authored by Alexandre Julliard's avatar Alexandre Julliard

winegc: Support overriding the default PE file alignment.

parent e36bed4f
......@@ -223,6 +223,7 @@ struct options
const char* output_name;
const char* image_base;
const char* section_align;
const char* file_align;
const char* sysroot;
const char* isysroot;
const char* lib_suffix;
......@@ -522,7 +523,8 @@ static strarray *get_link_args( struct options *opts, const char *output_name )
strarray_add(link_args, strmake("-Wl,-pdb,%s", opts->debug_file));
if (!try_link( opts->prefix, link_args, "-Wl,--file-alignment,0x1000" ))
strarray_add( link_args, "-Wl,--file-alignment,0x1000" );
strarray_add( link_args, strmake( "-Wl,--file-alignment,%s",
opts->file_align ? opts->file_align : "0x1000" ));
strarray_addall( link_args, flags );
return link_args;
......@@ -1918,6 +1920,11 @@ int main(int argc, char **argv)
opts.section_align = strdup( Wl->base[++j] );
continue;
}
if (!strcmp(Wl->base[j], "--file-alignment") && j < Wl->size - 1)
{
opts.file_align = strdup( Wl->base[++j] );
continue;
}
if (!strcmp(Wl->base[j], "--large-address-aware"))
{
opts.large_address_aware = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment