2 # Configuration file for running the libunwind tests against the static library.
5 lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
10 if @LIBUNWIND_ENABLE_THREADS@:
11 link_flags.append('-lpthread')
13 if @LIBUNWIND_ENABLE_CET@:
14 compile_flags.append('-fcf-protection=full')
16 if '@CMAKE_SYSTEM_NAME@' == 'Linux':
17 link_flags.append('-Wl,--export-dynamic')
19 # Stack unwinding tests need unwinding tables and these are not generated by default on all targets.
20 compile_flags.append('-funwind-tables')
22 local_sysroot = '@CMAKE_OSX_SYSROOT@' or '@CMAKE_SYSROOT@'
23 config.substitutions.append(('%{flags}',
24 '-isysroot {}'.format(local_sysroot) if local_sysroot else ''
26 config.substitutions.append(('%{compile_flags}',
27 '-nostdinc++ -I %{{include}} {}'.format(' '.join(compile_flags))
29 config.substitutions.append(('%{link_flags}',
30 '%{{lib}}/libunwind.a -ldl {}'.format(' '.join(link_flags))
32 config.substitutions.append(('%{exec}',
33 '%{executor} --execdir %T -- '
37 site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils'))
38 import libcxx.test.params, libcxx.test.config
39 libcxx.test.config.configure(
40 libcxx.test.params.DEFAULT_PARAMETERS,
41 libcxx.test.features.DEFAULT_FEATURES,