summaryrefslogtreecommitdiff
path: root/xmake/scripts/base/linker.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-12-04 18:36:02 +0800
committerruki <[email protected]>2015-12-04 18:36:02 +0800
commit55c9ce5e25f0b7a41c5b3d58436f3621f817f599 (patch)
tree9373120bea9c7429f1a7ff6508bec7fba6c3811c /xmake/scripts/base/linker.lua
parenta00d70829b2bdecc295d800c5402e96b9f538264 (diff)
modify flags order for compiler and linker
Diffstat (limited to 'xmake/scripts/base/linker.lua')
-rw-r--r--xmake/scripts/base/linker.lua18
1 files changed, 9 insertions, 9 deletions
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