mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Use new premake lto api if available
Premake v5.0.0-beta4 replaces the LinkTimeOptimization flag with a function linktimeoptimization, use it if available to avoid deprecation warning. Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
parent
84b407aa35
commit
df38d4e899
1 changed files with 6 additions and 1 deletions
|
|
@ -209,7 +209,12 @@ function project_set_build_flags()
|
|||
optimize "Speed"
|
||||
end
|
||||
if _OPTIONS["with-lto"] then
|
||||
flags { "LinkTimeOptimization" }
|
||||
if linktimeoptimization then
|
||||
linktimeoptimization("On")
|
||||
else
|
||||
-- deprecated since v5.0.0-beta4
|
||||
flags { "LinkTimeOptimization" }
|
||||
end
|
||||
end
|
||||
defines { "NDEBUG", "CONFIG_FINAL=1" }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue