Compare commits

..

2 Commits

Author SHA1 Message Date
Eoin O'Neill 13b4ab2a57
Merge e878b705b9 into 36847f6af0 2024-02-01 20:25:06 -08:00
Eoin O'Neill e878b705b9 Adjust clang version checking to account for other non-vanilla clangs
We can no longer make the assumption that all non-vanilla clang versions
are Apple's clang or that all other non vanilla clangs will work with
the given arguments. There are times where additional tools might use non vanilla clang
and the presumed arguments here will break compilation on those
platforms.

We might want to consider adding tooling-specific optimazation functions
long term to fetch desired optimizations on a platform basis.
2024-02-01 20:14:53 -08:00
1 changed files with 1 additions and 2 deletions

View File

@ -2,7 +2,6 @@ import os
import subprocess
import sys
from SCons.Script import ARGUMENTS
from SCons.Tool import Tool
from SCons.Variables import *
from SCons.Variables.BoolVariable import _text2bool
@ -129,7 +128,7 @@ def generate(env):
if using_clang(env) and is_clang_type(env, "Apple"):
# Apple Clang, its linker doesn't like -s.
env.Append(LINKFLAGS=["-Wl,-S", "-Wl,-x", "-Wl,-dead_strip"])
elif using_clang(env) and is_clang_type(env, "clang"):
elif is_clang_type(env, "clang"):
env.Append(LINKFLAGS=["-s"])
if env["optimize"] == "speed":