[llvm-branch-commits] [clang] 05d1729 - [VE] Optimize toolchain regression test
Kazushi Marukawa via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Dec 13 03:30:16 PST 2020
Author: Kazushi (Jam) Marukawa
Date: 2020-12-13T20:26:05+09:00
New Revision: 05d1729232cdff323cafd469532504aa85740967
URL: https://github.com/llvm/llvm-project/commit/05d1729232cdff323cafd469532504aa85740967
DIFF: https://github.com/llvm/llvm-project/commit/05d1729232cdff323cafd469532504aa85740967.diff
LOG: [VE] Optimize toolchain regression test
Optimize toolchain regression test for VE by removing not a useful test
(-fuse-init-array test) and merge several tests to one test which checks
default behavior of driver. Also add sysroot to reduce conflicts.
These are suggested in https://reviews.llvm.org/D92996.
Thank you so much.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D93084
Added:
clang/test/Driver/Inputs/basic_ve_tree/opt/nec/ve/lib/crt1.o
clang/test/Driver/Inputs/basic_ve_tree/opt/nec/ve/lib/crti.o
clang/test/Driver/Inputs/basic_ve_tree/opt/nec/ve/lib/crtn.o
clang/test/Driver/Inputs/basic_ve_tree/resource_dir/lib/linux/clang_rt.crtbegin-ve.o
clang/test/Driver/Inputs/basic_ve_tree/resource_dir/lib/linux/clang_rt.crtend-ve.o
clang/test/Driver/Inputs/basic_ve_tree/resource_dir/lib/linux/libclang_rt.builtins-ve.a
Modified:
clang/test/Driver/ve-toolchain.c
clang/test/Driver/ve-toolchain.cpp
Removed:
################################################################################
diff --git a/clang/test/Driver/Inputs/basic_ve_tree/opt/nec/ve/lib/crt1.o b/clang/test/Driver/Inputs/basic_ve_tree/opt/nec/ve/lib/crt1.o
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/clang/test/Driver/Inputs/basic_ve_tree/opt/nec/ve/lib/crti.o b/clang/test/Driver/Inputs/basic_ve_tree/opt/nec/ve/lib/crti.o
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/clang/test/Driver/Inputs/basic_ve_tree/opt/nec/ve/lib/crtn.o b/clang/test/Driver/Inputs/basic_ve_tree/opt/nec/ve/lib/crtn.o
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/clang/test/Driver/Inputs/basic_ve_tree/resource_dir/lib/linux/clang_rt.crtbegin-ve.o b/clang/test/Driver/Inputs/basic_ve_tree/resource_dir/lib/linux/clang_rt.crtbegin-ve.o
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/clang/test/Driver/Inputs/basic_ve_tree/resource_dir/lib/linux/clang_rt.crtend-ve.o b/clang/test/Driver/Inputs/basic_ve_tree/resource_dir/lib/linux/clang_rt.crtend-ve.o
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/clang/test/Driver/Inputs/basic_ve_tree/resource_dir/lib/linux/libclang_rt.builtins-ve.a b/clang/test/Driver/Inputs/basic_ve_tree/resource_dir/lib/linux/libclang_rt.builtins-ve.a
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/clang/test/Driver/ve-toolchain.c b/clang/test/Driver/ve-toolchain.c
index 0ca3c84373f3..ac925e470770 100644
--- a/clang/test/Driver/ve-toolchain.c
+++ b/clang/test/Driver/ve-toolchain.c
@@ -7,83 +7,93 @@
// RUN: %clang -### -g -target ve %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
// DWARF_VER: "-dwarf-version=4"
-///-----------------------------------------------------------------------------
-/// Checking dynamic-linker
-
-// RUN: %clang -### -target ve %s 2>&1 | FileCheck -check-prefix=DYNLINKER %s
-// DYNLINKER: nld{{.*}} "-dynamic-linker" "/opt/nec/ve/lib/ld-linux-ve.so.1"
-
-///-----------------------------------------------------------------------------
-/// Checking VE specific option
-
-// RUN: %clang -### -target ve %s 2>&1 | FileCheck -check-prefix=VENLDOPT %s
-// VENLDOPT: nld{{.*}} "-z" "max-page-size=0x4000000"
-
///-----------------------------------------------------------------------------
/// Checking include-path
-// RUN: %clang -### -target ve %s 2>&1 | FileCheck -check-prefix=DEFINC %s
+// RUN: %clang -### -target ve --sysroot %S/Inputs/basic_ve_tree %s \
+// RUN: -resource-dir=%S/Input/basic_ve_tree/resource_dir \
+// RUN: 2>&1 | FileCheck -check-prefix=DEFINC %s
// DEFINC: clang{{.*}} "-cc1"
-// DEFINC: "-nostdsysteminc"
-// DEFINC: "-internal-isystem" "{{.*}}/lib/clang/{{[0-9.]*}}/include"
-// DEFINC: "-internal-isystem" "/opt/nec/ve/include"
-
-// RUN: %clang -### -target ve %s -nostdlibinc 2>&1 | \
-// RUN: FileCheck -check-prefix=NOSTDLIBINC %s
+// DEFINC-SAME: "-nostdsysteminc"
+// DEFINC-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
+// DEFINC-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
+// DEFINC-SAME: "-internal-isystem" "[[RESOURCE_DIR]]/include"
+// DEFINC-SAME: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
+
+// RUN: %clang -### -target ve --sysroot %S/Inputs/basic_ve_tree %s \
+// RUN: -resource-dir=%S/Input/basic_ve_tree/resource_dir \
+// RUN: -nostdlibinc 2>&1 | FileCheck -check-prefix=NOSTDLIBINC %s
// NOSTDLIBINC: clang{{.*}} "-cc1"
-// NOSTDLIBINC: "-internal-isystem" "{{.*}}/lib/clang/{{[0-9.]*}}/include"
-// NOSTDLIBINC-NOT: "-internal-isystem" "/opt/nec/ve/include"
-
-// RUN: %clang -### -target ve %s -nobuiltininc 2>&1 | \
-// RUN: FileCheck -check-prefix=NOBUILTININC %s
+// NOSTDLIBINC-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
+// NOSTDLIBINC-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
+// NOSTDLIBINC-SAME: "-internal-isystem" "[[RESOURCE_DIR]]/include"
+// NOSTDLIBINC-NOT: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
+
+// RUN: %clang -### -target ve --sysroot %S/Inputs/basic_ve_tree %s \
+// RUN: -resource-dir=%S/Input/basic_ve_tree/resource_dir \
+// RUN: -nobuiltininc 2>&1 | FileCheck -check-prefix=NOBUILTININC %s
// NOBUILTININC: clang{{.*}} "-cc1"
-// NOBUILTININC: "-nobuiltininc"
-// NOBUILTININC-NOT: "-internal-isystem" "{{.*}}/lib/clang/{{[0-9.]*}}/include"
-// NOBUILTININC: "-internal-isystem" "/opt/nec/ve/include"
-
-// RUN: %clang -### -target ve %s -nostdinc 2>&1 | \
-// RUN: FileCheck -check-prefix=NOSTDINC %s
+// NOBUILTININC-SAME: "-nobuiltininc"
+// NOBUILTININC-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
+// NOBUILTININC-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
+// NOBUILTININC-NOT: "-internal-isystem" "[[RESOURCE_DIR]]/include"
+// NOBUILTININC-SAME: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
+
+// RUN: %clang -### -target ve --sysroot %S/Inputs/basic_ve_tree %s \
+// RUN: -resource-dir=%S/Input/basic_ve_tree/resource_dir \
+// RUN: -nostdinc 2>&1 | FileCheck -check-prefix=NOSTDINC %s
// NOSTDINC: clang{{.*}} "-cc1"
-// NOSTDINC: "-nobuiltininc"
-// NOSTDINC-NOT: "-internal-isystem" "{{.*}}/lib/clang/{{[0-9.]*}}/include"
-// NOSTDINC-NOT: "-internal-isystem" "/opt/nec/ve/include"
-
-///-----------------------------------------------------------------------------
-/// Checking -fuse-init-array
-
-// RUN: %clang -### -target ve %s 2>&1 | FileCheck -check-prefix=DEFINITARRAY %s
-// DEFINITARRAY: clang{{.*}} "-cc1"
-// DEFINITARRAY-NOT: "-fuse-init-array"
-
-// RUN: %clang -### -target ve %s -fno-use-init-array 2>&1 | \
-// RUN: FileCheck -check-prefix=NOTINITARRAY %s
-// NOTINITARRAY: clang{{.*}} "-cc1"
-// NOTINITARRAY: "-fno-use-init-array"
+// NOSTDINC-SAME: "-nobuiltininc"
+// NOSTDINC-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
+// NOSTDINC-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
+// NOSTDINC-NOT: "-internal-isystem" "[[RESOURCE_DIR]]/include"
+// NOSTDINC-NOT: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
///-----------------------------------------------------------------------------
/// Checking -faddrsig
-// RUN: %clang -### -target ve %s 2>&1 | FileCheck -check-prefix=DEFADDESIG %s
-// DEFADDESIG: clang{{.*}} "-cc1"
-// DEFADDESIG-NOT: "-faddrsig"
+// RUN: %clang -### -target ve %s 2>&1 | FileCheck -check-prefix=DEFADDRSIG %s
+// DEFADDRSIG: clang{{.*}} "-cc1"
+// DEFADDRSIG-NOT: "-faddrsig"
///-----------------------------------------------------------------------------
-/// Checking exceptions
-
-// RUN: %clang -### -target ve %s 2>&1 | FileCheck -check-prefix=DEFEXCEPTION %s
-// DEFEXCEPTION: clang{{.*}} "-cc1"
-// DEFEXCEPTION: "-fsjlj-exceptions"
-
-///-----------------------------------------------------------------------------
-/// Passing -fintegrated-as
+/// Checking -fintegrated-as
// RUN: %clang -### -target ve -x assembler %s 2>&1 | \
-// RUN: FileCheck -check-prefix=AS_LINK %s
+// RUN: FileCheck -check-prefix=AS %s
// RUN: %clang -### -target ve -fno-integrated-as -x assembler %s 2>&1 | \
-// RUN: FileCheck -check-prefix=NAS_LINK %s
+// RUN: FileCheck -check-prefix=NAS %s
-// AS_LINK: clang{{.*}} "-cc1as"
-// AS_LINK: nld{{.*}}
+// AS: clang{{.*}} "-cc1as"
+// AS: nld{{.*}}
-// NAS_LINK: nas{{.*}}
-// NAS_LINK: nld{{.*}}
+// NAS: nas{{.*}}
+// NAS: nld{{.*}}
+
+///-----------------------------------------------------------------------------
+/// Checking default behavior:
+/// - dynamic linker
+/// - library paths
+/// - nld VE specific options
+/// - sjlj exception
+
+// RUN: %clang -### -target ve-unknown-linux-gnu \
+// RUN: --sysroot %S/Inputs/basic_ve_tree \
+// RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
+// RUN: %s 2>&1 | FileCheck -check-prefix=DEF %s
+
+// DEF: clang{{.*}}" "-cc1"
+// DEF-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
+// DEF-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
+// DEF-SAME: "-fsjlj-exceptions"
+// DEF: nld"
+// DEF-SAME: "--sysroot=[[SYSROOT]]"
+// DEF-SAME: "-dynamic-linker" "/opt/nec/ve/lib/ld-linux-ve.so.1"
+// DEF-SAME: "[[SYSROOT]]/opt/nec/ve/lib/crt1.o"
+// DEF-SAME: "[[SYSROOT]]/opt/nec/ve/lib/crti.o"
+// DEF-SAME: "-z" "max-page-size=0x4000000"
+// DEF-SAME: "[[RESOURCE_DIR]]/lib/linux/clang_rt.crtbegin-ve.o"
+// DEF-SAME: "[[RESOURCE_DIR]]/lib/linux/libclang_rt.builtins-ve.a" "-lc"
+// DEF-SAME: "[[RESOURCE_DIR]]/lib/linux/libclang_rt.builtins-ve.a"
+// DEF-SAME: "[[RESOURCE_DIR]]/lib/linux/clang_rt.crtend-ve.o"
+// DEF-SAME: "[[SYSROOT]]/opt/nec/ve/lib/crtn.o"
diff --git a/clang/test/Driver/ve-toolchain.cpp b/clang/test/Driver/ve-toolchain.cpp
index 36a23aa87f98..ffa9a044d927 100644
--- a/clang/test/Driver/ve-toolchain.cpp
+++ b/clang/test/Driver/ve-toolchain.cpp
@@ -7,111 +7,125 @@
// RUN: %clangxx -### -g -target ve %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
// DWARF_VER: "-dwarf-version=4"
-///-----------------------------------------------------------------------------
-/// Checking VE specific option
-
-// RUN: %clangxx -### -target ve %s 2>&1 | FileCheck -check-prefix=VENLDOPT %s
-// VENLDOPT: nld{{.*}} "-z" "max-page-size=0x4000000"
-
///-----------------------------------------------------------------------------
/// Checking include-path
-// RUN: %clangxx -### -target ve %s 2>&1 | FileCheck -check-prefix=DEFINC %s
+// RUN: %clangxx -### -target ve --sysroot %S/Inputs/basic_ve_tree %s \
+// RUN: -resource-dir=%S/Input/basic_ve_tree/resource_dir \
+// RUN: 2>&1 | FileCheck -check-prefix=DEFINC %s
// DEFINC: clang{{.*}} "-cc1"
-// DEFINC: "-nostdsysteminc"
-// DEFINC: "-internal-isystem" "{{.*}}/lib/clang/{{[0-9.]*}}/include/c++/v1"
-// DEFINC: "-internal-isystem" "{{.*}}/lib/clang/{{[0-9.]*}}/include"
-// DEFINC: "-internal-isystem" "/opt/nec/ve/include"
-
-// RUN: %clangxx -### -target ve %s -nostdlibinc 2>&1 | \
-// RUN: FileCheck -check-prefix=NOSTDLIBINC %s
+// DEFINC-SAME: "-nostdsysteminc"
+// DEFINC-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
+// DEFINC-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
+// DEFINC-SAME: "-internal-isystem" "[[RESOURCE_DIR]]/include/c++/v1"
+// DEFINC-SAME: "-internal-isystem" "[[RESOURCE_DIR]]/include"
+// DEFINC-SAME: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
+
+// RUN: %clangxx -### -target ve --sysroot %S/Inputs/basic_ve_tree %s \
+// RUN: -resource-dir=%S/Input/basic_ve_tree/resource_dir \
+// RUN: -nostdlibinc 2>&1 | FileCheck -check-prefix=NOSTDLIBINC %s
// NOSTDLIBINC: clang{{.*}} "-cc1"
-// NOSTDLIBINC-NOT: "-internal-isystem" "{{.*}}/lib/clang/{{[0-9.]*}}/include/c++/v1"
-// NOSTDLIBINC: "-internal-isystem" "{{.*}}/lib/clang/{{[0-9.]*}}/include"
-// NOSTDLIBINC-NOT: "-internal-isystem" "/opt/nec/ve/include"
-
-// RUN: %clangxx -### -target ve %s -nobuiltininc 2>&1 | \
-// RUN: FileCheck -check-prefix=NOBUILTININC %s
+// NOSTDLIBINC-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
+// NOSTDLIBINC-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
+// NOSTDLIBINC-NOT: "-internal-isystem" "[[RESOURCE_DIR]]/include/c++/v1"
+// NOSTDLIBINC-SAME: "-internal-isystem" "[[RESOURCE_DIR]]/include"
+// NOSTDLIBINC-NOT: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
+
+// RUN: %clangxx -### -target ve --sysroot %S/Inputs/basic_ve_tree %s \
+// RUN: -resource-dir=%S/Input/basic_ve_tree/resource_dir \
+// RUN: -nobuiltininc 2>&1 | FileCheck -check-prefix=NOBUILTININC %s
// NOBUILTININC: clang{{.*}} "-cc1"
-// NOBUILTININC: "-nobuiltininc"
-// NOBUILTININC: "-internal-isystem" "{{.*}}/lib/clang/{{[0-9.]*}}/include/c++/v1"
-// NOBUILTININC-NOT: "-internal-isystem" "{{.*}}/lib/clang/{{[0-9.]*}}/include"
-// NOBUILTININC: "-internal-isystem" "/opt/nec/ve/include"
-
-// RUN: %clangxx -### -target ve %s -nostdinc 2>&1 | \
-// RUN: FileCheck -check-prefix=NOSTDINC %s
+// NOBUILTININC-SAME: "-nobuiltininc"
+// NOBUILTININC-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
+// NOBUILTININC-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
+// NOBUILTININC-SAME: "-internal-isystem" "[[RESOURCE_DIR]]/include/c++/v1"
+// NOBUILTININC-NOT: "-internal-isystem" "[[RESOURCE_DIR]]/include"
+// NOBUILTININC-SAME: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
+
+// RUN: %clangxx -### -target ve --sysroot %S/Inputs/basic_ve_tree %s \
+// RUN: -resource-dir=%S/Input/basic_ve_tree/resource_dir \
+// RUN: -nostdinc 2>&1 | FileCheck -check-prefix=NOSTDINC %s
// NOSTDINC: clang{{.*}} "-cc1"
-// NOSTDINC: "-nobuiltininc"
-// NOSTDINC-NOT: "-internal-isystem" "{{.*}}/lib/clang/{{[0-9.]*}}/include/c++/v1"
-// NOSTDINC-NOT: "-internal-isystem" "{{.*}}/lib/clang/{{[0-9.]*}}/include"
-// NOSTDINC-NOT: "-internal-isystem" "/opt/nec/ve/include"
-
-// RUN: %clangxx -### -target ve %s -nostdinc++ 2>&1 | \
-// RUN: FileCheck -check-prefix=NOSTDINCXX %s
+// NOSTDINC-SAME: "-nobuiltininc"
+// NOSTDINC-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
+// NOSTDINC-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
+// NOSTDINC-NOT: "-internal-isystem" "[[RESOURCE_DIR]]/include/c++/v1"
+// NOSTDINC-NOT: "-internal-isystem" "[[RESOURCE_DIR]]/include"
+// NOSTDINC-NOT: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
+
+// RUN: %clangxx -### -target ve --sysroot %S/Inputs/basic_ve_tree %s \
+// RUN: -resource-dir=%S/Input/basic_ve_tree/resource_dir \
+// RUN: -nostdinc++ 2>&1 | FileCheck -check-prefix=NOSTDINCXX %s
// NOSTDINCXX: clang{{.*}} "-cc1"
-// NOSTDINCXX: "-nostdinc++"
-// NOSTDINCXX-NOT: "-internal-isystem" "{{.*}}/lib/clang/{{[0-9.]*}}/include/c++/v1"
-// NOSTDINCXX: "-internal-isystem" "{{.*}}/lib/clang/{{[0-9.]*}}/include"
-// NOSTDINCXX: "-internal-isystem" "/opt/nec/ve/include"
+// NOSTDINCXX-SAME: "-nostdinc++"
+// NOSTDINCXX-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
+// NOSTDINCXX-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
+// NOSTDINCXX-NOT: "-internal-isystem" "[[RESOURCE_DIR]]/include/c++/v1"
+// NOSTDINCXX-SAME: "-internal-isystem" "[[RESOURCE_DIR]]/include"
+// NOSTDINCXX-SAME: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
///-----------------------------------------------------------------------------
/// Checking environment variable NCC_CPLUS_INCLUDE_PATH
// RUN: env NCC_CPLUS_INCLUDE_PATH=/test/test %clangxx -### -target ve %s \
-// RUN: 2>&1 | FileCheck -check-prefix=DEFINCENV %s
+// RUN: --sysroot %S/Inputs/basic_ve_tree \
+// RUN: -resource-dir=%S/Input/basic_ve_tree/resource_dir \
+// RUN: 2>&1 | FileCheck -check-prefix=DEFINCENV %s
// DEFINCENV: clang{{.*}} "-cc1"
-// DEFINCENV: "-nostdsysteminc"
-// DEFINCENV: "-internal-isystem" "/test/test"
-// DEFINCENV: "-internal-isystem" "{{.*}}/lib/clang/{{[0-9.]*}}/include"
-// DEFINCENV: "-internal-isystem" "/opt/nec/ve/include"
-
-///-----------------------------------------------------------------------------
-/// Checking -fuse-init-array
-
-// RUN: %clangxx -### -target ve %s 2>&1 | FileCheck -check-prefix=DEFINITARRAY %s
-// DEFINITARRAY: clang{{.*}} "-cc1"
-// DEFINITARRAY-NOT: "-fuse-init-array"
-
-// RUN: %clangxx -### -target ve %s -fno-use-init-array 2>&1 | \
-// RUN: FileCheck -check-prefix=NOTINITARRAY %s
-// NOTINITARRAY: clang{{.*}} "-cc1"
-// NOTINITARRAY: "-fno-use-init-array"
+// DEFINCENV-SAME: "-nostdsysteminc"
+// DEFINCENV-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
+// DEFINCENV-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
+// DEFINCENV-SAME: "-internal-isystem" "/test/test"
+// DEFINCENV-SAME: "-internal-isystem" "[[RESOURCE_DIR]]/include"
+// DEFINCENV-SAME: "-internal-isystem" "[[SYSROOT]]/opt/nec/ve/include"
///-----------------------------------------------------------------------------
/// Checking -faddrsig
-// RUN: %clangxx -### -target ve %s 2>&1 | FileCheck -check-prefix=DEFADDESIG %s
-// DEFADDESIG: clang{{.*}} "-cc1"
-// DEFADDESIG-NOT: "-faddrsig"
-
-///-----------------------------------------------------------------------------
-/// Checking exceptions
-
-// RUN: %clangxx -### -target ve %s 2>&1 | FileCheck -check-prefix=DEFEXCEPTION %s
-// DEFEXCEPTION: clang{{.*}} "-cc1"
-// DEFEXCEPTION: "-fsjlj-exceptions"
+// RUN: %clangxx -### -target ve %s 2>&1 | FileCheck -check-prefix=DEFADDRSIG %s
+// DEFADDRSIG: clang{{.*}} "-cc1"
+// DEFADDRSIG-NOT: "-faddrsig"
///-----------------------------------------------------------------------------
-/// Passing -fintegrated-as
+/// Checking -fintegrated-as
// RUN: %clangxx -### -target ve -x assembler %s 2>&1 | \
-// RUN: FileCheck -check-prefix=AS_LINK %s
+// RUN: FileCheck -check-prefix=AS %s
// RUN: %clangxx -### -target ve -fno-integrated-as -x assembler %s 2>&1 | \
-// RUN: FileCheck -check-prefix=NAS_LINK %s
+// RUN: FileCheck -check-prefix=NAS %s
-// AS_LINK: clang{{.*}} "-cc1as"
-// AS_LINK: nld{{.*}}
+// AS: clang{{.*}} "-cc1as"
+// AS: nld{{.*}}
-// NAS_LINK: nas{{.*}}
-// NAS_LINK: nld{{.*}}
+// NAS: nas{{.*}}
+// NAS: nld{{.*}}
///-----------------------------------------------------------------------------
-/// Checking default libraries
-
-// RUN: %clangxx -### -target ve --stdlib=c++ %s 2>&1 | \
-// RUN: FileCheck -check-prefix=LINK %s
-
-// LINK: nld"
-// LINK-SAME: "-dynamic-linker" "/opt/nec/ve/lib/ld-linux-ve.so.1"
-// LINK-SAME: "{{[^"]*}}crt1.o" "{{[^"]*}}crti.o"{{.*}}"crtbegin.o"{{.*}}"-lc++" "-lc++abi" "-lunwind" "-lpthread" "-ldl"
+/// Checking default behavior:
+/// - dynamic linker
+/// - library paths
+/// - nld VE specific options
+/// - sjlj exception
+
+// RUN: %clangxx -### -target ve-unknown-linux-gnu \
+// RUN: --sysroot %S/Inputs/basic_ve_tree \
+// RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
+// RUN: --stdlib=c++ %s 2>&1 | FileCheck -check-prefix=DEF %s
+
+// DEF: clang{{.*}}" "-cc1"
+// DEF-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
+// DEF-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
+// DEF-SAME: "-fsjlj-exceptions"
+// DEF: nld"
+// DEF-SAME: "--sysroot=[[SYSROOT]]"
+// DEF-SAME: "-dynamic-linker" "/opt/nec/ve/lib/ld-linux-ve.so.1"
+// DEF-SAME: "[[SYSROOT]]/opt/nec/ve/lib/crt1.o"
+// DEF-SAME: "[[SYSROOT]]/opt/nec/ve/lib/crti.o"
+// DEF-SAME: "-z" "max-page-size=0x4000000"
+// DEF-SAME: "[[RESOURCE_DIR]]/lib/linux/clang_rt.crtbegin-ve.o"
+// DEF-SAME: "-lc++" "-lc++abi" "-lunwind" "-lpthread" "-ldl"
+// DEF-SAME: "[[RESOURCE_DIR]]/lib/linux/libclang_rt.builtins-ve.a" "-lc"
+// DEF-SAME: "[[RESOURCE_DIR]]/lib/linux/libclang_rt.builtins-ve.a"
+// DEF-SAME: "[[RESOURCE_DIR]]/lib/linux/clang_rt.crtend-ve.o"
+// DEF-SAME: "[[SYSROOT]]/opt/nec/ve/lib/crtn.o"
More information about the llvm-branch-commits
mailing list