1 // REQUIRES: shell
2 // REQUIRES: x86-registered-target
3 
4 // RUN: rm -rf %t && mkdir %t
5 // RUN: ln -s %clang %t/i386-clang
6 
7 // Check if invocation of "foo-clang" adds option "-target foo".
8 //
9 // RUN: %t/i386-clang -c -no-canonical-prefixes %s -### 2>&1 | FileCheck -check-prefix CHECK-TG1 %s
10 // CHECK-TG1: Target: i386
11 
12 // Check if invocation of "foo-clang -target bar" overrides option "-target foo".
13 //
14 // RUN: %t/i386-clang -c -no-canonical-prefixes -target x86_64 %s -### 2>&1 | FileCheck -check-prefix CHECK-TG2 %s
15 // CHECK-TG2: Target: x86_64
16