aboutsummaryrefslogtreecommitdiff
path: root/config/bootstrap-asan.mk
diff options
context:
space:
mode:
authorMaxim Ostapenko <m.ostapenko@samsung.com>2016-12-02 07:39:27 +0000
committerMaxim Ostapenko <chefmax@gcc.gnu.org>2016-12-02 09:39:27 +0200
commit84b0769e335819050ecdd86301a5f5d41fa5df8b (patch)
tree9fbdf0659d0c0d3375472bd8ec482b390381fa99 /config/bootstrap-asan.mk
parentb06496b1617ffcaec0e82fd4cca9eae5e0301cd5 (diff)
downloadgcc-84b0769e335819050ecdd86301a5f5d41fa5df8b.zip
gcc-84b0769e335819050ecdd86301a5f5d41fa5df8b.tar.gz
gcc-84b0769e335819050ecdd86301a5f5d41fa5df8b.tar.bz2
Add support for ASan odr_indicator.
config/ * bootstrap-asan.mk: Replace LSAN_OPTIONS=detect_leaks=0 with ASAN_OPTIONS=detect_leaks=0:use_odr_indicator=1. gcc/ * asan.c (asan_global_struct): Refactor. (create_odr_indicator): New function. (asan_needs_odr_indicator_p): Likewise. (is_odr_indicator): Likewise. (asan_add_global): Introduce odr_indicator_ptr. Pass it into global's constructor. (asan_protect_global): Do not protect odr indicators. gcc/c-family/ * c-attribs.c (asan odr indicator): New attribute. (handle_asan_odr_indicator_attribute): New function. gcc/testsuite/ * c-c++-common/asan/no-redundant-odr-indicators-1.c: New test. From-SVN: r243153
Diffstat (limited to 'config/bootstrap-asan.mk')
-rw-r--r--config/bootstrap-asan.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/bootstrap-asan.mk b/config/bootstrap-asan.mk
index 70baaf9..e73d4c2 100644
--- a/config/bootstrap-asan.mk
+++ b/config/bootstrap-asan.mk
@@ -1,7 +1,7 @@
# This option enables -fsanitize=address for stage2 and stage3.
# Suppress LeakSanitizer in bootstrap.
-export LSAN_OPTIONS="detect_leaks=0"
+export ASAN_OPTIONS=detect_leaks=0:use_odr_indicator=1
STAGE2_CFLAGS += -fsanitize=address
STAGE3_CFLAGS += -fsanitize=address