From 5fc652aeba3000759914f54286048c239972ac07 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 8 Dec 2015 19:09:51 +0800 Subject: add ldflags for compiler --- xmake/scripts/base/compiler.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'xmake/scripts/base/compiler.lua') 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 -- cgit v1.3.1