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: %clangxx -### -g --target=ve-unknown-linux-gnu \
9 // RUN: %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
10 // DWARF_VER: "-dwarf-version=5"
12 ///-----------------------------------------------------------------------------
13 /// Checking include-path
15 // RUN: %clangxx -### --target=ve-unknown-linux-gnu \
16 // RUN: --sysroot %S/Inputs/basic_ve_tree %s -fuse-ld=ld \
17 // RUN: -ccc-install-dir %S/Inputs/basic_ve_tree/bin \
18 // RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
19 // RUN: 2>&1 | FileCheck -check-prefix=DEFINC %s
21 // DEFINC-SAME: "-nostdsysteminc"
22 // DEFINC-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
23 // DEFINC-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
24 // DEFINC-SAME: "-internal-isystem" "{{.*}}/bin/../include/ve-unknown-linux-gnu/c++/v1"
25 // DEFINC-SAME: "-internal-isystem" "{{.*}}/bin/../include/c++/v1"
26 // DEFINC-SAME: "-internal-isystem" "[[RESOURCE_DIR]]/include"
27 // DEFINC-SAME: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
29 // DEFINC-SAME: "-rpath" "[[SYSROOT]]/bin/../lib/ve-unknown-linux-gnu"
31 // RUN: %clangxx -### --target=ve-unknown-linux-gnu \
32 // RUN: --sysroot %S/Inputs/basic_ve_tree %s \
33 // RUN: -ccc-install-dir %S/Inputs/basic_ve_tree/bin \
34 // RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
35 // RUN: -nostdlibinc 2>&1 | FileCheck -check-prefix=NOSTDLIBINC %s
36 // NOSTDLIBINC: "-cc1"
37 // NOSTDLIBINC-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
38 // NOSTDLIBINC-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
39 // NOSTDLIBINC-NOT: "-internal-isystem" "{{.*}}/bin/../include/ve-unknown-linux-gnu/c++/v1"
40 // NOSTDLIBINC-NOT: "-internal-isystem" "{{.*}}/bin/../include/c++/v1"
41 // NOSTDLIBINC-SAME: "-internal-isystem" "[[RESOURCE_DIR]]/include"
42 // NOSTDLIBINC-NOT: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
44 // RUN: %clangxx -### --target=ve-unknown-linux-gnu \
45 // RUN: --sysroot %S/Inputs/basic_ve_tree %s \
46 // RUN: -ccc-install-dir %S/Inputs/basic_ve_tree/bin \
47 // RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
48 // RUN: -nobuiltininc 2>&1 | FileCheck -check-prefix=NOBUILTININC %s
49 // NOBUILTININC: "-cc1"
50 // NOBUILTININC-SAME: "-nobuiltininc"
51 // NOBUILTININC-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
52 // NOBUILTININC-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
53 // NOBUILTININC-SAME: "-internal-isystem" "{{.*}}/bin/../include/ve-unknown-linux-gnu/c++/v1"
54 // NOBUILTININC-SAME: "-internal-isystem" "{{.*}}/bin/../include/c++/v1"
55 // NOBUILTININC-NOT: "-internal-isystem" "[[RESOURCE_DIR]]/include"
56 // NOBUILTININC-SAME: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
58 // RUN: %clangxx -### --target=ve-unknown-linux-gnu \
59 // RUN: --sysroot %S/Inputs/basic_ve_tree %s \
60 // RUN: -ccc-install-dir %S/Inputs/basic_ve_tree/bin \
61 // RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
62 // RUN: -nostdinc 2>&1 | FileCheck -check-prefix=NOSTDINC %s
64 // NOSTDINC-SAME: "-nobuiltininc"
65 // NOSTDINC-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
66 // NOSTDINC-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
67 // NOSTDINC-NOT: "-internal-isystem" "{{.*}}/bin/../include/ve-unknown-linux-gnu/c++/v1"
68 // NOSTDINC-NOT: "-internal-isystem" "{{.*}}/bin/../include/c++/v1"
69 // NOSTDINC-NOT: "-internal-isystem" "[[RESOURCE_DIR]]/include"
70 // NOSTDINC-NOT: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
72 // RUN: %clangxx -### --target=ve-unknown-linux-gnu \
73 // RUN: --sysroot %S/Inputs/basic_ve_tree %s \
74 // RUN: -ccc-install-dir %S/Inputs/basic_ve_tree/bin \
75 // RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
76 // RUN: -nostdinc++ 2>&1 | FileCheck -check-prefix=NOSTDINCXX %s
78 // NOSTDINCXX-SAME: "-nostdinc++"
79 // NOSTDINCXX-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
80 // NOSTDINCXX-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
81 // NOSTDINCXX-NOT: "-internal-isystem" "{{.*}}/bin/../include/ve-unknown-linux-gnu/c++/v1"
82 // NOSTDINCXX-NOT: "-internal-isystem" "{{.*}}/bin/../include/c++/v1"
83 // NOSTDINCXX-SAME: "-internal-isystem" "[[RESOURCE_DIR]]/include"
84 // NOSTDINCXX-SAME: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
86 ///-----------------------------------------------------------------------------
87 /// Checking environment variable NCC_CPLUS_INCLUDE_PATH
89 // RUN: env NCC_CPLUS_INCLUDE_PATH=/test/test %clangxx -### \
90 // RUN: --target=ve-unknown-linux-gnu %s \
91 // RUN: --sysroot %S/Inputs/basic_ve_tree \
92 // RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
93 // RUN: 2>&1 | FileCheck -check-prefix=DEFINCENV %s
96 // DEFINCENV-SAME: "-nostdsysteminc"
97 // DEFINCENV-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
98 // DEFINCENV-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
99 // DEFINCENV-SAME: "-internal-isystem" "/test/test"
100 // DEFINCENV-SAME: "-internal-isystem" "[[RESOURCE_DIR]]/include"
101 // DEFINCENV-SAME: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
103 ///-----------------------------------------------------------------------------
104 /// Checking -faddrsig
106 // RUN: %clangxx -### --target=ve-unknown-linux-gnu \
107 // RUN: %s 2>&1 | FileCheck -check-prefix=DEFADDRSIG %s
108 // DEFADDRSIG: "-cc1"
109 // DEFADDRSIG-NOT: "-faddrsig"
111 ///-----------------------------------------------------------------------------
112 /// Checking -fintegrated-as
114 // RUN: %clangxx -### --target=ve-unknown-linux-gnu \
115 // RUN: -x assembler -fuse-ld=ld %s 2>&1 | \
116 // RUN: FileCheck -check-prefix=AS %s
117 // RUN: %clangxx -### --target=ve-unknown-linux-gnu \
118 // RUN: -fno-integrated-as -x assembler -fuse-ld=ld %s 2>&1 | \
119 // RUN: FileCheck -check-prefix=NAS %s
127 ///-----------------------------------------------------------------------------
128 /// Checking default behavior:
131 /// - nld VE specific options
134 // RUN: %clangxx -### --target=ve-unknown-linux-gnu \
135 // RUN: --sysroot %S/Inputs/basic_ve_tree \
136 // RUN: -fuse-ld=ld \
137 // RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
138 // RUN: --unwindlib=none \
139 // RUN: --stdlib=libc++ %s 2>&1 | FileCheck -check-prefix=DEF %s
142 // DEF-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
143 // DEF-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
144 // DEF-SAME: "-exception-model=sjlj"
146 // DEF-SAME: "--sysroot=[[SYSROOT]]"
147 // DEF-SAME: "-dynamic-linker" "/opt/nec/ve/lib/ld-linux-ve.so.1"
148 // DEF-SAME: "[[SYSROOT]]/opt/nec/ve/lib/crt1.o"
149 // DEF-SAME: "[[SYSROOT]]/opt/nec/ve/lib/crti.o"
150 // DEF-SAME: "-z" "max-page-size=0x4000000"
151 // DEF-SAME: "[[RESOURCE_DIR]]/lib/ve-unknown-linux-gnu/clang_rt.crtbegin.o"
152 // DEF-SAME: "-lc++" "-lc++abi" "-lunwind" "-lpthread" "-ldl"
153 // DEF-SAME: "[[RESOURCE_DIR]]/lib/ve-unknown-linux-gnu/libclang_rt.builtins.a" "-lc"
154 // DEF-SAME: "[[RESOURCE_DIR]]/lib/ve-unknown-linux-gnu/libclang_rt.builtins.a"
155 // DEF-SAME: "[[RESOURCE_DIR]]/lib/ve-unknown-linux-gnu/clang_rt.crtend.o"
156 // DEF-SAME: "[[SYSROOT]]/opt/nec/ve/lib/crtn.o"