llvm-project/compiler-rt/lib/gwp_asan
Fangrui Song 474145c0b2 [CMake] Build lib/gwp_asan/tests with -std=c++17
With the recent llvm-project C++17 switch (D130689), gwp_asan/tests may fail to
link with some versions of GCC (https://github.com/llvm/llvm-project/issues/56994):

> backtrace.cpp:(.text+0xca6): undefined reference to `gwp_asan::AllocationMetadata::kMaxTraceLengthToCollect'

I cannot reproduce this issue by myself, but notice that currently
lib/gwp_asan/*.cpp get -std=c++17 while lib/gwp_asan/tests/*.cpp don't
(therefore may use -std=g++14 default from Clang and older GCC). Using -std=c++17
for lib/gwp_asan/tests will ensure that backtrace.cpp uses inline variable and will assuredly avoid the
possible GCC issue.

In the long-term, we should add -std=c++17 to a central place like generate_compiler_rt_tests.

Reviewed By: dyung

Differential Revision: https://reviews.llvm.org/D131440
2022-08-08 17:51:17 -07:00
..
optional [gwp_asan] Use __sanitizer_fast_backtrace on Fuchsia 2021-04-28 16:48:14 -07:00
platform_specific [GWP-ASan] Change sys/cdefs.h to features.h 2021-02-17 20:03:16 -08:00
scripts [compiler-rt] Use portable "#!/usr/bin/env bash" shebang for tests. 2021-09-24 19:10:07 +05:30
tests [CMake] Build lib/gwp_asan/tests with -std=c++17 2022-08-08 17:51:17 -07:00
CMakeLists.txt [sanitizer] Fix for CMAKE_CXX_FLAGS update 2021-08-19 12:05:55 -07:00
common.cpp [GWP-ASan] Add aligned allocations. 2021-02-08 11:22:29 -08:00
common.h [gwp-asan] Initialize AllocatorVersionMagic at runtime 2021-09-27 13:49:55 -07:00
crash_handler.cpp [GWP-ASan] Add aligned allocations. 2021-02-08 11:22:29 -08:00
crash_handler.h [GWP-ASan] Cleanup (NFC) 2020-10-19 18:13:11 -07:00
definitions.h [GWP-ASan] Cleanup (NFC) 2020-10-19 18:13:11 -07:00
guarded_pool_allocator.cpp [gwp-asan] Initialize AllocatorVersionMagic at runtime 2021-09-27 13:49:55 -07:00
guarded_pool_allocator.h [GWP-ASan] Add aligned allocations. 2021-02-08 11:22:29 -08:00
mutex.h [GWP-ASan] IWYU & clang-format 2020-12-10 12:42:01 -08:00
options.h
options.inc [GWP-ASan] Add aligned allocations. 2021-02-08 11:22:29 -08:00
stack_trace_compressor.cpp
stack_trace_compressor.h
utilities.h [GWP-ASan] Add aligned allocations. 2021-02-08 11:22:29 -08:00