81 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o3 4### We test every platform keyword. Sometimes good keywords are coupled5### with bad version strings, so we use *-NOT patterns to ensure that6### no "malformed platform" diagnostic appears in those cases.7 8# RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \9# RUN: -platform_version \10# RUN: | FileCheck --check-prefix=FAIL-MISSING %s11# RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \12# RUN: -platform_version wtf \13# RUN: | FileCheck --check-prefix=FAIL-MISSING %s14# RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \15# RUN: -platform_version lolz 1.2.3.4.5 \16# RUN: | FileCheck --check-prefix=FAIL-MISSING %s17# FAIL-MISSING: -platform_version: missing argument18# FAIL-MISSING-NOT: malformed platform: {{.*}}19# FAIL-MISSING-NOT: malformed {{minimum|sdk}} version: {{.*}}20 21# RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \22# RUN: -platform_version macOS -lfoo 2 \23# RUN: | FileCheck --check-prefix=FAIL-MALFORM %s24# RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \25# RUN: -platform_version iOS 1 2.a \26# RUN: | FileCheck --check-prefix=FAIL-MALFORM %s27# RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \28# RUN: -platform_version tvOS 1.2.3.4.5 10 \29# RUN: | FileCheck --check-prefix=FAIL-MALFORM %s30# RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \31# RUN: -platform_version watchOS 10 1.2.3.4.5 \32# RUN: | FileCheck --check-prefix=FAIL-MALFORM %s33# FAIL-MALFORM-NOT: malformed platform: {{.*}}34# FAIL-MALFORM: malformed {{minimum|sdk}} version: {{.*}}35 36# RUN: %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \37# RUN: -platform_version bridgeOS 1 538# RUN: %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \39# RUN: -platform_version "Mac Catalyst" 1.2 5.640# RUN: %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \41# RUN: -platform_version "iOS Simulator" 1.2.3 5.6.742# RUN: %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \43# RUN: -platform_version tvOS-Simulator 1.2.3.4 5.6.7.844# RUN: %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \45# RUN: -platform_version watchOS-Simulator 1 546# RUN: %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \47# RUN: -platform_version 1 1 548# RUN: %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \49# RUN: -platform_version 9 1 550 51# RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \52# RUN: -platform_version wtf 1 5 \53# RUN: | FileCheck --check-prefix=FAIL-PLATFORM %s54# RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \55# RUN: -platform_version 0 1 5 \56# RUN: | FileCheck --check-prefix=FAIL-PLATFORM %s57# RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \58# RUN: -platform_version 13 1 5 \59# RUN: | FileCheck --check-prefix=FAIL-PLATFORM %s60# FAIL-PLATFORM: malformed platform: {{.*}}61# FAIL-PLATFORM-NOT: malformed {{minimum|sdk}} version: {{.*}}62 63# RUN: not %no-arg-lld -arch x86_64 -o %t %t.o -fatal_warnings 2>&1 \64# RUN: -platform_version iOS 14.0 15.0 \65# RUN: -platform_version macos 12.0 12.0 \66# RUN: | FileCheck --check-prefix=FAIL-TODO %s67# FAIL-TODO: lld supports writing zippered outputs only for macos and mac-catalyst68 69# RUN: not %no-arg-lld -arch x86_64 -o %t %t.o 2>&1 \70# RUN: -platform_version bridgeOS 1 5 \71# RUN: -platform_version 'mac catalyst' 14.0 15.0 \72# RUN: -platform_version macos 12.0 12.0 \73# RUN: | FileCheck --check-prefix=FAIL-TOOMANY %s74# FAIL-TOOMANY: must specify -platform_version at most twice75 76.text77.global _main78_main:79 mov $0, %eax80 ret81