Skip to content

Commit 37c7d98

Browse files
ldionnecopybara-github
authored andcommitted
[runtimes] Run backdeployment CI on Github hosted runners (#109984)
This removes the need for macOS nodes in Buildkite. It also moves to the proper way of testing backdeployment, which is to actually run on the target OS itself, instead of using packaged dylibs from previous OS versions and trying to emulate backdeployment with DYLD_LIBRARY_PATH. As a drive-by change, also fix a few back-deployment annotations that were incorrect and add support for minor versions in the Lit feature determining availability from the target triple. NOKEYCHECK=True GitOrigin-RevId: 0547e573c555445e37db5c3bc92ee72274e19b69
1 parent b7cdaca commit 37c7d98

File tree

2 files changed

+41
-67
lines changed

2 files changed

+41
-67
lines changed

test/configs/apple-libunwind-backdeployment.cfg.in

Lines changed: 0 additions & 67 deletions
This file was deleted.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Testing configuration for back-deployment against the system-provided libunwind.
2+
#
3+
# Under this configuration, we compile and link all the test suite against the just-built
4+
# libunwind, but we run against the system libunwind.
5+
6+
import os, site
7+
site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils'))
8+
import libcxx.test.params, libcxx.test.config, libcxx.test.dsl
9+
10+
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
11+
12+
config.substitutions.append(('%{flags}',
13+
'-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''
14+
))
15+
config.substitutions.append(('%{compile_flags}',
16+
'-nostdinc++ -I %{include}'
17+
))
18+
config.substitutions.append(('%{link_flags}',
19+
'-nostdlib++ -L %{lib} -lc++ -lunwind'
20+
))
21+
config.substitutions.append(('%{exec}',
22+
'%{executor} --execdir %T -- '
23+
))
24+
25+
config.stdlib = 'apple-libc++'
26+
config.using_system_stdlib = True
27+
28+
# TODO: This is a giant hack, but we need to change the install_name of libunwind.dylib because the
29+
# upstream configuration can't currently produce a libunwind.dylib that is compatible with the
30+
# Apple system one.
31+
import subprocess
32+
subprocess.check_call(['install_name_tool', '-id', '/usr/lib/system/libunwind.dylib', '@LIBUNWIND_TESTING_INSTALL_PREFIX@/lib/libunwind.dylib'])
33+
34+
import os, site
35+
import libcxx.test.params, libcxx.test.config
36+
libcxx.test.config.configure(
37+
libcxx.test.params.DEFAULT_PARAMETERS,
38+
libcxx.test.features.DEFAULT_FEATURES,
39+
config,
40+
lit_config
41+
)

0 commit comments

Comments
 (0)