Buildsystem: Refactor compiler detection code
* Delete old check for gcc 8 as we support 9 or higher * Flatten branches for clang and apple clang * Renamed is_vanilla_clang to is_apple_clang to be more clear Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
This commit is contained in:
parent
673f396677
commit
d55ed0cb15
3 changed files with 21 additions and 28 deletions
|
|
@ -652,7 +652,9 @@ def detect_darwin_sdk_path(platform, env):
|
|||
raise
|
||||
|
||||
|
||||
def is_vanilla_clang(env):
|
||||
def is_apple_clang(env):
|
||||
if env["platform"] not in ["macos", "ios"]:
|
||||
return False
|
||||
if not using_clang(env):
|
||||
return False
|
||||
try:
|
||||
|
|
@ -660,7 +662,7 @@ def is_vanilla_clang(env):
|
|||
except (subprocess.CalledProcessError, OSError):
|
||||
print_warning("Couldn't parse CXX environment variable to infer compiler version.")
|
||||
return False
|
||||
return not version.startswith("Apple")
|
||||
return version.startswith("Apple")
|
||||
|
||||
|
||||
def get_compiler_version(env):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue