summaryrefslogtreecommitdiff
path: root/xmake/scripts/base/compiler.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/scripts/base/compiler.lua')
-rw-r--r--xmake/scripts/base/compiler.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/xmake/scripts/base/compiler.lua b/xmake/scripts/base/compiler.lua
index f7a9a0c33..22e7d8e53 100644
--- a/xmake/scripts/base/compiler.lua
+++ b/xmake/scripts/base/compiler.lua
@@ -359,9 +359,8 @@ function compiler._make_for_option(module, opt, srcfile, objfile, logfile)
local flagnames = compiler._flagnames(module._KIND)
assert(flagnames)
- -- add flags from the compiler
+ -- init flags
local flags = {}
- compiler._addflags_from_compiler(module, flags, flagnames)
-- add flags from the configure
compiler._addflags_from_config(module, flags, flagnames)
@@ -372,6 +371,9 @@ function compiler._make_for_option(module, opt, srcfile, objfile, logfile)
-- add flags from the platform
compiler._addflags_from_platform(module, flags, flagnames)
+ -- add flags from the compiler
+ compiler._addflags_from_compiler(module, flags, flagnames)
+
-- execute the compile command
return module:command_compile(srcfile, objfile, table.concat(flags, " "):trim(), logfile)
end
@@ -414,9 +416,8 @@ function compiler.make(module, target, srcfile, objfile, logfile)
local flagnames = compiler._flagnames(module._KIND)
assert(flagnames)
- -- add flags from the compiler
+ -- init flags
local flags = {}
- compiler._addflags_from_compiler(module, flags, flagnames)
-- add flags from the configure
compiler._addflags_from_config(module, flags, flagnames)
@@ -427,6 +428,9 @@ function compiler.make(module, target, srcfile, objfile, logfile)
-- add flags from the platform
compiler._addflags_from_platform(module, flags, flagnames)
+ -- add flags from the compiler
+ compiler._addflags_from_compiler(module, flags, flagnames)
+
-- make the compile command
return module:command_compile(srcfile, objfile, table.concat(flags, " "):trim(), logfile)
end