SCons: Set appropriate prefix when using clang-cl

This commit is contained in:
Thaddeus Crews 2024-09-01 16:55:33 -05:00
parent ff9fb0abea
commit 9968828913
No known key found for this signature in database
GPG key ID: 62181B86FE9E5D84

View file

@ -390,6 +390,11 @@ def configure_msvc(env: "SConsEnvironment", vcvars_msvc_config):
env.AppendUnique(CPPDEFINES=["R128_STDC_ONLY"])
env.extra_suffix = ".llvm" + env.extra_suffix
# Ensure intellisense tools like `compile_commands.json` play nice with MSVC syntax.
env["CPPDEFPREFIX"] = "-D"
env["INCPREFIX"] = "-I"
env.AppendUnique(CPPDEFINES=[("alloca", "_alloca")])
if env["silence_msvc"] and not env.GetOption("clean"):
from tempfile import mkstemp