File: apple-libc%2B%2B-backdeployment.cfg.in

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (64 lines) | stat: -rw-r--r-- 2,772 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Testing configuration for back-deployment against older Apple system libc++.
#
# Under this configuration, we compile and link all the test suite against the latest libc++,
# however we run against the libc++ on a different platform. This emulates the workflow of
# a developer building their application using recent tools but with the goal of deploying
# on existing devices running an older OS (and hence an older dylib).

import os, site
site.addsitedir(os.path.join('@LIBCXX_SOURCE_DIR@', 'utils'))
import libcxx.test.params, libcxx.test.config, libcxx.test.dsl

lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')

BACKDEPLOYMENT_PARAMETERS = [
    libcxx.test.dsl.Parameter(name='cxx_runtime_root', type=str,
        actions=lambda root: [libcxx.test.dsl.AddSubstitution('%{cxx-runtime-root}', root)],
        help="""
        The simulated root of the system (for libc++) when running tests.

        This should be a directory hierarchy under which the libc++ dylib can be found.
        The dylib in that hierarchy is the one that will be used at runtime when running
        the tests.
        """),
    libcxx.test.dsl.Parameter(name='abi_runtime_root', type=str,
        actions=lambda root: [libcxx.test.dsl.AddSubstitution('%{abi-runtime-root}', root)],
        help="""
        The simulated root of the system (for libc++abi) when running tests.

        This should be a directory hierarchy under which the libc++abi dylib can be found.
        The dylib in that hierarchy is the one that will be used at runtime when running
        the tests.
        """),
    libcxx.test.dsl.Parameter(name='unwind_runtime_root', type=str,
        actions=lambda root: [libcxx.test.dsl.AddSubstitution('%{unwind-runtime-root}', root)],
        help="""
        The simulated root of the system (for libunwind) when running tests.

        This should be a directory hierarchy under which the libunwind dylib can be found.
        The dylib in that hierarchy is the one that will be used at runtime when running
        the tests.
        """),
]

config.substitutions.append(('%{flags}',
    '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''
))
config.substitutions.append(('%{compile_flags}',
    '-nostdinc++ -I %{include} -I %{libcxx}/test/support'
))
config.substitutions.append(('%{link_flags}',
    '-nostdlib++ -L %{lib} -lc++'
))
config.substitutions.append(('%{exec}',
    '%{executor} --execdir %T --env DYLD_LIBRARY_PATH="%{cxx-runtime-root}:%{abi-runtime-root}:%{unwind-runtime-root}" -- '
))

config.stdlib = 'apple-libc++'

libcxx.test.config.configure(
    libcxx.test.params.DEFAULT_PARAMETERS + BACKDEPLOYMENT_PARAMETERS,
    libcxx.test.features.DEFAULT_FEATURES,
    config,
    lit_config
)