brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 54ee0c1 Raw
37 lines · plain
1# -*- Python -*-2 3import os4 5# FIXME: The MachO back-end currently does not respect endianness when6# accessing binary data structures, and therefore only works correctly7# on little-endian host systems.  Skip all tests on big-endian hosts.8if sys.byteorder == "big":9    config.unsupported = True10 11# We specify the most commonly-used archs and platform versions in our tests12# here. Tests which need different settings can just append to this, as only13# the last value will be used.14#15# Note however that this does not apply to `-syslibroot`: each instance of that16# flag will append to the set of library roots. As such, we define a separate17# 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 the29# 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