| 1 |
// RUN: %clang -### -target x86_64--- -c -integrated-as %s 2>&1 | FileCheck %s |
| 2 |
// CHECK: cc1as |
| 3 |
// CHECK-NOT: -relax-all |
| 4 |
|
| 5 |
// RUN: %clang -### -target x86_64--- -c -integrated-as -Wa,-L %s 2>&1 | FileCheck --check-prefix=OPT_L %s |
| 6 |
// OPT_L: msave-temp-labels |
| 7 |
|
| 8 |
// Test that -I params in -Wa, and -Xassembler args are passed to integrated assembler |
| 9 |
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-I,foo_dir 2>&1 | FileCheck --check-prefix=WA_INCLUDE1 %s |
| 10 |
// WA_INCLUDE1: cc1as |
| 11 |
// WA_INCLUDE1: "-I" "foo_dir" |
| 12 |
|
| 13 |
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-Ifoo_dir 2>&1 | FileCheck --check-prefix=WA_INCLUDE2 %s |
| 14 |
// WA_INCLUDE2: cc1as |
| 15 |
// WA_INCLUDE2: "-Ifoo_dir" |
| 16 |
|
| 17 |
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-I -Wa,foo_dir 2>&1 | FileCheck --check-prefix=WA_INCLUDE3 %s |
| 18 |
// WA_INCLUDE3: cc1as |
| 19 |
// WA_INCLUDE3: "-I" "foo_dir" |
| 20 |
|
| 21 |
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Xassembler -I -Xassembler foo_dir 2>&1 | FileCheck --check-prefix=XA_INCLUDE1 %s |
| 22 |
// XA_INCLUDE1: cc1as |
| 23 |
// XA_INCLUDE1: "-I" "foo_dir" |
| 24 |
|
| 25 |
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Xassembler -Ifoo_dir 2>&1 | FileCheck --check-prefix=XA_INCLUDE2 %s |
| 26 |
// XA_INCLUDE2: cc1as |
| 27 |
// XA_INCLUDE2: "-Ifoo_dir" |
| 28 |
|
| 29 |
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -gdwarf-4 -gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2 %s |
| 30 |
// DWARF2: "-debug-info-kind=constructor" "-dwarf-version=2" |
| 31 |
|
| 32 |
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -gdwarf-3 2>&1 | FileCheck --check-prefix=DWARF3 %s |
| 33 |
// DWARF3: "-debug-info-kind=constructor" "-dwarf-version=3" |
| 34 |
|
| 35 |
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -gdwarf-4 2>&1 | FileCheck --check-prefix=DWARF4 %s |
| 36 |
// DWARF4: "-debug-info-kind=constructor" "-dwarf-version=4" |
| 37 |
|
| 38 |
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Xassembler -gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2XASSEMBLER %s |
| 39 |
// DWARF2XASSEMBLER: "-debug-info-kind=constructor" "-dwarf-version=2" |
| 40 |
|
| 41 |
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2WA %s |
| 42 |
// DWARF2WA: "-debug-info-kind=constructor" "-dwarf-version=2" |
| 43 |
|
| 44 |
// A dwarf version number that driver can't parse is just stuffed in. |
| 45 |
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-gdwarf-huh 2>&1 | FileCheck --check-prefix=BOGODWARF %s |
| 46 |
// BOGODWARF: "-gdwarf-huh" |
| 47 |
|
| 48 |
// RUN: %clang -### -target x86_64--- -x assembler -c -integrated-as %s -I myincludedir 2>&1 | FileCheck --check-prefix=INCLUDEPATH %s |
| 49 |
// INCLUDEPATH: "-I" "myincludedir" |
| 50 |
|
| 51 |
// RUN: %clang -### -target x86_64--- -x assembler -c -fPIC -integrated-as %s 2>&1 | FileCheck --check-prefix=PIC %s |
| 52 |
// PIC: "-mrelocation-model" "pic" |
| 53 |
|
| 54 |
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-fdebug-compilation-dir,. 2>&1 | FileCheck --check-prefix=WA_DEBUGDIR %s |
| 55 |
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-fdebug-compilation-dir=. 2>&1 | FileCheck --check-prefix=WA_DEBUGDIR %s |
| 56 |
// WA_DEBUGDIR: "-fdebug-compilation-dir" "." |
| 57 |
|
| 58 |
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Xassembler -fdebug-compilation-dir -Xassembler . 2>&1 | FileCheck --check-prefix=XA_DEBUGDIR %s |
| 59 |
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Xassembler -fdebug-compilation-dir=. 2>&1 | FileCheck --check-prefix=XA_DEBUGDIR %s |
| 60 |
// XA_DEBUGDIR: "-fdebug-compilation-dir" "." |