236
|
1 #
|
|
2 # Configuration file for running the libunwind tests against a libc++ shared library
|
|
3 # into which the unwinder was merged.
|
|
4 #
|
|
5
|
|
6 lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
|
|
7
|
|
8 compile_flags = []
|
|
9 link_flags = []
|
|
10
|
|
11 if @LIBUNWIND_ENABLE_CET@:
|
|
12 compile_flags.append('-fcf-protection=full')
|
|
13
|
|
14 if '@CMAKE_SYSTEM_NAME@' == 'Linux':
|
|
15 link_flags.append('-Wl,--export-dynamic')
|
|
16
|
|
17 # Stack unwinding tests need unwinding tables and these are not generated by default on all targets.
|
|
18 compile_flags.append('-funwind-tables')
|
|
19
|
|
20 local_sysroot = '@CMAKE_OSX_SYSROOT@' or '@CMAKE_SYSROOT@'
|
|
21 config.substitutions.append(('%{flags}',
|
|
22 '-isysroot {}'.format(local_sysroot) if local_sysroot else ''
|
|
23 ))
|
|
24 config.substitutions.append(('%{compile_flags}',
|
|
25 '-nostdinc++ -I %{{include}} {}'.format(' '.join(compile_flags))
|
|
26 ))
|
|
27 config.substitutions.append(('%{link_flags}',
|
|
28 '-L %{{lib}} -Wl,-rpath,%{{lib}} -lc++ -ldl {}'.format(' '.join(link_flags))
|
|
29 ))
|
|
30 config.substitutions.append(('%{exec}',
|
|
31 '%{executor} --execdir %T -- '
|
|
32 ))
|
|
33
|
|
34 import os, site
|
|
35 site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils'))
|
252
|
36 import libcxx.test.params, libcxx.test.config
|
|
37 libcxx.test.config.configure(
|
236
|
38 libcxx.test.params.DEFAULT_PARAMETERS,
|
|
39 libcxx.test.features.DEFAULT_FEATURES,
|
|
40 config,
|
|
41 lit_config
|
|
42 )
|