2 # Configuration file for running the libunwind tests against the shared library.
5 lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
10 if @LIBUNWIND_ENABLE_CET@:
11 compile_flags.append('-fcf-protection=full')
13 # On ELF platforms, link tests with -Wl,--export-dynamic if supported by the linker.
14 if len('@CMAKE_EXE_EXPORTS_CXX_FLAG@'):
15 link_flags.append('@CMAKE_EXE_EXPORTS_CXX_FLAG@')
18 link_flags.append('-l@CMAKE_DL_LIBS@')
20 # Stack unwinding tests need unwinding tables and these are not generated by default on all targets.
21 compile_flags.append('-funwind-tables')
23 local_sysroot = '@CMAKE_OSX_SYSROOT@' or '@CMAKE_SYSROOT@'
24 config.substitutions.append(('%{flags}',
25 '-isysroot {}'.format(local_sysroot) if local_sysroot else ''
27 config.substitutions.append(('%{compile_flags}',
28 '-nostdinc++ -I %{{include}} {}'.format(' '.join(compile_flags))
30 config.substitutions.append(('%{link_flags}',
31 '-L %{{lib}} -Wl,-rpath,%{{lib}} -lunwind {}'.format(' '.join(link_flags))
33 config.substitutions.append(('%{exec}',
34 '%{executor} --execdir %T -- '
38 site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils'))
39 import libcxx.test.params, libcxx.test.config
40 libcxx.test.config.configure(
41 libcxx.test.params.DEFAULT_PARAMETERS,
42 libcxx.test.features.DEFAULT_FEATURES,