Skip to content

Commit f5ef9c9

Browse files
[clang] add llvm abi support
1 parent 70965ef commit f5ef9c9

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

clang/lib/Driver/Driver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1531,7 +1531,7 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
15311531

15321532
// Check if the environment version is valid except wasm case.
15331533
llvm::Triple Triple = TC.getTriple();
1534-
if (!Triple.isWasm()) {
1534+
if (!Triple.isWasm() && Triple.getEnvironment() != llvm::Triple::LLVM) {
15351535
StringRef TripleVersionName = Triple.getEnvironmentVersionString();
15361536
StringRef TripleObjectFormat =
15371537
Triple.getObjectFormatTypeName(Triple.getObjectFormat());

clang/test/Driver/invalid-version.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,13 @@
2929
// RUN: FileCheck --check-prefix=CHECK-WASM1 %s
3030

3131
// CHECK-WASM1: "-triple" "wasm32-unknown-wasi-pthread"
32+
33+
// RUN: %clang --target=aarch64-unknown-linux-llvm -c %s -### 2>&1 | \
34+
// RUN: FileCheck --check-prefix=CHECK-AARCH64-LLVM %s
35+
36+
// CHECK-AARCH64-LLVM: "-triple" "aarch64-unknown-linux-llvm"
37+
38+
// RUN: %clang --target=x86_64-unknown-linux-llvm -c %s -### 2>&1 | \
39+
// RUN: FileCheck --check-prefix=CHECK-X86-64-LLVM %s
40+
41+
// CHECK-X86-64-LLVM: "-triple" "x86_64-unknown-linux-llvm"

0 commit comments

Comments
 (0)