mirror of
https://github.com/godotengine/godot-angle-static.git
synced 2026-01-06 02:09:55 +03:00
Merge pull request #4 from RandomShaper/asan
Add `use_asan` build option
This commit is contained in:
@@ -78,6 +78,8 @@ opts.Add(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
opts.Add(BoolVariable("use_asan", "Use address sanitizer (ASAN) in MSVC", False))
|
||||||
|
|
||||||
# Add platform options
|
# Add platform options
|
||||||
tools = {}
|
tools = {}
|
||||||
for pl in platforms:
|
for pl in platforms:
|
||||||
@@ -177,6 +179,12 @@ if env["platform"] == "macos":
|
|||||||
elif env["platform"] == "windows":
|
elif env["platform"] == "windows":
|
||||||
env.AppendUnique(CPPDEFINES=["WINVER=0x0603", "_WIN32_WINNT=0x0603"])
|
env.AppendUnique(CPPDEFINES=["WINVER=0x0603", "_WIN32_WINNT=0x0603"])
|
||||||
|
|
||||||
|
# Sanitizers.
|
||||||
|
if env.get("use_asan", False) and and env.get("is_msvc", False):
|
||||||
|
env["extra_suffix"] = "san"
|
||||||
|
env.Append(LINKFLAGS=["/INFERASANLIBS"])
|
||||||
|
env.Append(CCFLAGS=["/fsanitize=address"])
|
||||||
|
|
||||||
|
|
||||||
scons_cache_path = os.environ.get("SCONS_CACHE")
|
scons_cache_path = os.environ.get("SCONS_CACHE")
|
||||||
if scons_cache_path is not None:
|
if scons_cache_path is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user