Fix broken sanitize.

This commit is contained in:
Sleepy Monax 2022-07-24 00:46:58 +02:00
parent c1ac3fc156
commit 3fa5dbfab0
3 changed files with 5 additions and 3 deletions

View file

@ -48,6 +48,7 @@ def runCmd(opts: dict, args: list[str]) -> None:
out = build.buildOne(opts.get('target', 'default'), args[0], props)
print()
print(f"{utils.Colors.BOLD}Running: {args[0]}{utils.Colors.RESET}")
utils.runCmd(out, *args[1:])
print()

View file

@ -125,7 +125,7 @@ def buildAll(targetId: str, props: dict = {}) -> None:
print(f"{utils.Colors.BOLD}Building all components for target '{targetId}{utils.Colors.RESET}'")
try:
utils.runCmd("ninja", "-v", "-j", "1", "-f", target["ninjafile"])
utils.runCmd("ninja", "-v", "-f", target["ninjafile"])
except:
raise utils.CliException(
"Failed to build all for " + target["key"])
@ -144,7 +144,7 @@ def buildOne(targetId: str, componentId: str, props: dict = {}) -> str:
f"{componentId} is not enabled for the {targetId} target")
try:
utils.runCmd("ninja", "-v", "-j", "1", "-f",
utils.runCmd("ninja", "-v", "-f",
target["ninjafile"], manifests[componentId]["out"])
except:
raise utils.CliException(

View file

@ -32,6 +32,7 @@ def enableCache(target: dict) -> dict:
def enableSan(target: dict) -> dict:
if (target["props"]["freestanding"]):
print("Sanitization not supported for freestanding targets")
return target
target = copy.deepcopy(target)
@ -139,7 +140,7 @@ def load(targetId: str, props: dict) -> dict:
target = enableOptimizer(target, "2")
elif targetVariant == "release":
target = enableOptimizer(target, "3")
elif targetVariant == "sanatize":
elif targetVariant == "sanitize":
target = enableOptimizer(target, "g")
target = enableSan(target)