[libcxx-commits] [clang] [libcxx] [llvm] Triple::normalize: Use none as OS for XX-none-ABI (PR #89638)
YunQiang Su via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Apr 30 23:25:35 PDT 2024
https://github.com/wzssyqa updated https://github.com/llvm/llvm-project/pull/89638
>From a165cd689e6fa23163736ea6d76d8a60440f4b30 Mon Sep 17 00:00:00 2001
From: YunQiang Su <syq at gcc.gnu.org>
Date: Sat, 27 Apr 2024 10:55:38 +0800
Subject: [PATCH 1/2] Triple::normalize: Use none as OS for XX-none-ABI
When parsing a 3-component triple, after we determine Arch and Env,
if the middle component is "none", treat it as OS instead of Vendor.
Fixes: #89582.
---
clang/docs/Multilib.rst | 4 ++--
libcxx/utils/ci/run-buildbot | 2 +-
llvm/lib/TargetParser/Triple.cpp | 7 +++++++
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/clang/docs/Multilib.rst b/clang/docs/Multilib.rst
index ab737e43b97d23..063fe9a336f2fe 100644
--- a/clang/docs/Multilib.rst
+++ b/clang/docs/Multilib.rst
@@ -188,9 +188,9 @@ For a more comprehensive example see
- Dir: thumb/v6-m
# List of one or more normalized command line options, as generated by Clang
# from the command line options or from Mappings below.
- # Here, if the flags are a superset of {target=thumbv6m-none-unknown-eabi}
+ # Here, if the flags are a superset of {target=thumbv6m-unknown-none-eabi}
# then this multilib variant will be considered a match.
- Flags: [--target=thumbv6m-none-unknown-eabi]
+ Flags: [--target=thumbv6m-unknown-none-eabi]
# Similarly, a multilib variant targeting Arm v7-M with an FPU (floating
# point unit).
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index 60307a7d4f350a..3523a29e4f4613 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -217,7 +217,7 @@ function test-armv7m-picolibc() {
"${@}"
${NINJA} -vC "${BUILD_DIR}/compiler-rt" install
- mv "${BUILD_DIR}/install/lib/armv7m-none-unknown-eabi"/* "${BUILD_DIR}/install/lib"
+ mv "${BUILD_DIR}/install/lib/armv7m-unknown-none-eabi"/* "${BUILD_DIR}/install/lib"
check-runtimes
}
diff --git a/llvm/lib/TargetParser/Triple.cpp b/llvm/lib/TargetParser/Triple.cpp
index 2c5aee3dfb2f3e..b36aebc14c0825 100644
--- a/llvm/lib/TargetParser/Triple.cpp
+++ b/llvm/lib/TargetParser/Triple.cpp
@@ -1151,6 +1151,13 @@ std::string Triple::normalize(StringRef Str) {
}
}
+ // If "none" is in the middle component in a three-component triple, treat it as
+ // the OS (Components[2]) instead of the vendor (Components[1]).
+ // This is for some baremetal cases, such as "arm-none-elf".
+ if (Found[0] && !Found[1] && !Found[2] && Found[3] &&
+ Components[1].equals("none") && Components[2].empty())
+ std::swap(Components[1], Components[2]);
+
// Replace empty components with "unknown" value.
for (StringRef &C : Components)
if (C.empty())
>From 7471e4f6032b7913f9d983a3488f0c6f7e33c9b8 Mon Sep 17 00:00:00 2001
From: YunQiang Su <syq at gcc.gnu.org>
Date: Wed, 1 May 2024 08:44:09 +0800
Subject: [PATCH 2/2] fix test failures
---
clang/test/Driver/arm-ias-Wa.s | 2 +-
clang/test/Driver/arm-triple.c | 10 +--
.../Driver/baremetal-multilib-layered.yaml | 2 +-
clang/test/Driver/baremetal-multilib.yaml | 64 +++++++++----------
clang/test/Driver/baremetal-sysroot.cpp | 2 +-
clang/test/Driver/baremetal.cpp | 2 +-
.../test/Driver/print-multi-selection-flags.c | 14 ++--
.../IncrementalCompilerBuilderTest.cpp | 2 +-
llvm/unittests/TargetParser/TripleTest.cpp | 2 +-
9 files changed, 50 insertions(+), 50 deletions(-)
diff --git a/clang/test/Driver/arm-ias-Wa.s b/clang/test/Driver/arm-ias-Wa.s
index b82ce8dfb31ab3..5e9518ed2dc423 100644
--- a/clang/test/Driver/arm-ias-Wa.s
+++ b/clang/test/Driver/arm-ias-Wa.s
@@ -71,7 +71,7 @@
// RUN: %clang -target armv7r-none-eabi -c %s -### 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-R-PROFILE %s
-// CHECK-R-PROFILE: "-triple" "armv7r-none-unknown-eabi"
+// CHECK-R-PROFILE: "-triple" "armv7r-unknown-none-eabi"
// RUN: %clang -target armv7m-none-eabi -c %s -### 2>&1 \
// RUN: %clang -target thumbv7m-none-eabi -c %s -### 2>&1 \
diff --git a/clang/test/Driver/arm-triple.c b/clang/test/Driver/arm-triple.c
index fa9f7b189c8278..1fb2b5afe22a51 100644
--- a/clang/test/Driver/arm-triple.c
+++ b/clang/test/Driver/arm-triple.c
@@ -7,7 +7,7 @@
// RUN: %clang -print-effective-triple \
// RUN: --target=arm-none-eabihf -march=armv4t -mfloat-abi=softfp \
// RUN: | FileCheck %s --check-prefix=CHECK-DEFAULT
-// CHECK-DEFAULT: armv4t-none-unknown-eabi
+// CHECK-DEFAULT: armv4t-unknown-none-eabi
// RUN: %clang -print-effective-triple \
// RUN: --target=armeb-none-eabi \
@@ -15,7 +15,7 @@
// RUN: %clang -print-effective-triple \
// RUN: --target=arm-none-eabi -mbig-endian \
// RUN: | FileCheck %s --check-prefix=CHECK-EB
-// CHECK-EB: armebv4t-none-unknown-eabi
+// CHECK-EB: armebv4t-unknown-none-eabi
// RUN: %clang -print-effective-triple \
// RUN: --target=arm-none-eabihf -march=armv4t \
@@ -23,7 +23,7 @@
// RUN: %clang -print-effective-triple \
// RUN: --target=arm-none-eabi -mfloat-abi=hard \
// RUN: | FileCheck %s --check-prefix=CHECK-HF
-// CHECK-HF: armv4t-none-unknown-eabihf
+// CHECK-HF: armv4t-unknown-none-eabihf
// RUN: %clang -print-effective-triple \
// RUN: --target=armeb-none-eabihf -march=armv4t \
@@ -37,7 +37,7 @@
// RUN: %clang -print-effective-triple \
// RUN: --target=arm-none-eabi -mbig-endian -mfloat-abi=hard \
// RUN: | FileCheck %s --check-prefix=CHECK-EB-HF
-// CHECK-EB-HF: armebv4t-none-unknown-eabihf
+// CHECK-EB-HF: armebv4t-unknown-none-eabihf
// RUN: %clang -print-effective-triple \
// RUN: --target=arm-none-eabi -march=armv8m.main -mbig-endian -mfloat-abi=hard \
@@ -45,4 +45,4 @@
// RUN: %clang -print-effective-triple \
// RUN: --target=arm-none-eabi -mcpu=cortex-m33 -mbig-endian -mfloat-abi=hard \
// RUN: | FileCheck %s --check-prefix=CHECK-V8M-EB-HF
-// CHECK-V8M-EB-HF: thumbebv8m.main-none-unknown-eabihf
+// CHECK-V8M-EB-HF: thumbebv8m.main-unknown-none-eabihf
diff --git a/clang/test/Driver/baremetal-multilib-layered.yaml b/clang/test/Driver/baremetal-multilib-layered.yaml
index 2f86f8e3ea4f5f..a525436d8122f5 100644
--- a/clang/test/Driver/baremetal-multilib-layered.yaml
+++ b/clang/test/Driver/baremetal-multilib-layered.yaml
@@ -18,7 +18,7 @@
# RUN: %T/baremetal_multilib_layered/bin/clang -no-canonical-prefixes -x c++ %s -### -o %t.out 2>&1 \
# RUN: --target=thumbv7m-none-eabi -mfloat-abi=softfp --sysroot= \
# RUN: | FileCheck -DSYSROOT=%T/baremetal_multilib_layered %s
-# CHECK: "-cc1" "-triple" "thumbv7m-none-unknown-eabi"
+# CHECK: "-cc1" "-triple" "thumbv7m-unknown-none-eabi"
# CHECK-SAME: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/softfp/include/c++/v1"
# CHECK-SAME: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/soft/include/c++/v1"
# CHECK-SAME: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/softfp/include"
diff --git a/clang/test/Driver/baremetal-multilib.yaml b/clang/test/Driver/baremetal-multilib.yaml
index 3f026cbeb437b2..9ed83e4aec839c 100644
--- a/clang/test/Driver/baremetal-multilib.yaml
+++ b/clang/test/Driver/baremetal-multilib.yaml
@@ -11,7 +11,7 @@
# RUN: %T/baremetal_multilib/bin/clang -no-canonical-prefixes -x c++ %s -### -o %t.out 2>&1 \
# RUN: --target=thumbv8m.main-none-eabihf --sysroot= \
# RUN: | FileCheck -DSYSROOT=%T/baremetal_multilib %s
-# CHECK: "-cc1" "-triple" "thumbv8m.main-none-unknown-eabihf"
+# CHECK: "-cc1" "-triple" "thumbv8m.main-unknown-none-eabihf"
# CHECK-SAME: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/arm-none-eabi/thumb/v8-m.main/fp/include/c++/v1"
# CHECK-SAME: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/arm-none-eabi/thumb/v8-m.main/fp/include"
# CHECK-SAME: "-x" "c++" "{{.*}}baremetal-multilib.yaml"
@@ -24,11 +24,11 @@
# RUN: --target=thumbv7em-none-eabi -mfpu=fpv4-sp-d16 --sysroot= \
# RUN: | FileCheck --check-prefix=CHECK-NO-MATCH %s
# CHECK-NO-MATCH: warning: no multilib found matching flags:
-# CHECK-NO-MATCH-SAME: --target=thumbv7em-none-unknown-eabi
+# CHECK-NO-MATCH-SAME: --target=thumbv7em-unknown-none-eabi
# CHECK-NO-MATCH: note: available multilibs are:
-# CHECK-NO-MATCH: --target=thumbv6m-none-unknown-eabi -mfpu=none
-# CHECK-NO-MATCH: --target=thumbv7m-none-unknown-eabi -mfpu=none
-# CHECK-NO-MATCH: --target=thumbv7em-none-unknown-eabi -mfpu=none
+# CHECK-NO-MATCH: --target=thumbv6m-unknown-none-eabi -mfpu=none
+# CHECK-NO-MATCH: --target=thumbv7m-unknown-none-eabi -mfpu=none
+# CHECK-NO-MATCH: --target=thumbv7em-unknown-none-eabi -mfpu=none
# RUN: %T/baremetal_multilib/bin/clang -no-canonical-prefixes -print-multi-directory 2>&1 \
# RUN: --target=thumbv8m.main-none-eabihf --sysroot= \
@@ -38,16 +38,16 @@
# RUN: %T/baremetal_multilib/bin/clang -no-canonical-prefixes -print-multi-lib 2>&1 \
# RUN: --target=arm-none-eabi --sysroot= \
# RUN: | FileCheck --check-prefix=CHECK-PRINT-MULTI-LIB %s
-# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v6-m/nofp;@-target=thumbv6m-none-unknown-eabi at mfpu=none
-# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v7-m/nofp;@-target=thumbv7m-none-unknown-eabi at mfpu=none
-# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v7e-m/nofp;@-target=thumbv7em-none-unknown-eabi at mfpu=none
-# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v8-m.main/nofp;@-target=thumbv8m.main-none-unknown-eabi at mfpu=none
-# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v8.1-m.main/nofp/nomve;@-target=thumbv8.1m.main-none-unknown-eabi at mfpu=none
-# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v7e-m/fpv4_sp_d16;@-target=thumbv7em-none-unknown-eabihf at mfpu=fpv4-sp-d16
-# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v7e-m/fpv5_d16;@-target=thumbv7em-none-unknown-eabihf at mfpu=fpv5-d16
-# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v8-m.main/fp;@-target=thumbv8m.main-none-unknown-eabihf at mfpu=fpv5-d16
-# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v8.1-m.main/fp;@-target=thumbv8.1m.main-none-unknown-eabihf at mfpu=fp-armv8-fullfp16-sp-d16
-# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v8.1-m.main/nofp/mve;@-target=thumbv8.1m.main-none-unknown-eabihf at march=thumbv8.1m.main+mve at mfpu=none
+# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v6-m/nofp;@-target=thumbv6m-unknown-none-eabi at mfpu=none
+# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v7-m/nofp;@-target=thumbv7m-unknown-none-eabi at mfpu=none
+# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v7e-m/nofp;@-target=thumbv7em-unknown-none-eabi at mfpu=none
+# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v8-m.main/nofp;@-target=thumbv8m.main-unknown-none-eabi at mfpu=none
+# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v8.1-m.main/nofp/nomve;@-target=thumbv8.1m.main-unknown-none-eabi at mfpu=none
+# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v7e-m/fpv4_sp_d16;@-target=thumbv7em-unknown-none-eabihf at mfpu=fpv4-sp-d16
+# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v7e-m/fpv5_d16;@-target=thumbv7em-unknown-none-eabihf at mfpu=fpv5-d16
+# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v8-m.main/fp;@-target=thumbv8m.main-unknown-none-eabihf at mfpu=fpv5-d16
+# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v8.1-m.main/fp;@-target=thumbv8.1m.main-unknown-none-eabihf at mfpu=fp-armv8-fullfp16-sp-d16
+# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v8.1-m.main/nofp/mve;@-target=thumbv8.1m.main-unknown-none-eabihf at march=thumbv8.1m.main+mve at mfpu=none
# RUN: %T/baremetal_multilib/bin/clang -no-canonical-prefixes -x assembler -mexecute-only \
# RUN: --target=arm-none-eabi --sysroot= %s -c -### 2>&1 \
@@ -86,37 +86,37 @@ MultilibVersion: 1.0
Variants:
- Dir: arm-none-eabi/arm/v4t
- Flags: [--target=armv4t-none-unknown-eabi]
+ Flags: [--target=armv4t-unknown-none-eabi]
- Dir: arm-none-eabi/thumb/v6-m/nofp
- Flags: [--target=thumbv6m-none-unknown-eabi, -mfpu=none]
+ Flags: [--target=thumbv6m-unknown-none-eabi, -mfpu=none]
- Dir: arm-none-eabi/thumb/v7-m/nofp
- Flags: [--target=thumbv7m-none-unknown-eabi, -mfpu=none]
+ Flags: [--target=thumbv7m-unknown-none-eabi, -mfpu=none]
- Dir: arm-none-eabi/thumb/v7e-m/nofp
- Flags: [--target=thumbv7em-none-unknown-eabi, -mfpu=none]
+ Flags: [--target=thumbv7em-unknown-none-eabi, -mfpu=none]
- Dir: arm-none-eabi/thumb/v8-m.main/nofp
- Flags: [--target=thumbv8m.main-none-unknown-eabi, -mfpu=none]
+ Flags: [--target=thumbv8m.main-unknown-none-eabi, -mfpu=none]
- Dir: arm-none-eabi/thumb/v8.1-m.main/nofp/nomve
- Flags: [--target=thumbv8.1m.main-none-unknown-eabi, -mfpu=none]
+ Flags: [--target=thumbv8.1m.main-unknown-none-eabi, -mfpu=none]
- Dir: arm-none-eabi/thumb/v7e-m/fpv4_sp_d16
- Flags: [--target=thumbv7em-none-unknown-eabihf, -mfpu=fpv4-sp-d16]
+ Flags: [--target=thumbv7em-unknown-none-eabihf, -mfpu=fpv4-sp-d16]
- Dir: arm-none-eabi/thumb/v7e-m/fpv5_d16
- Flags: [--target=thumbv7em-none-unknown-eabihf, -mfpu=fpv5-d16]
+ Flags: [--target=thumbv7em-unknown-none-eabihf, -mfpu=fpv5-d16]
- Dir: arm-none-eabi/thumb/v8-m.main/fp
- Flags: [--target=thumbv8m.main-none-unknown-eabihf, -mfpu=fpv5-d16]
+ Flags: [--target=thumbv8m.main-unknown-none-eabihf, -mfpu=fpv5-d16]
- Dir: arm-none-eabi/thumb/v8.1-m.main/fp
- Flags: [--target=thumbv8.1m.main-none-unknown-eabihf, -mfpu=fp-armv8-fullfp16-sp-d16]
+ Flags: [--target=thumbv8.1m.main-unknown-none-eabihf, -mfpu=fp-armv8-fullfp16-sp-d16]
- Dir: arm-none-eabi/thumb/v8.1-m.main/nofp/mve
- Flags: [--target=thumbv8.1m.main-none-unknown-eabihf, -march=thumbv8.1m.main+mve, -mfpu=none]
+ Flags: [--target=thumbv8.1m.main-unknown-none-eabihf, -march=thumbv8.1m.main+mve, -mfpu=none]
# The second section of the file is a map from auto-detected flags
@@ -126,17 +126,17 @@ Variants:
# All flags in the "Flags" list will be added if an argument matches.
Mappings:
# For v8m.base (and potential later v8m baseline versions) use v6m
-- Match: --target=thumbv8(\.[0-9]+)?m\.base-none-unknown-eabi
- Flags: [--target=thumbv6m-none-unknown-eabi]
+- Match: --target=thumbv8(\.[0-9]+)?m\.base-unknown-none-eabi
+ Flags: [--target=thumbv6m-unknown-none-eabi]
# Match versions after v8.1m.main. We assume that v8.2m (if/when it exists) will
# be backwards compatible with v8.1m.
# The alternative is to not recognise later versions, and require that
# this multilib spec is updated before it can be used with newer
# architecture versions.
-- Match: --target=thumbv8\.[1-9]m\.main-none-unknown-eabi
- Flags: [--target=thumbv8.1m.main-none-unknown-eabi]
-- Match: --target=thumbv8\.[1-9]m\.main-none-unknown-eabihf
- Flags: [--target=thumbv8.1m.main-none-unknown-eabihf]
+- Match: --target=thumbv8\.[1-9]m\.main-unknown-none-eabi
+ Flags: [--target=thumbv8.1m.main-unknown-none-eabi]
+- Match: --target=thumbv8\.[1-9]m\.main-unknown-none-eabihf
+ Flags: [--target=thumbv8.1m.main-unknown-none-eabihf]
- Match: -march=thumbv8\.[1-9]m\.main.*\+mve($|\+).*
Flags: [-march=thumbv8.1m.main+mve]
diff --git a/clang/test/Driver/baremetal-sysroot.cpp b/clang/test/Driver/baremetal-sysroot.cpp
index bbc608809d0e48..18654be33b87c9 100644
--- a/clang/test/Driver/baremetal-sysroot.cpp
+++ b/clang/test/Driver/baremetal-sysroot.cpp
@@ -12,7 +12,7 @@
// RUN: %T/baremetal_default_sysroot/bin/clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: -target armv6m-none-eabi --sysroot= \
// RUN: | FileCheck --check-prefix=CHECK-V6M-C %s
-// CHECK-V6M-C: "{{.*}}clang{{.*}}" "-cc1" "-triple" "thumbv6m-none-unknown-eabi"
+// CHECK-V6M-C: "{{.*}}clang{{.*}}" "-cc1" "-triple" "thumbv6m-unknown-none-eabi"
// CHECK-V6M-C-SAME: "-internal-isystem" "{{.*}}/baremetal_default_sysroot{{[/\\]+}}bin{{[/\\]+}}..{{[/\\]+}}lib{{[/\\]+}}clang-runtimes{{[/\\]+}}armv6m-none-eabi{{[/\\]+}}include{{[/\\]+}}c++{{[/\\]+}}v1"
// CHECk-V6M-C-SAME: "-internal-isystem" "{{.*}}/baremetal_default_sysroot{{[/\\]+}}bin{{[/\\]+}}..{{[/\\]+}}lib{{[/\\]+}}clang-runtimes{{[/\\]+}}armv6m-none-eabi{{[/\\]+}}include"
// CHECK-V6M-C-SAME: "-x" "c++" "{{.*}}baremetal-sysroot.cpp"
diff --git a/clang/test/Driver/baremetal.cpp b/clang/test/Driver/baremetal.cpp
index 657611bb3f38de..cc14f045df3f9a 100644
--- a/clang/test/Driver/baremetal.cpp
+++ b/clang/test/Driver/baremetal.cpp
@@ -9,7 +9,7 @@
// RUN: -L some/directory/user/asked/for \
// RUN: --sysroot=%S/Inputs/baremetal_arm \
// RUN: | FileCheck --check-prefix=CHECK-V6M-C %s
-// CHECK-V6M-C: "-cc1" "-triple" "thumbv6m-none-unknown-eabi"
+// CHECK-V6M-C: "-cc1" "-triple" "thumbv6m-unknown-none-eabi"
// CHECK-V6M-C-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
// CHECK-V6M-C-SAME: "-isysroot" "[[SYSROOT:[^"]*]]"
// CHECK-V6M-C-SAME: "-internal-isystem" "[[SYSROOT]]{{[/\\]+}}include{{[/\\]+}}c++{{[/\\]+}}v1"
diff --git a/clang/test/Driver/print-multi-selection-flags.c b/clang/test/Driver/print-multi-selection-flags.c
index 06a12db9d97792..9f58d1b557fd74 100644
--- a/clang/test/Driver/print-multi-selection-flags.c
+++ b/clang/test/Driver/print-multi-selection-flags.c
@@ -5,27 +5,27 @@
// CHECK-FUCHSIA: --target=aarch64-unknown-fuchsia
// RUN: %clang -print-multi-flags-experimental --target=arm-none-eabi -mfloat-abi=soft -fno-exceptions -fno-rtti | FileCheck --check-prefix=CHECK-ARMV4T %s
-// CHECK-ARMV4T: --target=armv4t-none-unknown-eabi
+// CHECK-ARMV4T: --target=armv4t-unknown-none-eabi
// CHECK-ARMV4T: -mfloat-abi=soft
// CHECK-ARMV4T: -mfpu=none
// RUN: %clang -print-multi-flags-experimental --target=armv7em-none-eabi -mfloat-abi=softfp | FileCheck --check-prefix=CHECK-SOFTFP %s
-// CHECK-SOFTFP: --target=thumbv7em-none-unknown-eabi
+// CHECK-SOFTFP: --target=thumbv7em-unknown-none-eabi
// CHECK-SOFTFP: -mfloat-abi=softfp
// CHECK-SOFTFP: -mfpu=fpv4-sp-d16
// RUN: %clang -print-multi-flags-experimental --target=arm-none-eabihf -march=armv7em -mfpu=fpv5-d16 | FileCheck --check-prefix=CHECK-HARD %s
-// CHECK-HARD: --target=thumbv7em-none-unknown-eabihf
+// CHECK-HARD: --target=thumbv7em-unknown-none-eabihf
// CHECK-HARD: -mfloat-abi=hard
// CHECK-HARD: -mfpu=fpv5-d16
// RUN: %clang -print-multi-flags-experimental --target=arm-none-eabi -mfloat-abi=soft -march=armv8-m.main+nofp | FileCheck --check-prefix=CHECK-V8MMAIN-NOFP %s
-// CHECK-V8MMAIN-NOFP: --target=thumbv8m.main-none-unknown-eabi
+// CHECK-V8MMAIN-NOFP: --target=thumbv8m.main-unknown-none-eabi
// CHECK-V8MMAIN-NOFP: -mfloat-abi=soft
// CHECK-V8MMAIN-NOFP: -mfpu=none
// RUN: %clang -print-multi-flags-experimental --target=arm-none-eabi -mfloat-abi=hard -march=armv8.1m.main+mve.fp | FileCheck --check-prefix=CHECK-MVE %s
-// CHECK-MVE: --target=thumbv8.1m.main-none-unknown-eabihf
+// CHECK-MVE: --target=thumbv8.1m.main-unknown-none-eabihf
// CHECK-MVE: -march=thumbv8.1m.main{{.*}}+mve{{.*}}+mve.fp{{.*}}
// CHECK-MVE: -mfloat-abi=hard
// CHECK-MVE: -mfpu=fp-armv8-fullfp16-sp-d16
@@ -51,10 +51,10 @@
// CHECK-M85_NO_FP_DP: -mfpu=fp-armv8-fullfp16-sp-d16
// RUN: %clang -print-multi-flags-experimental --target=aarch64-none-elf -march=armv8-a+lse | FileCheck --check-prefix=CHECK-LSE %s
-// CHECK-LSE: --target=aarch64-none-unknown-elf
+// CHECK-LSE: --target=aarch64-unknown-none-elf
// CHECK-LSE: -march=armv8-a{{.*}}+lse{{.*}}
// RUN: %clang -print-multi-flags-experimental --target=aarch64-none-elf -march=armv8.5-a+sve+sve2 | FileCheck --check-prefix=CHECK-SVE2 %s
// RUN: %clang -print-multi-flags-experimental --target=aarch64-none-elf -march=armv9-a | FileCheck --check-prefix=CHECK-SVE2 %s
-// CHECK-SVE2: --target=aarch64-none-unknown-elf
+// CHECK-SVE2: --target=aarch64-unknown-none-elf
// CHECK-SVE2: -march=armv{{.*}}-a{{.*}}+simd{{.*}}+sve{{.*}}+sve2{{.*}}
diff --git a/clang/unittests/Interpreter/IncrementalCompilerBuilderTest.cpp b/clang/unittests/Interpreter/IncrementalCompilerBuilderTest.cpp
index f729566f7efde6..c4a40071f55cf8 100644
--- a/clang/unittests/Interpreter/IncrementalCompilerBuilderTest.cpp
+++ b/clang/unittests/Interpreter/IncrementalCompilerBuilderTest.cpp
@@ -40,7 +40,7 @@ TEST(IncrementalCompilerBuilder, SetTargetTriple) {
auto CB = clang::IncrementalCompilerBuilder();
CB.SetTargetTriple("armv6-none-eabi");
auto CI = cantFail(CB.CreateCpp());
- EXPECT_EQ(CI->getTargetOpts().Triple, "armv6-none-unknown-eabi");
+ EXPECT_EQ(CI->getTargetOpts().Triple, "armv6-unknown-none-eabi");
cleanupRemappedFileBuffers(*CI);
}
diff --git a/llvm/unittests/TargetParser/TripleTest.cpp b/llvm/unittests/TargetParser/TripleTest.cpp
index 0fa7e769038905..b8f5fbd87407d3 100644
--- a/llvm/unittests/TargetParser/TripleTest.cpp
+++ b/llvm/unittests/TargetParser/TripleTest.cpp
@@ -1237,7 +1237,7 @@ TEST(TripleTest, Normalization) {
Triple::normalize("i386-redhat-linux")); // i386-redhat-linux-gnu
EXPECT_EQ("i686-unknown-linux",
Triple::normalize("i686-linux")); // i686-pc-linux-gnu
- EXPECT_EQ("arm-none-unknown-eabi",
+ EXPECT_EQ("arm-unknown-none-eabi",
Triple::normalize("arm-none-eabi")); // arm-none-eabi
EXPECT_EQ("ve-unknown-linux",
Triple::normalize("ve-linux")); // ve-linux
More information about the libcxx-commits
mailing list