[+] LTO
This commit is contained in:
parent
e6fa5fb2ed
commit
326b95c638
@ -456,6 +456,41 @@ local kAllProjectHeaders =
|
|||||||
"linkDepends", "includeDepends"
|
"linkDepends", "includeDepends"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local function auBlockProjectKeyLtoNotMsvc(processor, value)
|
||||||
|
if (value) then
|
||||||
|
auFilter{"toolset:clang", "not system:windows"}
|
||||||
|
--buildoptions "-flto=thin"
|
||||||
|
--linkoptions "-Wl,-mllvm,-threads=4"
|
||||||
|
buildoptions "-flto"
|
||||||
|
linkoptions "-flto"
|
||||||
|
auFilter{}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function auBlockProjectKeyLtoMsvc(processor, value)
|
||||||
|
if (value) then
|
||||||
|
auFilter{"toolset:msc"}
|
||||||
|
--linkoptions "/LTCG"
|
||||||
|
flags { "LinkTimeOptimization" }
|
||||||
|
flags { "NoIncrementalLink" }
|
||||||
|
buildoptions "/GL"
|
||||||
|
auFilter{}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function auBlockProjectKeyLtoClang(processor, value)
|
||||||
|
auBlockProjectKeyLtoNotMsvc(processor, value)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function auBlockProjectKeyLtoNotClang(processor, value)
|
||||||
|
auBlockProjectKeyLtoMsvc(processor, value)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function auBlockProjectKeyLto(processor, value)
|
||||||
|
auBlockProjectKeyLtoMsvc(processor, value)
|
||||||
|
auBlockProjectKeyLtoNotMsvc(processor, value)
|
||||||
|
end
|
||||||
|
|
||||||
auProjectBlockHandlers =
|
auProjectBlockHandlers =
|
||||||
{
|
{
|
||||||
links = auBlockProjectKeyLinks,
|
links = auBlockProjectKeyLinks,
|
||||||
@ -489,7 +524,12 @@ auProjectBlockHandlers =
|
|||||||
unpack = auBlockProjectKeyUnpack,
|
unpack = auBlockProjectKeyUnpack,
|
||||||
m4 = auBlockProjectKeyM4,
|
m4 = auBlockProjectKeyM4,
|
||||||
bigObject = auBlockProjectKeyBigObject,
|
bigObject = auBlockProjectKeyBigObject,
|
||||||
rtti = auBlockProjectKeyRtti
|
rtti = auBlockProjectKeyRtti,
|
||||||
|
lto = auBlockProjectKeyLto,
|
||||||
|
ltoNotMsvc = auBlockProjectKeyLtoNotMsvc,
|
||||||
|
ltoNotClang = auBlockProjectKeyLtoNotClang,
|
||||||
|
ltoMsvc = auBlockProjectKeyLtoMsvc,
|
||||||
|
ltoClang = auBlockProjectKeyLtoClang
|
||||||
}
|
}
|
||||||
auProjectBlockHandlers["soft-depends"] = auBlockProjectKeySoftDepends
|
auProjectBlockHandlers["soft-depends"] = auBlockProjectKeySoftDepends
|
||||||
|
|
||||||
@ -520,7 +560,8 @@ kGenericTasks = {
|
|||||||
"msvcIgnore", "excludes", "depends", "require", "m4", "vala",
|
"msvcIgnore", "excludes", "depends", "require", "m4", "vala",
|
||||||
"eval", "lua", "events", "actions", "staticImpDefines", "features",
|
"eval", "lua", "events", "actions", "staticImpDefines", "features",
|
||||||
"links", "soft-depends", "resourceScript", "protobuf", "unpack",
|
"links", "soft-depends", "resourceScript", "protobuf", "unpack",
|
||||||
"bigObject", "rtti"
|
"bigObject", "rtti", "lto", "ltoNotMsvc", "ltoNotClang", "ltoMsvc",
|
||||||
|
"ltoClang"
|
||||||
}
|
}
|
||||||
|
|
||||||
local kReferenceTasks = {"eval", "includes", "defines", "include", "includes", "protobuf", "actions"} --, "features"}
|
local kReferenceTasks = {"eval", "includes", "defines", "include", "includes", "protobuf", "actions"} --, "features"}
|
||||||
|
Loading…
Reference in New Issue
Block a user