annotate libunwind/test/configs/llvm-libunwind-merged.cfg.in @ 265:31d058e83c98 current

fix llvm again
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Oct 2023 10:13:49 +0900
parents 1f2b6ac9f198
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
236
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
1 #
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
2 # Configuration file for running the libunwind tests against a libc++ shared library
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
3 # into which the unwinder was merged.
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
4 #
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
5
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
6 lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
7
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
8 compile_flags = []
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
9 link_flags = []
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
10
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
11 if @LIBUNWIND_ENABLE_CET@:
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
12 compile_flags.append('-fcf-protection=full')
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
13
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
14 if '@CMAKE_SYSTEM_NAME@' == 'Linux':
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
15 link_flags.append('-Wl,--export-dynamic')
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
16
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
17 # Stack unwinding tests need unwinding tables and these are not generated by default on all targets.
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
18 compile_flags.append('-funwind-tables')
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
19
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
20 local_sysroot = '@CMAKE_OSX_SYSROOT@' or '@CMAKE_SYSROOT@'
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
21 config.substitutions.append(('%{flags}',
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
22 '-isysroot {}'.format(local_sysroot) if local_sysroot else ''
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
23 ))
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
24 config.substitutions.append(('%{compile_flags}',
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
25 '-nostdinc++ -I %{{include}} {}'.format(' '.join(compile_flags))
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
26 ))
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
27 config.substitutions.append(('%{link_flags}',
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
28 '-L %{{lib}} -Wl,-rpath,%{{lib}} -lc++ -ldl {}'.format(' '.join(link_flags))
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
29 ))
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
30 config.substitutions.append(('%{exec}',
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
31 '%{executor} --execdir %T -- '
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
32 ))
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
33
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
34 import os, site
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
35 site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils'))
252
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 236
diff changeset
36 import libcxx.test.params, libcxx.test.config
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 236
diff changeset
37 libcxx.test.config.configure(
236
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
38 libcxx.test.params.DEFAULT_PARAMETERS,
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
39 libcxx.test.features.DEFAULT_FEATURES,
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
40 config,
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
41 lit_config
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
42 )