Changeset 267358 in webkit


Ignore:
Timestamp:
Sep 21, 2020 1:02:25 PM (4 years ago)
Author:
ddkilzer@apple.com
Message:

Enable AddressSanitizer in C++ std library templates
<https://webkit.org/b/216746>

Reviewed by Darin Adler.

This change also prevents duplicate command-line switches from
being passed to clang since OTHER_CFLAGS is used when compiling
C++ sources.

  • sanitizer/asan.xcconfig:

(WK_SANITIZER_OTHER_CPLUSPLUSFLAGS_YES): Add.

  • Undefines _LIBCPP_HAS_NO_ASAN macro to enable ASan for C++ std library templates.
  • sanitizer/sanitizer.xcconfig:

(WK_SANITIZER_OTHER_CPLUSPLUSFLAGS_YES): Add.

  • Provide placeholder.

(OTHER_CPLUSPLUSFLAGS):

  • Switch from WK_SANITIZER_OTHER_CFLAGS_ prefix to WK_SANITIZER_OTHER_CPLUSPLUSFLAGS_ prefix.
Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r267353 r267358  
     12020-09-21  David Kilzer  <ddkilzer@apple.com>
     2
     3        Enable AddressSanitizer in C++ std library templates
     4        <https://webkit.org/b/216746>
     5
     6        Reviewed by Darin Adler.
     7
     8        This change also prevents duplicate command-line switches from
     9        being passed to clang since OTHER_CFLAGS is used when compiling
     10        C++ sources.
     11
     12        * sanitizer/asan.xcconfig:
     13        (WK_SANITIZER_OTHER_CPLUSPLUSFLAGS_YES): Add.
     14        - Undefines _LIBCPP_HAS_NO_ASAN macro to enable ASan for C++ std
     15          library templates.
     16
     17        * sanitizer/sanitizer.xcconfig:
     18        (WK_SANITIZER_OTHER_CPLUSPLUSFLAGS_YES): Add.
     19        - Provide placeholder.
     20        (OTHER_CPLUSPLUSFLAGS):
     21        - Switch from WK_SANITIZER_OTHER_CFLAGS_ prefix to
     22          WK_SANITIZER_OTHER_CPLUSPLUSFLAGS_ prefix.
     23
    1242020-09-21  Aakash Jain  <aakash_jain@apple.com>
    225
  • trunk/Tools/sanitizer/asan.xcconfig

    r267130 r267358  
    66
    77WK_ENABLE_SANITIZER = $(ENABLE_ADDRESS_SANITIZER);
     8
     9WK_SANITIZER_OTHER_CPLUSPLUSFLAGS_YES = $(inherited) -U_LIBCPP_HAS_NO_ASAN;
  • trunk/Tools/sanitizer/sanitizer.xcconfig

    r267130 r267358  
    55
    66WK_SANITIZER_OTHER_CFLAGS_YES = -fno-omit-frame-pointer -g;
     7WK_SANITIZER_OTHER_CPLUSPLUSFLAGS_YES = ;
    78
    89OTHER_CFLAGS = $(inherited) $(WK_SANITIZER_OTHER_CFLAGS_$(WK_ENABLE_SANITIZER));
    9 OTHER_CPLUSPLUSFLAGS = $(inherited) $(WK_SANITIZER_OTHER_CFLAGS_$(WK_ENABLE_SANITIZER));
     10OTHER_CPLUSPLUSFLAGS = $(inherited) $(WK_SANITIZER_OTHER_CPLUSPLUSFLAGS_$(WK_ENABLE_SANITIZER));
    1011
    1112// Workaround for rdar://problem/49498092
Note: See TracChangeset for help on using the changeset viewer.