Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Driver / ve-toolchain.c
blob078341eb1202d6dc9c23950c54408eecc94b8971
1 /// Check the behavior of toolchain for NEC Aurora VE
2 /// REQUIRES: ve-registered-target
3 /// UNSUPPORTED: system-windows
5 ///-----------------------------------------------------------------------------
6 /// Checking dwarf-version
8 // RUN: %clang -### -g --target=ve %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
9 // DWARF_VER: "-dwarf-version=5"
11 ///-----------------------------------------------------------------------------
12 /// Checking include-path
14 // RUN: %clang -### --target=ve --sysroot %S/Inputs/basic_ve_tree %s \
15 // RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
16 // RUN: 2>&1 | FileCheck -check-prefix=DEFINC %s
17 // DEFINC: "-cc1"
18 // DEFINC-SAME: "-nostdsysteminc"
19 // DEFINC-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
20 // DEFINC-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
21 // DEFINC-SAME: "-internal-isystem" "[[RESOURCE_DIR]]/include"
22 // DEFINC-SAME: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
24 // RUN: %clang -### --target=ve --sysroot %S/Inputs/basic_ve_tree %s \
25 // RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
26 // RUN: -nostdlibinc 2>&1 | FileCheck -check-prefix=NOSTDLIBINC %s
27 // NOSTDLIBINC: "-cc1"
28 // NOSTDLIBINC-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
29 // NOSTDLIBINC-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
30 // NOSTDLIBINC-SAME: "-internal-isystem" "[[RESOURCE_DIR]]/include"
31 // NOSTDLIBINC-NOT: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
33 // RUN: %clang -### --target=ve --sysroot %S/Inputs/basic_ve_tree %s \
34 // RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
35 // RUN: -nobuiltininc 2>&1 | FileCheck -check-prefix=NOBUILTININC %s
36 // NOBUILTININC: "-cc1"
37 // NOBUILTININC-SAME: "-nobuiltininc"
38 // NOBUILTININC-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
39 // NOBUILTININC-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
40 // NOBUILTININC-NOT: "-internal-isystem" "[[RESOURCE_DIR]]/include"
41 // NOBUILTININC-SAME: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
43 // RUN: %clang -### --target=ve --sysroot %S/Inputs/basic_ve_tree %s \
44 // RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
45 // RUN: -nostdinc 2>&1 | FileCheck -check-prefix=NOSTDINC %s
46 // NOSTDINC: "-cc1"
47 // NOSTDINC-SAME: "-nobuiltininc"
48 // NOSTDINC-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
49 // NOSTDINC-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
50 // NOSTDINC-NOT: "-internal-isystem" "[[RESOURCE_DIR]]/include"
51 // NOSTDINC-NOT: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
53 ///-----------------------------------------------------------------------------
54 /// Checking -faddrsig
56 // RUN: %clang -### --target=ve %s 2>&1 | FileCheck -check-prefix=DEFADDRSIG %s
57 // DEFADDRSIG: "-cc1"
58 // DEFADDRSIG-NOT: "-faddrsig"
60 ///-----------------------------------------------------------------------------
61 /// Checking -fintegrated-as
63 // RUN: %clang -### --target=ve \
64 // RUN: -x assembler -fuse-ld=ld %s 2>&1 | \
65 // RUN: FileCheck -check-prefix=AS %s
66 // RUN: %clang -### --target=ve \
67 // RUN: -fno-integrated-as -fuse-ld=ld -x assembler %s 2>&1 | \
68 // RUN: FileCheck -check-prefix=NAS %s
70 // AS: "-cc1as"
71 // AS: nld{{.*}}
73 // NAS: nas{{.*}}
74 // NAS: nld{{.*}}
76 ///-----------------------------------------------------------------------------
77 /// Checking default behavior:
78 /// - dynamic linker
79 /// - library paths
80 /// - nld VE specific options
81 /// - sjlj exception
83 // RUN: %clang -### --target=ve-unknown-linux-gnu \
84 // RUN: --sysroot %S/Inputs/basic_ve_tree \
85 // RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
86 // RUN: --unwindlib=none \
87 // RUN: -fuse-ld=ld \
88 // RUN: %s 2>&1 | FileCheck -check-prefix=DEF %s
90 // DEF: clang{{.*}}" "-cc1"
91 // DEF-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
92 // DEF-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
93 // DEF-SAME: "-exception-model=sjlj"
94 // DEF: nld"
95 // DEF-SAME: "--sysroot=[[SYSROOT]]"
96 // DEF-SAME: "-dynamic-linker" "/opt/nec/ve/lib/ld-linux-ve.so.1"
97 // DEF-SAME: "[[SYSROOT]]/opt/nec/ve/lib/crt1.o"
98 // DEF-SAME: "[[SYSROOT]]/opt/nec/ve/lib/crti.o"
99 // DEF-SAME: "-z" "max-page-size=0x4000000"
100 // DEF-SAME: "[[RESOURCE_DIR]]/lib/ve-unknown-linux-gnu/clang_rt.crtbegin.o"
101 // DEF-SAME: "[[RESOURCE_DIR]]/lib/ve-unknown-linux-gnu/libclang_rt.builtins.a" "-lc"
102 // DEF-SAME: "[[RESOURCE_DIR]]/lib/ve-unknown-linux-gnu/libclang_rt.builtins.a"
103 // DEF-SAME: "[[RESOURCE_DIR]]/lib/ve-unknown-linux-gnu/clang_rt.crtend.o"
104 // DEF-SAME: "[[SYSROOT]]/opt/nec/ve/lib/crtn.o"