mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 04:06:14 +00:00
Merge pull request #93152 from RandomShaper/prebuilt_asan
Enable usage of asan-enabled versions of prebuilt libraries
This commit is contained in:
commit
abfce31ba7
@ -500,6 +500,14 @@ def configure_msvc(env: "SConsEnvironment", vcvars_msvc_config):
|
||||
if env["arch"] == "x86_64":
|
||||
env.AppendUnique(CPPDEFINES=["_WIN64"])
|
||||
|
||||
# Sanitizers
|
||||
prebuilt_lib_extra_suffix = ""
|
||||
if env["use_asan"]:
|
||||
env.extra_suffix += ".san"
|
||||
prebuilt_lib_extra_suffix = ".san"
|
||||
env.Append(CCFLAGS=["/fsanitize=address"])
|
||||
env.Append(LINKFLAGS=["/INFERASANLIBS"])
|
||||
|
||||
## Libs
|
||||
|
||||
LIBS = [
|
||||
@ -567,7 +575,7 @@ def configure_msvc(env: "SConsEnvironment", vcvars_msvc_config):
|
||||
LIBS += ["WinPixEventRuntime"]
|
||||
|
||||
env.Append(LIBPATH=[env["mesa_libs"] + "/bin"])
|
||||
LIBS += ["libNIR.windows." + env["arch"]]
|
||||
LIBS += ["libNIR.windows." + env["arch"] + prebuilt_lib_extra_suffix]
|
||||
|
||||
if env["opengl3"]:
|
||||
env.AppendUnique(CPPDEFINES=["GLES3_ENABLED"])
|
||||
@ -575,9 +583,9 @@ def configure_msvc(env: "SConsEnvironment", vcvars_msvc_config):
|
||||
env.AppendUnique(CPPDEFINES=["EGL_STATIC"])
|
||||
env.Append(LIBPATH=[env["angle_libs"]])
|
||||
LIBS += [
|
||||
"libANGLE.windows." + env["arch"],
|
||||
"libEGL.windows." + env["arch"],
|
||||
"libGLES.windows." + env["arch"],
|
||||
"libANGLE.windows." + env["arch"] + prebuilt_lib_extra_suffix,
|
||||
"libEGL.windows." + env["arch"] + prebuilt_lib_extra_suffix,
|
||||
"libGLES.windows." + env["arch"] + prebuilt_lib_extra_suffix,
|
||||
]
|
||||
LIBS += ["dxgi", "d3d9", "d3d11"]
|
||||
env.Prepend(CPPPATH=["#thirdparty/angle/include"])
|
||||
@ -613,12 +621,6 @@ def configure_msvc(env: "SConsEnvironment", vcvars_msvc_config):
|
||||
env.Prepend(CPPPATH=[p for p in str(os.getenv("INCLUDE")).split(";")])
|
||||
env.Append(LIBPATH=[p for p in str(os.getenv("LIB")).split(";")])
|
||||
|
||||
# Sanitizers
|
||||
if env["use_asan"]:
|
||||
env.extra_suffix += ".san"
|
||||
env.Append(LINKFLAGS=["/INFERASANLIBS"])
|
||||
env.Append(CCFLAGS=["/fsanitize=address"])
|
||||
|
||||
# Incremental linking fix
|
||||
env["BUILDERS"]["ProgramOriginal"] = env["BUILDERS"]["Program"]
|
||||
env["BUILDERS"]["Program"] = methods.precious_program
|
||||
|
Loading…
Reference in New Issue
Block a user