Move cfg.linkoptions out of toolset getldflags() to match behavior of getcflags() and getcxxflags()

This commit is contained in:
Jason Perkins 2014-11-05 16:25:58 -05:00
parent 60fc6d2897
commit ba74e661fa
5 changed files with 2 additions and 6 deletions

View File

@ -401,7 +401,7 @@
function make.ldFlags(cfg, toolset)
local flags = table.join(toolset.getLibraryDirectories(cfg), toolset.getldflags(cfg))
local flags = table.join(toolset.getLibraryDirectories(cfg), toolset.getldflags(cfg), cfg.linkoptions)
_p(' ALL_LDFLAGS += $(LDFLAGS)%s', make.list(flags))
end

View File

@ -856,7 +856,7 @@
function m.additionalLinkerOptions(cfg, toolset)
local flags
if toolset then
flags = toolset.getldflags(cfg)
flags = table.join(toolset.getldflags(cfg), cfg.linkoptions)
else
flags = cfg.linkoptions
end

View File

@ -166,7 +166,6 @@
function clang.getldflags(cfg)
local flags = config.mapFlags(cfg, clang.ldflags)
flags = table.join(flags, cfg.linkoptions)
return flags
end

View File

@ -40,7 +40,6 @@
flags = {
FatalCompileWarnings = "-Werror",
NoFramePointer = "-fomit-frame-pointer",
Symbols = "-g"
},
floatingpoint = {
Fast = "-ffast-math",
@ -183,7 +182,6 @@
function gcc.getldflags(cfg)
local flags = config.mapFlags(cfg, gcc.ldflags)
flags = table.join(flags, cfg.linkoptions)
return flags
end

View File

@ -168,7 +168,6 @@
function msc.getldflags(cfg)
local map = iif(cfg.kind ~= premake.STATICLIB, msc.linkerFlags, msc.librarianFlags)
local flags = config.mapFlags(cfg, map)
flags = table.join(flags, cfg.linkoptions)
table.insert(flags, 1, "/NOLOGO")
return flags
end