20 lines · c
1// REQUIRES: x86-registered-target, symlinks2 3// RUN: rm -rf %t && mkdir %t4// RUN: ln -s %clang %t/i386-clang5// RUN: ln -s %clang %t/x86_64-pc-freebsd13.1-clang6 7// Check if invocation of "foo-clang" adds option "-target foo".8//9// RUN: %t/i386-clang -c -### %s 2>&1 | FileCheck -check-prefix CHECK-TG1 %s10// CHECK-TG1: Target: i38611 12// Check if invocation of "foo-clang --target=bar" overrides option "-target foo".13//14// RUN: %t/i386-clang -c --target=x86_64 -### %s 2>&1 | FileCheck -check-prefix CHECK-TG2 %s15// CHECK-TG2: Target: x86_6416 17/// Check if invocation of "arch-vendor-osX.Y-clang" adds option "-target arch-vendor-osX.Y".18// RUN: %t/x86_64-pc-freebsd13.1-clang -c -### %s 2>&1 | FileCheck -check-prefix CHECK-TG3 %s19// CHECK-TG3: Target: x86_64-pc-freebsd13.120