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 # On ELF platforms, link tests with -Wl,--export-dynamic if supported by the linker.
15 if len('@CMAKE_EXE_EXPORTS_CXX_FLAG@'):
16 link_flags.append('@CMAKE_EXE_EXPORTS_CXX_FLAG@')
19 link_flags.append('-l@CMAKE_DL_LIBS@')
21 # Stack unwinding tests need unwinding tables and these are not generated by default on all targets.
22 compile_flags.append('-funwind-tables')
24 local_sysroot = '@CMAKE_OSX_SYSROOT@' or '@CMAKE_SYSROOT@'
25 config.substitutions.append(('%{flags}',
26 '-isysroot {}'.format(local_sysroot) if local_sysroot else ''
28 config.substitutions.append(('%{compile_flags}',
29 '-nostdinc++ -I %{{include}} {}'.format(' '.join(compile_flags))
31 config.substitutions.append(('%{link_flags}',
32 '-L %{{lib}} -Wl,-rpath,%{{lib}} -lc++ {}'.format(' '.join(link_flags))
34 config.substitutions.append(('%{exec}',
35 '%{executor} --execdir %T -- '
39 site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils'))
40 import libcxx.test.params, libcxx.test.config
41 libcxx.test.config.configure(
42 libcxx.test.params.DEFAULT_PARAMETERS,
43 libcxx.test.features.DEFAULT_FEATURES,