xref: /llvm-project/lld/test/MachO/lit.local.cfg (revision f98ee40f4b5d7474fc67e82824bf6abbaedb7b1c)
1# -*- Python -*-
2
3import os
4
5# FIXME: The MachO back-end currently does not respect endianness when
6# accessing binary data structures, and therefore only works correctly
7# on little-endian host systems.  Skip all tests on big-endian hosts.
8if sys.byteorder == "big":
9    config.unsupported = True
10
11# We specify the most commonly-used archs and platform versions in our tests
12# here. Tests which need different settings can just append to this, as only
13# the last value will be used.
14#
15# Note however that this does not apply to `-syslibroot`: each instance of that
16# flag will append to the set of library roots. As such, we define a separate
17# alias for each platform.
18
19lld_watchos = (
20    "ld64.lld -lSystem -arch arm64_32 -platform_version watchos 7.0 8.0 -syslibroot "
21    + os.path.join(config.test_source_root, "MachO", "Inputs", "WatchOS.sdk")
22)
23config.substitutions.append(("%lld-watchos", lld_watchos + " -fatal_warnings"))
24config.substitutions.append(("%no-fatal-warnings-lld-watchos", lld_watchos))
25
26config.substitutions.append(("%no-arg-lld", "ld64.lld"))
27
28# Since most of our tests are written around x86_64, we give this platform the
29# shortest substitution of "%lld".
30lld = (
31    "ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot "
32    + os.path.join(config.test_source_root, "MachO", "Inputs", "MacOSX.sdk")
33)
34config.substitutions.append(("%lld", lld + " -lSystem -fatal_warnings"))
35config.substitutions.append(("%no-lsystem-lld", lld + " -fatal_warnings"))
36config.substitutions.append(("%no-fatal-warnings-lld", lld + " -lSystem"))
37