mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1835717 - Disable _FORTIFY_SOURCE by setting it to 0 rather than undefining it. r=tjr
Clang 17 made a change that made it an error to undefine _FORTIFY_SOURCE on mac, because it's defined as a builtin when ASAN is enabled. Defining it as 0 has the same effect of disabling it, but avoids the error. Differential Revision: https://phabricator.services.mozilla.com/D179398
This commit is contained in:
parent
28d473b72a
commit
4ae64cc3df
@ -2459,9 +2459,9 @@ def security_hardening_cflags(
|
|||||||
ldflags.append("-guard:cf,nolongjmp")
|
ldflags.append("-guard:cf,nolongjmp")
|
||||||
|
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
# If ASAN _is_ on, undefine FORTIFY_SOURCE just to be safe
|
# If ASAN _is_ on, disable FORTIFY_SOURCE just to be safe
|
||||||
if asan:
|
if asan:
|
||||||
flags.append("-U_FORTIFY_SOURCE")
|
flags.append("-D_FORTIFY_SOURCE=0")
|
||||||
|
|
||||||
# fno-common -----------------------------------------
|
# fno-common -----------------------------------------
|
||||||
# Do not merge variables for ASAN; can detect some subtle bugs
|
# Do not merge variables for ASAN; can detect some subtle bugs
|
||||||
|
Loading…
Reference in New Issue
Block a user