[*] Harden
This commit is contained in:
parent
9724a3eb35
commit
1768d90d6a
@ -1,5 +1,6 @@
|
||||
local isUnixPremake = os.host() == "linux" or os.host() == "mac"
|
||||
local isCmakeToolChain = false
|
||||
local isCmakeToolChain = false
|
||||
local isWin32Make = os.host() == "windows" and _ACTION == "gmake2"
|
||||
|
||||
local getPremakeExec = function()
|
||||
if (isCmakeToolChain) then
|
||||
@ -19,7 +20,7 @@ local addBuildCommand = function(when, scriptType, path, cwdRelToProject, args)
|
||||
|
||||
local command = ""
|
||||
|
||||
if (isCmakeToolChain) then
|
||||
if (isCmakeToolChain or isWin32Make) then
|
||||
command = ""
|
||||
elseif (cdAware) then
|
||||
command = "cd \"" .. cwd .. "\" && "
|
||||
|
@ -7,8 +7,9 @@ end
|
||||
-- file name, type, directory, extension, is windows, configuration, real name
|
||||
local function formatCpy(name, type, dir, ex, iswin, config, platformName, arch, realName)
|
||||
local pathSuffix = "";
|
||||
local hack2 = os.host() == "windows" and _ACTION == "gmake2"
|
||||
|
||||
if (iswin) then
|
||||
if (iswin and not hack2) then
|
||||
pathSuffix = "*\"";
|
||||
else
|
||||
pathSuffix = "\"";
|
||||
@ -26,8 +27,13 @@ local function formatCpy(name, type, dir, ex, iswin, config, platformName, arch,
|
||||
local outputPath = string.format("%s/%s%s", dir, name, ex)
|
||||
local outputTarget = string.format("%s/%s", dir, name)
|
||||
local uglyBuildPath = string.format("%%{cfg.targetdir}/%s%s", name, ex)
|
||||
local hack = "{COPY}"
|
||||
|
||||
return string.format("{COPY} \"%s\" \"%s%s", uglyBuildPath, outputPath, pathSuffix), outputPath, uglyBuildPath
|
||||
if (hack2) then
|
||||
hack = "cp -rf"
|
||||
end
|
||||
|
||||
return string.format("%s \"%s\" \"%s%s", hack, uglyBuildPath, outputPath, pathSuffix), outputPath, uglyBuildPath
|
||||
end
|
||||
|
||||
local function gnuCoreUtilsMkdirRecursive(dir)
|
||||
|
@ -93,24 +93,12 @@ local function setBestDebugDir(dest)
|
||||
end
|
||||
|
||||
local function configureProjectForCompiler()
|
||||
if (targetingCmake) then
|
||||
filter {"toolset:msc"}
|
||||
end
|
||||
filter {"toolset:msc"}
|
||||
buildoptions {"-utf-8"}
|
||||
filter {}
|
||||
|
||||
if (bugHack) then
|
||||
buildoptions {"-utf-8"}
|
||||
end
|
||||
|
||||
if (targetingCmake) then
|
||||
filter {"toolset:msc", "files:**.cpp or files:**.cc or files:**.cxx"}
|
||||
elseif (bugHack) then
|
||||
filter {"files:**.cpp or files:**.cc or files:**.cxx"}
|
||||
end
|
||||
|
||||
if (bugHack) then
|
||||
filter {"toolset:msc", "files:**.cpp or files:**.cc or files:**.cxx"}
|
||||
buildoptions {"/experimental:module-", "/Zc:__cplusplus"}
|
||||
end
|
||||
|
||||
filter {}
|
||||
end
|
||||
|
||||
@ -135,21 +123,26 @@ local function configureProjectForPlatform(platform, projectType)
|
||||
end
|
||||
|
||||
if (not Aurora.Settings.bBasicMitigations) then
|
||||
buildoptions {
|
||||
--"/GS-",
|
||||
"/sdl-"
|
||||
}
|
||||
|
||||
flags "NoBufferSecurityCheck"
|
||||
end
|
||||
|
||||
if (Aurora.Settings.bHotswap) then
|
||||
justmycode("On")
|
||||
else
|
||||
justmycode("Off")
|
||||
end
|
||||
|
||||
defines "_CRT_SECURE_NO_WARNINGS"
|
||||
|
||||
filter {"toolset:msc"}
|
||||
if (not Aurora.Settings.bBasicMitigations) then
|
||||
buildoptions {
|
||||
--"/GS-",
|
||||
"/sdl-"
|
||||
}
|
||||
end
|
||||
|
||||
if (Aurora.Settings.bHotswap) then
|
||||
justmycode("On")
|
||||
else
|
||||
justmycode("Off")
|
||||
end
|
||||
|
||||
filter {}
|
||||
else
|
||||
if ((projectType == "SharedLib") or
|
||||
(projectType == "StaticLib")) then
|
||||
|
@ -57,7 +57,8 @@ local function auStartSolution(sln)
|
||||
end
|
||||
end)
|
||||
|
||||
if (Aurora.Settings.bForceLLVMStl) then
|
||||
local gmakeOnWin32 = os.host() == "windows" and _ACTION == "gmake2"
|
||||
if (Aurora.Settings.bForceLLVMStl and not gmakeOnWin32) then
|
||||
auFilter {"files:**.cpp or files:**.cc or files:**.cxx", "toolset:clang"}
|
||||
buildoptions {"-stdlib=libc++"}
|
||||
auFilter{}
|
||||
|
Loading…
Reference in New Issue
Block a user