-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Add a testcase for riscv64-linux-android triple #116892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: AdityaK (hiraditya) ChangesFull diff: https://github.com/llvm/llvm-project/pull/116892.diff 1 Files Affected:
diff --git a/clang/test/Driver/android-ndk-standalone.cpp b/clang/test/Driver/android-ndk-standalone.cpp
index 2670a6707a96c9..3d18244c77107b 100644
--- a/clang/test/Driver/android-ndk-standalone.cpp
+++ b/clang/test/Driver/android-ndk-standalone.cpp
@@ -311,3 +311,19 @@
// CHECK-X86_64-GCC: Found candidate GCC installation: {{.*}}i686-linux-android{{[/\\]}}4.9
// CHECK-X86_64-GCC-NEXT: Found candidate GCC installation: {{.*}}x86_64-linux-android{{[/\\]}}4.9
// CHECK-X86_64-GCC-NEXT: Selected GCC installation: {{.*}}x86_64-linux-android{{[/\\]}}4.9
+//
+// RUN: %clang -### %s 2>&1 \
+// RUN: --target=riscv64-linux-android \
+// RUN: -march=rv64i \
+// RUN: --gcc-toolchain=%S/Inputs/basic_android_ndk_tree \
+// RUN: --sysroot=%S/Inputs/basic_android_ndk_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-RISCV %s
+// CHECK-RISCV: "-cc1"
+// CHECK-RISCV: "-internal-isystem" "{{.*}}/include/c++/v1"
+// CHECK-RISCV: "-internal-isystem" "{{.*}}/lib/clang/{{..}}/include"
+// CHECK-RISCV: "-internal-isystem" "{{.*}}/sysroot/usr/local/include"
+// CHECK-RISCV: "-internal-externc-isystem" "{{.*}}/sysroot/include"
+// CHECK-RISCV: "-internal-externc-isystem" "{{.*}}/sysroot/usr/include"
+// CHECK-RISCV: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-RISCV: "-L{{.*}}/sysroot/usr/lib"
+// CHECK-RISCV: "{{.*}}/lib/riscv64-unknown-linux-android/libclang_rt.builtins.a"
|
c53b4e4 to
264af86
Compare
| // RUN: %clang -### %s 2>&1 \ | ||
| // RUN: --target=riscv64-linux-android \ | ||
| // RUN: -march=rv64i \ | ||
| // RUN: --gcc-toolchain=%S/Inputs/basic_android_ndk_tree \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will defer to @DanAlbert. I am not sure if basic_android_ndk_tree is relevant for this test - if so, we should add riscv64 components to that subdir.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CHECK-ARM64 variant of the test has it. I think it's so the test can find the linker? As long as this test is essentially a copy of that with the target and arch names swapped out, it's at least not wronger than the existing tests.
| // CHECK: "-internal-externc-isystem" "{{.*}}/sysroot/include" | ||
| // CHECK: "-internal-externc-isystem" "{{.*}}/sysroot/usr/include" | ||
| // CHECK: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" | ||
| // CHECK: "{{.*}}ld.lld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should just be ld to match what is in clang/test/Driver/Inputs/basic_android_ndk_tree/arm-linux-androideabi/bin/. @DanAlbert and I discussed whether we can assume lld is the default since the Android toolchain defaults to lld but that's still undecided.
264af86 to
2974c9d
Compare
2974c9d to
ae11dfe
Compare
No description provided.