2 # Configuration file for running the libunwind tests against a libc++ shared library
3 # into which the unwinder was merged.
6 lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
11 if @LIBUNWIND_ENABLE_CET@:
12 compile_flags.append('-fcf-protection=full')
14 if @LIBUNWIND_ENABLE_GCS@:
15 compile_flags.append('-mbranch-protection=standard')
17 # On ELF platforms, link tests with -Wl,--export-dynamic if supported by the linker.
18 if len('@CMAKE_EXE_EXPORTS_CXX_FLAG@'):
19 link_flags.append('@CMAKE_EXE_EXPORTS_CXX_FLAG@')
22 link_flags.append('-l@CMAKE_DL_LIBS@')
24 # Stack unwinding tests need unwinding tables and these are not generated by default on all targets.
25 compile_flags.append('-funwind-tables')
27 local_sysroot = '@CMAKE_OSX_SYSROOT@' or '@CMAKE_SYSROOT@'
28 config.substitutions.append(('%{flags}',
29 '-isysroot {}'.format(local_sysroot) if local_sysroot else ''
31 config.substitutions.append(('%{compile_flags}',
32 '-nostdinc++ -I %{{include}} {}'.format(' '.join(compile_flags))
34 config.substitutions.append(('%{link_flags}',
35 '-L %{{lib}} -Wl,-rpath,%{{lib}} -lc++ {}'.format(' '.join(link_flags))
37 config.substitutions.append(('%{exec}',
38 '%{executor} --execdir %T -- '
42 site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils'))
43 import libcxx.test.params, libcxx.test.config
44 libcxx.test.config.configure(
45 libcxx.test.params.DEFAULT_PARAMETERS,
46 libcxx.test.features.DEFAULT_FEATURES,