@@ -20,9 +20,11 @@ config.test_source_root = os.path.join('@LIBUNWIND_SOURCE_DIR@', 'test')
20
20
config.test_format = libcxx.test.format.CxxStandardLibraryTest()
21
21
config.recursiveExpansionLimit = 10
22
22
config.test_exec_root = '@CMAKE_BINARY_DIR@'
23
+ config.target_info = "@LIBUNWIND_TARGET_INFO@"
23
24
24
25
compile_flags = []
25
26
link_flags = []
27
+
26
28
if @LIBUNWIND_USES_ARM_EHABI@:
27
29
config.available_features.add('libunwind-arm-ehabi')
28
30
@@ -38,20 +40,27 @@ if @LIBUNWIND_ENABLE_CET@:
38
40
if '@CMAKE_SYSTEM_NAME@' == 'Linux':
39
41
link_flags.append('-Wl,--export-dynamic')
40
42
43
+
41
44
# Stack unwinding tests need unwinding tables and these are not generated by default on all targets.
42
45
compile_flags.append('-funwind-tables')
43
46
47
+ config.substitutions.append(('%{executor}', '@LIBUNWIND_EXECUTOR@'))
48
+
44
49
config.substitutions.append(('%{cxx}', '@CMAKE_CXX_COMPILER@'))
50
+
51
+ local_sysroot = '@CMAKE_OSX_SYSROOT@' or '@CMAKE_SYSROOT@'
45
52
config.substitutions.append(('%{flags}',
46
- '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@' ) if '@CMAKE_OSX_SYSROOT@' else ''
53
+ '-isysroot {}'.format(local_sysroot ) if local_sysroot else ''
47
54
))
48
55
config.substitutions.append(('%{compile_flags}',
49
56
'-nostdinc++ -I {}/include {}'.format('@LIBUNWIND_SOURCE_DIR@', ' '.join(compile_flags))
50
57
))
51
58
config.substitutions.append(('%{link_flags}',
52
59
'{}/libunwind.a -ldl {}'.format('@LIBUNWIND_LIBRARY_DIR@', ' '.join(link_flags))
53
60
))
54
- config.substitutions.append(('%{exec}', ''))
61
+ config.substitutions.append(('%{exec}',
62
+ '%{executor} --execdir %T -- ' if '@LIBUNWIND_EXECUTOR@' else ''
63
+ ))
55
64
56
65
import os, site
57
66
site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils'))
0 commit comments