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 if '@CMAKE_SYSTEM_NAME@' == 'Linux':
14 link_flags.append('-Wl,--export-dynamic')
16 # Stack unwinding tests need unwinding tables and these are not generated by default on all targets.
17 compile_flags.append('-funwind-tables')
19 local_sysroot = '@CMAKE_OSX_SYSROOT@' or '@CMAKE_SYSROOT@'
20 config.substitutions.append(('%{flags}',
21 '-isysroot {}'.format(local_sysroot) if local_sysroot else ''
23 config.substitutions.append(('%{compile_flags}',
24 '-nostdinc++ -I %{{include}} {}'.format(' '.join(compile_flags))
26 config.substitutions.append(('%{link_flags}',
27 '-L %{{lib}} -Wl,-rpath,%{{lib}} -lunwind -ldl {}'.format(' '.join(link_flags))
29 config.substitutions.append(('%{exec}',
30 '%{executor} --execdir %T -- '
34 site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils'))
35 import libcxx.test.params, libcxx.test.config
36 libcxx.test.config.configure(
37 libcxx.test.params.DEFAULT_PARAMETERS,
38 libcxx.test.features.DEFAULT_FEATURES,