diff options
| author | ruki <[email protected]> | 2015-12-04 18:36:02 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-12-04 18:36:02 +0800 |
| commit | 55c9ce5e25f0b7a41c5b3d58436f3621f817f599 (patch) | |
| tree | 9373120bea9c7429f1a7ff6508bec7fba6c3811c /xmake/scripts | |
| parent | a00d70829b2bdecc295d800c5402e96b9f538264 (diff) | |
modify flags order for compiler and linker
Diffstat (limited to 'xmake/scripts')
| -rw-r--r-- | xmake/scripts/base/compiler.lua | 16 | ||||
| -rw-r--r-- | xmake/scripts/base/linker.lua | 18 |
2 files changed, 17 insertions, 17 deletions
diff --git a/xmake/scripts/base/compiler.lua b/xmake/scripts/base/compiler.lua index 5fa96b93e..184ad0125 100644 --- a/xmake/scripts/base/compiler.lua +++ b/xmake/scripts/base/compiler.lua @@ -361,14 +361,14 @@ function compiler._make_for_option(module, opt, srcfile, objfile, logfile) local flags = {} compiler._addflags_from_compiler(module, flags, flagnames) - -- add flags from the platform - compiler._addflags_from_platform(module, flags, flagnames) + -- add flags from the configure + compiler._addflags_from_config(module, flags, flagnames) -- add flags from the option compiler._addflags_from_option(module, flags, flagnames, opt) - -- add flags from the configure - compiler._addflags_from_config(module, flags, flagnames) + -- add flags from the platform + compiler._addflags_from_platform(module, flags, flagnames) -- execute the compile command return module:command_compile(srcfile, objfile, table.concat(flags, " "):trim(), logfile) @@ -416,14 +416,14 @@ function compiler.make(module, target, srcfile, objfile, logfile) local flags = {} compiler._addflags_from_compiler(module, flags, flagnames) - -- add flags from the platform - compiler._addflags_from_platform(module, flags, flagnames) + -- add flags from the configure + compiler._addflags_from_config(module, flags, flagnames) -- add flags from the target compiler._addflags_from_target(module, flags, flagnames, target) - -- add flags from the configure - compiler._addflags_from_config(module, flags, flagnames) + -- add flags from the platform + compiler._addflags_from_platform(module, flags, flagnames) -- make the compile command return module:command_compile(srcfile, objfile, table.concat(flags, " "):trim(), logfile) diff --git a/xmake/scripts/base/linker.lua b/xmake/scripts/base/linker.lua index f8d2c81a8..a91b57770 100644 --- a/xmake/scripts/base/linker.lua +++ b/xmake/scripts/base/linker.lua @@ -294,14 +294,14 @@ function linker.make(module, target, objfiles, targetfile, logfile) local flags = {} linker._addflags_from_linker(module, flags, flagname) - -- add flags from the platform - linker._addflags_from_platform(module, flags, flagname) + -- add flags from the configure + linker._addflags_from_config(module, flags, flagname) -- add flags from the target linker._addflags_from_target(module, flags, flagname, target) - -- add flags from the configure - linker._addflags_from_config(module, flags, flagname) + -- add flags from the platform + linker._addflags_from_platform(module, flags, flagname) -- make the link command return module:command_link(table.concat(objfiles, " "), targetfile, table.concat(flags, " "):trim(), logfile) @@ -321,18 +321,18 @@ function linker.check_links(opt, links, objectfile, targetfile) local flags = {} linker._addflags_from_linker(module, flags, "ldflags") - -- add flags from the platform - linker._addflags_from_platform(module, flags, "ldflags") + -- add flags from the configure + linker._addflags_from_config(module, flags, "ldflags") -- add flags from the option linker._addflags_from_option(module, flags, "ldflags", opt) + -- add flags from the platform + linker._addflags_from_platform(module, flags, "ldflags") + -- add flags from the links linker._addflags_from_links(module, flags, links) - -- add flags from the configure - linker._addflags_from_config(module, flags, "ldflags") - -- execute the link command return module:main(module:command_link(objectfile, targetfile, table.concat(flags, " "):trim(), xmake._NULDEV)) end |
