Build/Core/solution.lua

79 lines
2.4 KiB
Lua
Raw Normal View History

local function auStartSolution(sln)
workspace(sln.name)
auRequire("Core/Target").startSolution()
location(Aurora.Settings.sAbsCompilerWd)
-- Required for core Aurora assumptions. External build chains may mess with these -- not my problem.
symbols "On" -- even ship binaries are initially built with symbols for unix targets to strip them with objcopy
visibility "Hidden" -- posix devs are stupid. default vis is stupid. we're beyond the 70's C OS aka version 7 UNIX
stringpooling "true" -- i've seen hashmaps explode too many times to care about the few ms this saves
floatingpoint "strict" -- x87 sucks so lets be mean. it's a nice to have when working with js runtimes
justmycode "Off" -- some premake warning bug
2022-03-07 20:13:40 +00:00
if (Aurora.Settings.bStaticRuntime) then
staticruntime "On"
else
staticruntime "Off"
end
if (Aurora.Settings.bEditAndCont) then
editandcontinue "On"
else
editandcontinue "Off"
end
flags
{
"NoPCH"
}
if (Aurora.Settings.bMultithreadBuild) then
flags
{
"MultiProcessorCompile"
}
end
2023-03-05 20:38:25 +00:00
if (Aurora.Settings.bLTO) then
flags "LinkTimeOptimization"
end
auFilterForPlatforms(function(platform)
if (platform == "win32") then
if (not Aurora.Settings.bForceClangWin32) then
toolset "msc"
else
toolset "clang"
end
else
if (not Aurora.Settings.bForceClangOnUnix) then
toolset "gcc"
else
toolset "clang"
end
end
end)
if (Aurora.Settings.bForceLLVMStl) then
2022-04-05 19:54:09 +00:00
auFilter {"files:**.cpp or files:**.cc or files:**.cxx", "toolset:clang"}
buildoptions {"-stdlib=libc++"}
2022-04-05 19:54:09 +00:00
auFilter{}
auFilter { "toolset:clang"}
linkoptions {"-nodefaultlibs"}
links {"c++",
"c++abi",
"m",
"c",
"gcc_s",
"gcc"}
auFilter {}
end
end
return {
start = auStartSolution
}