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