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 \
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 // RUN: %clangxx -### --target=ve-unknown-linux-gnu \
30 // RUN: --sysroot %S/Inputs/basic_ve_tree %s \
31 // RUN: -ccc-install-dir %S/Inputs/basic_ve_tree/bin \
32 // RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
33 // RUN: -nostdlibinc 2>&1 | FileCheck -check-prefix=NOSTDLIBINC %s
34 // NOSTDLIBINC: "-cc1"
35 // NOSTDLIBINC-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
36 // NOSTDLIBINC-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
37 // NOSTDLIBINC-NOT: "-internal-isystem" "{{.*}}/bin/../include/ve-unknown-linux-gnu/c++/v1"
38 // NOSTDLIBINC-NOT: "-internal-isystem" "{{.*}}/bin/../include/c++/v1"
39 // NOSTDLIBINC-SAME: "-internal-isystem" "[[RESOURCE_DIR]]/include"
40 // NOSTDLIBINC-NOT: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
42 // RUN: %clangxx -### --target=ve-unknown-linux-gnu \
43 // RUN: --sysroot %S/Inputs/basic_ve_tree %s \
44 // RUN: -ccc-install-dir %S/Inputs/basic_ve_tree/bin \
45 // RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
46 // RUN: -nobuiltininc 2>&1 | FileCheck -check-prefix=NOBUILTININC %s
47 // NOBUILTININC: "-cc1"
48 // NOBUILTININC-SAME: "-nobuiltininc"
49 // NOBUILTININC-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
50 // NOBUILTININC-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
51 // NOBUILTININC-SAME: "-internal-isystem" "{{.*}}/bin/../include/ve-unknown-linux-gnu/c++/v1"
52 // NOBUILTININC-SAME: "-internal-isystem" "{{.*}}/bin/../include/c++/v1"
53 // NOBUILTININC-NOT: "-internal-isystem" "[[RESOURCE_DIR]]/include"
54 // NOBUILTININC-SAME: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
56 // RUN: %clangxx -### --target=ve-unknown-linux-gnu \
57 // RUN: --sysroot %S/Inputs/basic_ve_tree %s \
58 // RUN: -ccc-install-dir %S/Inputs/basic_ve_tree/bin \
59 // RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
60 // RUN: -nostdinc 2>&1 | FileCheck -check-prefix=NOSTDINC %s
62 // NOSTDINC-SAME: "-nobuiltininc"
63 // NOSTDINC-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
64 // NOSTDINC-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
65 // NOSTDINC-NOT: "-internal-isystem" "{{.*}}/bin/../include/ve-unknown-linux-gnu/c++/v1"
66 // NOSTDINC-NOT: "-internal-isystem" "{{.*}}/bin/../include/c++/v1"
67 // NOSTDINC-NOT: "-internal-isystem" "[[RESOURCE_DIR]]/include"
68 // NOSTDINC-NOT: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
70 // RUN: %clangxx -### --target=ve-unknown-linux-gnu \
71 // RUN: --sysroot %S/Inputs/basic_ve_tree %s \
72 // RUN: -ccc-install-dir %S/Inputs/basic_ve_tree/bin \
73 // RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
74 // RUN: -nostdinc++ 2>&1 | FileCheck -check-prefix=NOSTDINCXX %s
76 // NOSTDINCXX-SAME: "-nostdinc++"
77 // NOSTDINCXX-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
78 // NOSTDINCXX-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
79 // NOSTDINCXX-NOT: "-internal-isystem" "{{.*}}/bin/../include/ve-unknown-linux-gnu/c++/v1"
80 // NOSTDINCXX-NOT: "-internal-isystem" "{{.*}}/bin/../include/c++/v1"
81 // NOSTDINCXX-SAME: "-internal-isystem" "[[RESOURCE_DIR]]/include"
82 // NOSTDINCXX-SAME: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
84 ///-----------------------------------------------------------------------------
85 /// Checking environment variable NCC_CPLUS_INCLUDE_PATH
87 // RUN: env NCC_CPLUS_INCLUDE_PATH=/test/test %clangxx -### \
88 // RUN: --target=ve-unknown-linux-gnu %s \
89 // RUN: --sysroot %S/Inputs/basic_ve_tree \
90 // RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
91 // RUN: 2>&1 | FileCheck -check-prefix=DEFINCENV %s
94 // DEFINCENV-SAME: "-nostdsysteminc"
95 // DEFINCENV-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
96 // DEFINCENV-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
97 // DEFINCENV-SAME: "-internal-isystem" "/test/test"
98 // DEFINCENV-SAME: "-internal-isystem" "[[RESOURCE_DIR]]/include"
99 // DEFINCENV-SAME: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
101 ///-----------------------------------------------------------------------------
102 /// Checking -faddrsig
104 // RUN: %clangxx -### --target=ve-unknown-linux-gnu \
105 // RUN: %s 2>&1 | FileCheck -check-prefix=DEFADDRSIG %s
106 // DEFADDRSIG: "-cc1"
107 // DEFADDRSIG-NOT: "-faddrsig"
109 ///-----------------------------------------------------------------------------
110 /// Checking -fintegrated-as
112 // RUN: %clangxx -### --target=ve-unknown-linux-gnu \
113 // RUN: -x assembler -fuse-ld=ld %s 2>&1 | \
114 // RUN: FileCheck -check-prefix=AS %s
115 // RUN: %clangxx -### --target=ve-unknown-linux-gnu \
116 // RUN: -fno-integrated-as -x assembler -fuse-ld=ld %s 2>&1 | \
117 // RUN: FileCheck -check-prefix=NAS %s
125 ///-----------------------------------------------------------------------------
126 /// Checking default behavior:
129 /// - nld VE specific options
132 // RUN: %clangxx -### --target=ve-unknown-linux-gnu \
133 // RUN: --sysroot %S/Inputs/basic_ve_tree \
134 // RUN: -fuse-ld=ld \
135 // RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
136 // RUN: --unwindlib=none \
137 // RUN: --stdlib=libc++ %s 2>&1 | FileCheck -check-prefix=DEF %s
140 // DEF-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
141 // DEF-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
142 // DEF-SAME: "-exception-model=sjlj"
144 // DEF-SAME: "--sysroot=[[SYSROOT]]"
145 // DEF-SAME: "-dynamic-linker" "/opt/nec/ve/lib/ld-linux-ve.so.1"
146 // DEF-SAME: "[[SYSROOT]]/opt/nec/ve/lib/crt1.o"
147 // DEF-SAME: "[[SYSROOT]]/opt/nec/ve/lib/crti.o"
148 // DEF-SAME: "-z" "max-page-size=0x4000000"
149 // DEF-SAME: "[[RESOURCE_DIR]]/lib/linux/clang_rt.crtbegin-ve.o"
150 // DEF-SAME: "-lc++" "-lc++abi" "-lunwind" "-lpthread" "-ldl"
151 // DEF-SAME: "[[RESOURCE_DIR]]/lib/linux/libclang_rt.builtins-ve.a" "-lc"
152 // DEF-SAME: "[[RESOURCE_DIR]]/lib/linux/libclang_rt.builtins-ve.a"
153 // DEF-SAME: "[[RESOURCE_DIR]]/lib/linux/clang_rt.crtend-ve.o"
154 // DEF-SAME: "[[SYSROOT]]/opt/nec/ve/lib/crtn.o"