xref: /minix3/external/bsd/llvm/dist/clang/test/Driver/integrated-as.s (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc// RUN: %clang -### -c -integrated-as %s 2>&1 | FileCheck %s
2f4a2713aSLionel Sambuc// CHECK: cc1as
3f4a2713aSLionel Sambuc// CHECK-NOT: -relax-all
4f4a2713aSLionel Sambuc
5f4a2713aSLionel Sambuc// RUN: %clang -### -c -integrated-as -Wa,-L %s 2>&1 | FileCheck --check-prefix=OPT_L %s
6f4a2713aSLionel Sambuc// OPT_L: msave-temp-labels
7f4a2713aSLionel Sambuc
8f4a2713aSLionel Sambuc// RUN: %clang -### -target x86_64-linux-gnu -c -integrated-as %s -fsanitize=address 2>&1 %s | FileCheck --check-prefix=SANITIZE %s
9f4a2713aSLionel Sambuc// SANITIZE: argument unused during compilation: '-fsanitize=address'
10f4a2713aSLionel Sambuc
11f4a2713aSLionel Sambuc// Test that -I params in -Wa, and -Xassembler args are passed to integrated assembler
12*0a6a1f1dSLionel Sambuc// RUN: %clang -### -c -integrated-as %s -Wa,-I,foo_dir 2>&1 | FileCheck --check-prefix=WA_INCLUDE1 %s
13f4a2713aSLionel Sambuc// WA_INCLUDE1: cc1as
14f4a2713aSLionel Sambuc// WA_INCLUDE1: "-I" "foo_dir"
15f4a2713aSLionel Sambuc
16*0a6a1f1dSLionel Sambuc// RUN: %clang -### -c -integrated-as %s -Wa,-Ifoo_dir 2>&1 | FileCheck --check-prefix=WA_INCLUDE2 %s
17f4a2713aSLionel Sambuc// WA_INCLUDE2: cc1as
18f4a2713aSLionel Sambuc// WA_INCLUDE2: "-Ifoo_dir"
19f4a2713aSLionel Sambuc
20*0a6a1f1dSLionel Sambuc// RUN: %clang -### -c -integrated-as %s -Wa,-I -Wa,foo_dir 2>&1 | FileCheck --check-prefix=WA_INCLUDE3 %s
21f4a2713aSLionel Sambuc// WA_INCLUDE3: cc1as
22f4a2713aSLionel Sambuc// WA_INCLUDE3: "-I" "foo_dir"
23f4a2713aSLionel Sambuc
24*0a6a1f1dSLionel Sambuc// RUN: %clang -### -c -integrated-as %s -Xassembler -I -Xassembler foo_dir 2>&1 | FileCheck --check-prefix=XA_INCLUDE1 %s
25f4a2713aSLionel Sambuc// XA_INCLUDE1: cc1as
26f4a2713aSLionel Sambuc// XA_INCLUDE1: "-I" "foo_dir"
27f4a2713aSLionel Sambuc
28*0a6a1f1dSLionel Sambuc// RUN: %clang -### -c -integrated-as %s -Xassembler -Ifoo_dir 2>&1 | FileCheck --check-prefix=XA_INCLUDE2 %s
29f4a2713aSLionel Sambuc// XA_INCLUDE2: cc1as
30f4a2713aSLionel Sambuc// XA_INCLUDE2: "-Ifoo_dir"
31*0a6a1f1dSLionel Sambuc
32*0a6a1f1dSLionel Sambuc// RUN: %clang -### -c -integrated-as %s -gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2 %s
33*0a6a1f1dSLionel Sambuc// DWARF2: "-g" "-gdwarf-2"
34*0a6a1f1dSLionel Sambuc
35*0a6a1f1dSLionel Sambuc// RUN: %clang -### -c -integrated-as %s -gdwarf-3 2>&1 | FileCheck --check-prefix=DWARF3 %s
36*0a6a1f1dSLionel Sambuc// DWARF3: "-g" "-gdwarf-3"
37*0a6a1f1dSLionel Sambuc
38*0a6a1f1dSLionel Sambuc// RUN: %clang -### -c -integrated-as %s -gdwarf-4 2>&1 | FileCheck --check-prefix=DWARF4 %s
39*0a6a1f1dSLionel Sambuc// DWARF4: "-g" "-gdwarf-4"
40*0a6a1f1dSLionel Sambuc
41*0a6a1f1dSLionel Sambuc// RUN: %clang -### -c -integrated-as %s -Xassembler -gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2XASSEMBLER %s
42*0a6a1f1dSLionel Sambuc// DWARF2XASSEMBLER: "-gdwarf-2"
43*0a6a1f1dSLionel Sambuc
44*0a6a1f1dSLionel Sambuc// RUN: %clang -### -c -integrated-as %s -Wa,-gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2WA %s
45*0a6a1f1dSLionel Sambuc// DWARF2WA: "-gdwarf-2"
46