1// RUN: %clangxx_asan -O2 %s -o %t
2// RUN: %run %t 2>&1 | FileCheck %s
3
4// FIXME: Doesn't work with DLLs
5// XFAIL: win32-dynamic-asan
6
7const char *kAsanDefaultOptions = "verbosity=1 help=1";
8
9// Required for dyld macOS 12.0+
10#if (__APPLE__)
11__attribute__((weak))
12#endif
13__attribute__((no_sanitize_address))
14extern "C" const char *
15__asan_default_options() {
16 // CHECK: Available flags for AddressSanitizer:
17 return kAsanDefaultOptions;
18}
19
20int main() {
21 return 0;
22}
23

source code of compiler-rt/test/asan/TestCases/default_options.cpp