mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 01:04:06 +00: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:
@@ -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" }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user