brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.3 KiB · d5cb403 Raw
54 lines · plain
1# REQUIRES: aarch64, x862 3# RUN: rm -rf %t && mkdir -p %t4 5# RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t/test.o6# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/native.o7# RUN: not %no-fatal-warnings-lld -arch x86_64 -lSystem %t/test.o -o /dev/null -arch_errors_fatal 2>&1 | FileCheck %s -DFILE=%t/test.o --check-prefix=CHECK-ERROR8# RUN: %no-fatal-warnings-lld -arch x86_64 -lSystem %t/test.o %t/native.o -o /dev/null 2>&1 | FileCheck %s -DFILE=%t/test.o --check-prefix=CHECK-WARNING9# RUN: %lld -arch arm64 -lSystem %t/test.o -arch_errors_fatal -o /dev/null10# CHECK-ERROR: error: {{.*}}[[FILE]] has architecture arm64 which is incompatible with target architecture x86_6411# CHECK-WARNING: warning: {{.*}}[[FILE]] has architecture arm64 which is incompatible with target architecture x86_6412 13# RUN: %lld -dylib -arch arm64 -platform_version macOS 10.14 10.15 -o %t/out.dylib %t/test.o14 15# RUN: not %no-arg-lld -dylib -arch arm64 -platform_version iOS 9.0 11.0 \16# RUN:  %t/out.dylib -o /dev/null 2>&1 | FileCheck %s --check-prefix=DYLIB-PLAT17# DYLIB-PLAT: {{.*}}out.dylib has platform macOS, which is different from target platform iOS18 19# RUN: %lld -lSystem -dylib -arch arm64 -platform_version macOS 10.14.0 10.15.0 %t/out.dylib -o /dev/null20 21# RUN: %no-fatal-warnings-lld -lSystem -dylib -arch arm64 -platform_version macOS 10.13.0 10.15.0 %t/out.dylib \22# RUN:  -o /dev/null 2>&1 | FileCheck %s --check-prefix=DYLIB-VERSION23# DYLIB-VERSION: warning: {{.*}}out.dylib has version 10.14.0, which is newer than target minimum of 10.13.024 25# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos10.15.0 %s -o %t/test_x86.o26 27# RUN: not %no-arg-lld %t/test_x86.o -lSystem -arch x86_64 -platform_version iOS 10.0 15.0 \28# RUN:  -o /dev/null 2>&1 | FileCheck %s --check-prefix=OBJ-PLAT29# OBJ-PLAT: {{.*}}test_x86.o has platform macOS, which is different from target platform iOS30 31# RUN: %lld %t/test_x86.o -lSystem -arch x86_64 -platform_version macOS 10.15.0 10.15.0 -o /dev/null32 33# RUN: %no-fatal-warnings-lld %t/test_x86.o -lSystem -arch x86_64 -platform_version macOS 10.14.0 10.15.0 \34# RUN:  -o /dev/null 2>&1 | FileCheck %s --check-prefix=OBJ-VERSION35# OBJ-VERSION: warning: {{.*}}test_x86.o has version 10.15.0, which is newer than target minimum of 10.14.036 37## Test that simulators platforms are compat with their simulatees.38# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-ios14.0 %s -o %t/test_x86_ios.o39# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-ios14.0-simulator %s -o %t/test_x86_ios_sim.o40 41# RUN: %no-arg-lld -dylib -arch x86_64 -platform_version ios-simulator 14.0.0 14.0.0 %t/test_x86_ios.o -o /dev/null42# RUN: %no-arg-lld -dylib -arch x86_64 -platform_version ios 14.0.0 14.0.0 %t/test_x86_ios_sim.o -o /dev/null43 44# RUN: not %no-arg-lld -dylib -arch x86_64 -platform_version watchos-simulator 14.0.0 14.0.0 %t/test_x86_ios.o \45# RUN:	-o /dev/null 2>&1 | FileCheck %s --check-prefix=CROSS-SIM46# CROSS-SIM: {{.*}}test_x86_ios.o has platform iOS, which is different from target platform watchOS Simulator47# RUN: not %no-arg-lld -dylib -arch x86_64 -platform_version watchos-simulator 14.0.0 14.0.0 %t/test_x86_ios_sim.o \48# RUN:	-o /dev/null 2>&1 | FileCheck %s --check-prefix=CROSS-SIM249# CROSS-SIM2: {{.*}}test_x86_ios_sim.o has platform iOS Simulator, which is different from target platform watchOS Simulator50 51.globl _main52_main:53  ret54