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