From cd41a86a7594d7338cf18b69139b97841cbc483b Mon Sep 17 00:00:00 2001 From: Nashe Mncube Date: Mon, 4 Nov 2024 10:06:42 +0000 Subject: [PATCH 01/16] Patch file for alternative MEMCPY LDM/STM inlining for Cortex m7 (#548) Performance improvements have been seen of around 1 to 2% on selected benchmarks when LD/ST inlining is preferred over LDM/STM for Cortex m7. This adds a patch file that enables this optimisation. --- ...ble-MEMCPY-LDM-STM-inlining-for-v7-m.patch | 217 ++++++++++++++++++ 1 file changed, 217 insertions(+) create mode 100644 patches/llvm-project-perf/0002-ARM-CodeGen-Disable-MEMCPY-LDM-STM-inlining-for-v7-m.patch diff --git a/patches/llvm-project-perf/0002-ARM-CodeGen-Disable-MEMCPY-LDM-STM-inlining-for-v7-m.patch b/patches/llvm-project-perf/0002-ARM-CodeGen-Disable-MEMCPY-LDM-STM-inlining-for-v7-m.patch new file mode 100644 index 0000000..38d3e2d --- /dev/null +++ b/patches/llvm-project-perf/0002-ARM-CodeGen-Disable-MEMCPY-LDM-STM-inlining-for-v7-m.patch @@ -0,0 +1,217 @@ +From 61af6af10d10a08b81d3924fa5b35bfb548b2a05 Mon Sep 17 00:00:00 2001 +From: nasmnc01 +Author: Scott Douglass +Date: Tue, 13 Aug 2024 10:55:51 +0100 +Subject: [PATCH] [ARM][CodeGen] Prefer MEMCPY LDM/STM inlining for v7-m + +This patch changes the behaviour of memcpy inlining on v7m targets. +The old behaviour was to inline memcpys with LDM/STM instructions. +Alternatively, using LD/ST instructions for memcpy inlining allowed +for performance gains of 1% to 2% on selected benchmarks. + +Co-authored-by: Nashe Mncube +--- + llvm/lib/Target/ARM/ARMFeatures.td | 5 + + llvm/lib/Target/ARM/ARMProcessors.td | 2 +- + llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp | 121 ++++++++++++++ + llvm/lib/Target/ARM/ARMSelectionDAGInfo.h | 6 + + llvm/lib/Target/ARM/ARMSubtarget.h | 2 + + llvm/test/CodeGen/ARM/memcpy-v7m.ll | 165 ++++++++++++++++++++ + 6 files changed, 300 insertions(+), 1 deletion(-) + create mode 100644 llvm/test/CodeGen/ARM/memcpy-v7m.ll + +diff --git a/llvm/lib/Target/ARM/ARMFeatures.td b/llvm/lib/Target/ARM/ARMFeatures.td +index bb437698296c..f7fa00aba424 100644 +--- a/llvm/lib/Target/ARM/ARMFeatures.td ++++ b/llvm/lib/Target/ARM/ARMFeatures.td +@@ -510,6 +510,11 @@ def FeatureNoPostRASched : SubtargetFeature<"disable-postra-scheduler", + "DisablePostRAScheduler", "true", + "Don't schedule again after register allocation">; + ++def FeatureUseInlineMemcpyAsLdSt : ++ SubtargetFeature<"use-inline-memcpy-ldst", "UseInlineMemcpyAsLdSt", ++ "true", "Use memcpy inlining as LD/ST instructions">; ++ ++ + // Armv8.5-A extensions + + // Has speculation barrier. +diff --git a/llvm/lib/Target/ARM/ARMProcessors.td b/llvm/lib/Target/ARM/ARMProcessors.td +index b94a5fc16146..ffb0c86bc687 100644 +--- a/llvm/lib/Target/ARM/ARMProcessors.td ++++ b/llvm/lib/Target/ARM/ARMProcessors.td +@@ -96,7 +96,7 @@ def ProcR52plus : SubtargetFeature<"r52plus", "ARMProcFamily", "CortexR52plus", + def ProcM3 : SubtargetFeature<"m3", "ARMProcFamily", "CortexM3", + "Cortex-M3 ARM processors", []>; + def ProcM7 : SubtargetFeature<"m7", "ARMProcFamily", "CortexM7", +- "Cortex-M7 ARM processors", []>; ++ "Cortex-M7 ARM processors", [FeatureUseInlineMemcpyAsLdSt]>; + + //===----------------------------------------------------------------------===// + // ARM processors +diff --git a/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp b/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp +index c57825949c1c..12db2ab1fca2 100644 +--- a/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp ++++ b/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp +@@ -12,6 +12,7 @@ + + #include "ARMTargetMachine.h" + #include "ARMTargetTransformInfo.h" ++#include "llvm/ADT/SmallVector.h" + #include "llvm/CodeGen/SelectionDAG.h" + #include "llvm/IR/DerivedTypes.h" + #include "llvm/Support/CommandLine.h" +@@ -138,6 +139,122 @@ SDValue ARMSelectionDAGInfo::EmitSpecializedLibcall( + return CallResult.second; + } + ++SDValue ARMSelectionDAGInfo::EmitMemcpyAsLdSt( ++ SelectionDAG &DAG, SDLoc dl, const ARMSubtarget &Subtarget, SDValue Chain, ++ SDValue Dst, SDValue Src, uint64_t SizeVal, bool isVolatile, ++ MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) const { ++ // Do repeated batches of 4-byte loads and stores. ++ unsigned BytesLeft = SizeVal & 3; ++ unsigned NumMemOps = SizeVal >> 2; ++ unsigned EmittedNumMemOps = 0; ++ EVT VT = MVT::i32; ++ unsigned VTSize = 4; ++ unsigned I = 0; ++ // Emit a maximum of 4 loads in Thumb1 since we have fewer registers ++ const unsigned MaxLoads = Subtarget.isThumb1Only() ? 4 : 6; ++ SmallVector TFOps(6); ++ SmallVector Loads(6); ++ uint64_t SrcOff = 0, DstOff = 0; ++ ++ MachineMemOperand::Flags MOFlags = MachineMemOperand::Flags::MONone; ++ if (isVolatile) ++ MOFlags = MachineMemOperand::Flags::MOVolatile; ++ MachineMemOperand::Flags LoadMOFlags = MOFlags; ++ if (SrcPtrInfo.isDereferenceable(SizeVal, *DAG.getContext(), ++ DAG.getDataLayout())) ++ LoadMOFlags |= MachineMemOperand::Flags::MODereferenceable; ++ if (auto *V = SrcPtrInfo.V.dyn_cast()) ++ if (isa(V) && cast(V)->isConstant()) ++ LoadMOFlags |= MachineMemOperand::Flags::MOInvariant; ++ MachineMemOperand::Flags StoreMOFlags = MOFlags; ++ if (DstPtrInfo.isDereferenceable(SizeVal, *DAG.getContext(), ++ DAG.getDataLayout())) ++ StoreMOFlags |= MachineMemOperand::Flags::MODereferenceable; ++ ++ // Emit up to MaxLoads loads, then a TokenFactor barrier, then the ++ // same number of stores. The loads and stores may get combined into ++ // ldm/stm later on. ++ while (EmittedNumMemOps < NumMemOps) { ++ for (I = 0; I < MaxLoads && EmittedNumMemOps + I < NumMemOps; ++I) { ++ Loads[I] = DAG.getLoad(VT, dl, Chain, ++ DAG.getNode(ISD::ADD, dl, MVT::i32, Src, ++ DAG.getConstant(SrcOff, dl, MVT::i32)), ++ SrcPtrInfo.getWithOffset(SrcOff), MaybeAlign(0), ++ LoadMOFlags); ++ TFOps[I] = Loads[I].getValue(1); ++ SrcOff += VTSize; ++ } ++ Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, ++ ArrayRef(TFOps.data(), I)); ++ ++ for (I = 0; I < MaxLoads && EmittedNumMemOps + I < NumMemOps; ++I) { ++ TFOps[I] = DAG.getStore( ++ Chain, dl, Loads[I], ++ DAG.getNode(ISD::ADD, dl, MVT::i32, Dst, ++ DAG.getConstant(DstOff, dl, MVT::i32)), ++ DstPtrInfo.getWithOffset(DstOff), MaybeAlign(0), StoreMOFlags); ++ DstOff += VTSize; ++ } ++ Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, ++ ArrayRef(TFOps.data(), I)); ++ ++ EmittedNumMemOps += I; ++ } ++ ++ if (BytesLeft == 0) ++ return Chain; ++ ++ // Issue loads / stores for the trailing (1 - 3) bytes. ++ unsigned BytesLeftSave = BytesLeft; ++ I = 0; ++ while (BytesLeft) { ++ if (BytesLeft >= 2) { ++ VT = MVT::i16; ++ VTSize = 2; ++ } else { ++ VT = MVT::i8; ++ VTSize = 1; ++ } ++ ++ Loads[I] = DAG.getLoad(VT, dl, Chain, ++ DAG.getNode(ISD::ADD, dl, MVT::i32, Src, ++ DAG.getConstant(SrcOff, dl, MVT::i32)), ++ SrcPtrInfo.getWithOffset(SrcOff), MaybeAlign(0), ++ LoadMOFlags); ++ ++ TFOps[I] = Loads[I].getValue(1); ++ ++I; ++ SrcOff += VTSize; ++ BytesLeft -= VTSize; ++ } ++ Chain = ++ DAG.getNode(ISD::TokenFactor, dl, MVT::Other, ArrayRef(TFOps.data(), I)); ++ ++ I = 0; ++ BytesLeft = BytesLeftSave; ++ while (BytesLeft) { ++ if (BytesLeft >= 2) { ++ VT = MVT::i16; ++ VTSize = 2; ++ } else { ++ VT = MVT::i8; ++ VTSize = 1; ++ } ++ ++ TFOps[I] = DAG.getStore(Chain, dl, Loads[I], ++ DAG.getNode(ISD::ADD, dl, MVT::i32, Dst, ++ DAG.getConstant(DstOff, dl, MVT::i32)), ++ DstPtrInfo.getWithOffset(DstOff), MaybeAlign(0), ++ StoreMOFlags); ++ ++I; ++ DstOff += VTSize; ++ BytesLeft -= VTSize; ++ } ++ ++ return DAG.getNode(ISD::TokenFactor, dl, MVT::Other, ++ ArrayRef(TFOps.data(), I)); ++} ++ + static bool shouldGenerateInlineTPLoop(const ARMSubtarget &Subtarget, + const SelectionDAG &DAG, + ConstantSDNode *ConstantSize, +@@ -192,6 +309,10 @@ SDValue ARMSelectionDAGInfo::EmitTargetCodeForMemcpy( + return EmitSpecializedLibcall(DAG, dl, Chain, Dst, Src, Size, + Alignment.value(), RTLIB::MEMCPY); + ++ if (Subtarget.UseInlineMemcpyAsLdSt) ++ return EmitMemcpyAsLdSt(DAG, dl, Subtarget, Chain, Dst, Src, SizeVal, ++ isVolatile, DstPtrInfo, SrcPtrInfo); ++ + unsigned BytesLeft = SizeVal & 3; + unsigned NumMemOps = SizeVal >> 2; + unsigned EmittedNumMemOps = 0; +diff --git a/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h b/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h +index 275b1c0f8dc0..6ff422c15b12 100644 +--- a/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h ++++ b/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h +@@ -44,6 +44,12 @@ public: + MachinePointerInfo DstPtrInfo, + MachinePointerInfo SrcPtrInfo) const override; + ++ SDValue EmitMemcpyAsLdSt(SelectionDAG &DAG, SDLoc dl, ++ const ARMSubtarget &Subtarget, SDValue Chain, ++ SDValue Dst, SDValue Src, uint64_t SizeVal, ++ bool isVolatile, MachinePointerInfo DstPtrInfo, ++ MachinePointerInfo SrcPtrInfo) const; ++ + SDValue + EmitTargetCodeForMemmove(SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, + SDValue Dst, SDValue Src, SDValue Size, +-- +2.34.1 + From fd4dcd54acd27d120c11e7bd115c4f8e8be0cb72 Mon Sep 17 00:00:00 2001 From: Rin Dobrescu Date: Mon, 4 Nov 2024 10:43:18 +0000 Subject: [PATCH 02/16] Add aarch64_sme_accessible to newlib patch (#547) To check for SME support, compiler-rt makes a call to __aarch64_sme_accessible(). It expects this symbol to be defined in newlib, which is currently incorrect. This patch extends newlib.patch to add the definition of __aarch64_sme_accessible. Co-authored-by: Rin Dobrescu --- patches/newlib.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/patches/newlib.patch b/patches/newlib.patch index 489aae3..f520a7f 100644 --- a/patches/newlib.patch +++ b/patches/newlib.patch @@ -1,3 +1,20 @@ +diff --git a/libgloss/aarch64/syscalls.c b/libgloss/aarch64/syscalls.c +index 7343cc61f..2c4b63c17 100644 +--- a/libgloss/aarch64/syscalls.c ++++ b/libgloss/aarch64/syscalls.c +@@ -172,6 +172,12 @@ newslot (void) + return i; + } + ++int __aarch64_sme_accessible() { ++ int result = 0; ++ asm volatile ( "mrs %x[result], id_aa64pfr1_el1" : [result]"=r"(result) : : ); ++ return (result & 0x3000000) != 0; ++} ++ + void + initialise_monitor_handles (void) + { diff --git a/libgloss/arm/cpu-init/rdimon-aem.S b/libgloss/arm/cpu-init/rdimon-aem.S index 95b86e4d4..b91034ae6 100644 --- a/libgloss/arm/cpu-init/rdimon-aem.S From 4dab6f6367244d1d7ce17adf086c21c7296f7c39 Mon Sep 17 00:00:00 2001 From: VladiKrapp-Arm Date: Tue, 5 Nov 2024 10:58:37 +0000 Subject: [PATCH 03/16] [BuildFix] Add public subtarget property (#557) --- ...Disable-MEMCPY-LDM-STM-inlining-for-v7-m.patch | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/patches/llvm-project-perf/0002-ARM-CodeGen-Disable-MEMCPY-LDM-STM-inlining-for-v7-m.patch b/patches/llvm-project-perf/0002-ARM-CodeGen-Disable-MEMCPY-LDM-STM-inlining-for-v7-m.patch index 38d3e2d..a96896f 100644 --- a/patches/llvm-project-perf/0002-ARM-CodeGen-Disable-MEMCPY-LDM-STM-inlining-for-v7-m.patch +++ b/patches/llvm-project-perf/0002-ARM-CodeGen-Disable-MEMCPY-LDM-STM-inlining-for-v7-m.patch @@ -188,7 +188,7 @@ index c57825949c1c..12db2ab1fca2 100644 return EmitSpecializedLibcall(DAG, dl, Chain, Dst, Src, Size, Alignment.value(), RTLIB::MEMCPY); -+ if (Subtarget.UseInlineMemcpyAsLdSt) ++ if (Subtarget.allowInlineMemcpyAsLdSt()) + return EmitMemcpyAsLdSt(DAG, dl, Subtarget, Chain, Dst, Src, SizeVal, + isVolatile, DstPtrInfo, SrcPtrInfo); + @@ -212,6 +212,19 @@ index 275b1c0f8dc0..6ff422c15b12 100644 SDValue EmitTargetCodeForMemmove(SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, SDValue Dst, SDValue Src, SDValue Size, +diff --git a/llvm/lib/Target/ARM/ARMSubtarget.h b/llvm/lib/Target/ARM/ARMSubtarget.h +index 2f7af05a259f..0acf919b1360 100644 +--- a/llvm/lib/Target/ARM/ARMSubtarget.h ++++ b/llvm/lib/Target/ARM/ARMSubtarget.h +@@ -523,6 +523,8 @@ public: + bool ignoreCSRForAllocationOrder(const MachineFunction &MF, + unsigned PhysReg) const override; + unsigned getGPRAllocationOrder(const MachineFunction &MF) const; ++ ++ bool allowInlineMemcpyAsLdSt() const { return UseInlineMemcpyAsLdSt; } + }; + + } // end namespace llvm -- 2.34.1 From 034c76030ed9116d259e300bac7df016226d29a6 Mon Sep 17 00:00:00 2001 From: Vladi Krapp Date: Tue, 5 Nov 2024 12:21:40 +0000 Subject: [PATCH 04/16] [Target] Use autogenerated getter for property --- ...ble-MEMCPY-LDM-STM-inlining-for-v7-m.patch | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/patches/llvm-project-perf/0002-ARM-CodeGen-Disable-MEMCPY-LDM-STM-inlining-for-v7-m.patch b/patches/llvm-project-perf/0002-ARM-CodeGen-Disable-MEMCPY-LDM-STM-inlining-for-v7-m.patch index a96896f..4cc98e1 100644 --- a/patches/llvm-project-perf/0002-ARM-CodeGen-Disable-MEMCPY-LDM-STM-inlining-for-v7-m.patch +++ b/patches/llvm-project-perf/0002-ARM-CodeGen-Disable-MEMCPY-LDM-STM-inlining-for-v7-m.patch @@ -11,14 +11,6 @@ for performance gains of 1% to 2% on selected benchmarks. Co-authored-by: Nashe Mncube --- - llvm/lib/Target/ARM/ARMFeatures.td | 5 + - llvm/lib/Target/ARM/ARMProcessors.td | 2 +- - llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp | 121 ++++++++++++++ - llvm/lib/Target/ARM/ARMSelectionDAGInfo.h | 6 + - llvm/lib/Target/ARM/ARMSubtarget.h | 2 + - llvm/test/CodeGen/ARM/memcpy-v7m.ll | 165 ++++++++++++++++++++ - 6 files changed, 300 insertions(+), 1 deletion(-) - create mode 100644 llvm/test/CodeGen/ARM/memcpy-v7m.ll diff --git a/llvm/lib/Target/ARM/ARMFeatures.td b/llvm/lib/Target/ARM/ARMFeatures.td index bb437698296c..f7fa00aba424 100644 @@ -188,7 +180,7 @@ index c57825949c1c..12db2ab1fca2 100644 return EmitSpecializedLibcall(DAG, dl, Chain, Dst, Src, Size, Alignment.value(), RTLIB::MEMCPY); -+ if (Subtarget.allowInlineMemcpyAsLdSt()) ++ if (Subtarget.useInlineMemcpyAsLdSt()) + return EmitMemcpyAsLdSt(DAG, dl, Subtarget, Chain, Dst, Src, SizeVal, + isVolatile, DstPtrInfo, SrcPtrInfo); + @@ -212,19 +204,6 @@ index 275b1c0f8dc0..6ff422c15b12 100644 SDValue EmitTargetCodeForMemmove(SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, SDValue Dst, SDValue Src, SDValue Size, -diff --git a/llvm/lib/Target/ARM/ARMSubtarget.h b/llvm/lib/Target/ARM/ARMSubtarget.h -index 2f7af05a259f..0acf919b1360 100644 ---- a/llvm/lib/Target/ARM/ARMSubtarget.h -+++ b/llvm/lib/Target/ARM/ARMSubtarget.h -@@ -523,6 +523,8 @@ public: - bool ignoreCSRForAllocationOrder(const MachineFunction &MF, - unsigned PhysReg) const override; - unsigned getGPRAllocationOrder(const MachineFunction &MF) const; -+ -+ bool allowInlineMemcpyAsLdSt() const { return UseInlineMemcpyAsLdSt; } - }; - - } // end namespace llvm -- 2.34.1 From 9e00146b2f0eaff168cc66329b109826d443950b Mon Sep 17 00:00:00 2001 From: Vladi Krapp Date: Wed, 6 Nov 2024 13:02:05 +0000 Subject: [PATCH 05/16] [BuildFix] Fix patch file formatting --- ...ble-MEMCPY-LDM-STM-inlining-for-v7-m.patch | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/patches/llvm-project-perf/0002-ARM-CodeGen-Disable-MEMCPY-LDM-STM-inlining-for-v7-m.patch b/patches/llvm-project-perf/0002-ARM-CodeGen-Disable-MEMCPY-LDM-STM-inlining-for-v7-m.patch index 4cc98e1..b25c6f9 100644 --- a/patches/llvm-project-perf/0002-ARM-CodeGen-Disable-MEMCPY-LDM-STM-inlining-for-v7-m.patch +++ b/patches/llvm-project-perf/0002-ARM-CodeGen-Disable-MEMCPY-LDM-STM-inlining-for-v7-m.patch @@ -1,4 +1,4 @@ -From 61af6af10d10a08b81d3924fa5b35bfb548b2a05 Mon Sep 17 00:00:00 2001 +From 40f07cbde57022b25412cf1c9239755613500d86 Mon Sep 17 00:00:00 2001 From: nasmnc01 Author: Scott Douglass Date: Tue, 13 Aug 2024 10:55:51 +0100 @@ -11,6 +11,11 @@ for performance gains of 1% to 2% on selected benchmarks. Co-authored-by: Nashe Mncube --- + llvm/lib/Target/ARM/ARMFeatures.td | 5 + + llvm/lib/Target/ARM/ARMProcessors.td | 2 +- + llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp | 121 ++++++++++++++++++++ + llvm/lib/Target/ARM/ARMSelectionDAGInfo.h | 6 + + 4 files changed, 133 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Target/ARM/ARMFeatures.td b/llvm/lib/Target/ARM/ARMFeatures.td index bb437698296c..f7fa00aba424 100644 @@ -19,14 +24,14 @@ index bb437698296c..f7fa00aba424 100644 @@ -510,6 +510,11 @@ def FeatureNoPostRASched : SubtargetFeature<"disable-postra-scheduler", "DisablePostRAScheduler", "true", "Don't schedule again after register allocation">; - + +def FeatureUseInlineMemcpyAsLdSt : + SubtargetFeature<"use-inline-memcpy-ldst", "UseInlineMemcpyAsLdSt", + "true", "Use memcpy inlining as LD/ST instructions">; + + // Armv8.5-A extensions - + // Has speculation barrier. diff --git a/llvm/lib/Target/ARM/ARMProcessors.td b/llvm/lib/Target/ARM/ARMProcessors.td index b94a5fc16146..ffb0c86bc687 100644 @@ -38,15 +43,15 @@ index b94a5fc16146..ffb0c86bc687 100644 def ProcM7 : SubtargetFeature<"m7", "ARMProcFamily", "CortexM7", - "Cortex-M7 ARM processors", []>; + "Cortex-M7 ARM processors", [FeatureUseInlineMemcpyAsLdSt]>; - + //===----------------------------------------------------------------------===// // ARM processors diff --git a/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp b/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp -index c57825949c1c..12db2ab1fca2 100644 +index c57825949c1c..63ae7a042886 100644 --- a/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp +++ b/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp @@ -12,6 +12,7 @@ - + #include "ARMTargetMachine.h" #include "ARMTargetTransformInfo.h" +#include "llvm/ADT/SmallVector.h" @@ -56,7 +61,7 @@ index c57825949c1c..12db2ab1fca2 100644 @@ -138,6 +139,122 @@ SDValue ARMSelectionDAGInfo::EmitSpecializedLibcall( return CallResult.second; } - + +SDValue ARMSelectionDAGInfo::EmitMemcpyAsLdSt( + SelectionDAG &DAG, SDLoc dl, const ARMSubtarget &Subtarget, SDValue Chain, + SDValue Dst, SDValue Src, uint64_t SizeVal, bool isVolatile, @@ -179,7 +184,7 @@ index c57825949c1c..12db2ab1fca2 100644 @@ -192,6 +309,10 @@ SDValue ARMSelectionDAGInfo::EmitTargetCodeForMemcpy( return EmitSpecializedLibcall(DAG, dl, Chain, Dst, Src, Size, Alignment.value(), RTLIB::MEMCPY); - + + if (Subtarget.useInlineMemcpyAsLdSt()) + return EmitMemcpyAsLdSt(DAG, dl, Subtarget, Chain, Dst, Src, SizeVal, + isVolatile, DstPtrInfo, SrcPtrInfo); @@ -194,7 +199,7 @@ index 275b1c0f8dc0..6ff422c15b12 100644 @@ -44,6 +44,12 @@ public: MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) const override; - + + SDValue EmitMemcpyAsLdSt(SelectionDAG &DAG, SDLoc dl, + const ARMSubtarget &Subtarget, SDValue Chain, + SDValue Dst, SDValue Src, uint64_t SizeVal, @@ -204,6 +209,6 @@ index 275b1c0f8dc0..6ff422c15b12 100644 SDValue EmitTargetCodeForMemmove(SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, SDValue Dst, SDValue Src, SDValue Size, --- +-- 2.34.1 From 77002e716e6659149a3a539f9cb14d6e87a5d6a7 Mon Sep 17 00:00:00 2001 From: Vrukesh Panse Date: Wed, 6 Nov 2024 15:12:27 +0000 Subject: [PATCH 06/16] Add combinations of commands for which multi-lib is found successfully (#550) Add combinations of commands for which multi-lib is found successfully --------- Co-authored-by: Vrukesh V Panse --- .../aarch64_a_supported_variants.test | 35 + .../aarch64_r_supported_variants.test | 5 + test/multilib/arm_a_supported_variants.test | 1190 +++++++++++++++++ test/multilib/arm_m_supported_variants.test | 695 ++++++++++ test/multilib/arm_r_supported_variants.test | 169 +++ 5 files changed, 2094 insertions(+) create mode 100644 test/multilib/aarch64_a_supported_variants.test create mode 100644 test/multilib/aarch64_r_supported_variants.test create mode 100644 test/multilib/arm_a_supported_variants.test create mode 100644 test/multilib/arm_m_supported_variants.test create mode 100644 test/multilib/arm_r_supported_variants.test diff --git a/test/multilib/aarch64_a_supported_variants.test b/test/multilib/aarch64_a_supported_variants.test new file mode 100644 index 0000000..5e4563b --- /dev/null +++ b/test/multilib/aarch64_a_supported_variants.test @@ -0,0 +1,35 @@ +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.1-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.1-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.2-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.2-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.3-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.3-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.4-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.4-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.5-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.5-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.6-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.6-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.7-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.7-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.8-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.8-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.9-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.9-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9.1-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9.1-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9.2-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9.2-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9.3-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9.3-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9.4-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9.4-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9.5-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9.5-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines + +# CHECK-NOT: error +# CHECK-NOT: warning diff --git a/test/multilib/aarch64_r_supported_variants.test b/test/multilib/aarch64_r_supported_variants.test new file mode 100644 index 0000000..6153674 --- /dev/null +++ b/test/multilib/aarch64_r_supported_variants.test @@ -0,0 +1,5 @@ +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8-r 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8-r -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines + +# CHECK-NOT: error +# CHECK-NOT: warning diff --git a/test/multilib/arm_a_supported_variants.test b/test/multilib/arm_a_supported_variants.test new file mode 100644 index 0000000..bf7c458 --- /dev/null +++ b/test/multilib/arm_a_supported_variants.test @@ -0,0 +1,1190 @@ +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines + +# CHECK-NOT: error +# CHECK-NOT: warning diff --git a/test/multilib/arm_m_supported_variants.test b/test/multilib/arm_m_supported_variants.test new file mode 100644 index 0000000..f086bd6 --- /dev/null +++ b/test/multilib/arm_m_supported_variants.test @@ -0,0 +1,695 @@ +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines + +# CHECK-NOT: error +# CHECK-NOT: warning diff --git a/test/multilib/arm_r_supported_variants.test b/test/multilib/arm_r_supported_variants.test new file mode 100644 index 0000000..0d66a5b --- /dev/null +++ b/test/multilib/arm_r_supported_variants.test @@ -0,0 +1,169 @@ +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines + +# CHECK-NOT: error +# CHECK-NOT: warning From 6bc2011681c7c7514da398bdcf768ac18e9831ba Mon Sep 17 00:00:00 2001 From: simpal01 Date: Thu, 14 Nov 2024 13:44:13 +0000 Subject: [PATCH 07/16] Downstream patch to add bootcode for AArch64 FVPs #852 (#564) This patch: 1. Create new picolibc changes in downstream to add bootcode for AArch64 FVPs which is authored by: **Oliver Stannard**. The AArch64 FVP (Fixed Virtual Platform) models differ from QEMU in a few ways which affect the crt0 code: * The memory map is different, so needs different page tables. * They boot up at EL3, instead of EL1, so we need to set the EL3 versions of the system registers. * Add option to build crt0 bootcode for different machines * Build new FVP variants of crt0, instead of replacing QEMU ones * Split assembly parts of AArch64 crt0 into a separate file * Make error checking target-specific And also this patch: 1. Split and group the related picolibc changes into single patch. 2. Do the necessary changes in the documentation to reflect these changes. --- CMakeLists.txt | 9 +- docs/building-from-source.md | 2 +- .../0001-Enable-libcxx-builds.patch} | 16 +- .../0002-Add-bootcode-for-AArch64-FVPs.patch | 870 ++++++++++++++++++ 4 files changed, 892 insertions(+), 5 deletions(-) rename patches/{picolibc.patch => picolibc/0001-Enable-libcxx-builds.patch} (74%) create mode 100644 patches/picolibc/0002-Add-bootcode-for-AArch64-FVPs.patch diff --git a/CMakeLists.txt b/CMakeLists.txt index cefbcb3..6d1bebc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,7 +47,7 @@ # git -C repos clone https://github.com/llvm/llvm-project.git # git -C repos/llvm-project am -k $PWD/patches/llvm-project/*.patch # git -C repos clone https://github.com/picolibc/picolibc.git -# git -C repos/picolibc apply $PWD/patches/picolibc.patch +# git -C repos/picolibc apply $PWD/patches/picolibc/*.patch # mkdir build # cd build # cmake .. -GNinja -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=../repos/llvm-project -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=../repos/picolibc @@ -289,6 +289,11 @@ set(LLVM_PATCH_COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/p if(APPLY_LLVM_PERFORMANCE_PATCHES) set(LLVM_PATCH_COMMAND ${LLVM_PATCH_COMMAND} && ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/patch_llvm.py ${CMAKE_CURRENT_SOURCE_DIR}/patches/llvm-project-perf) endif() +set( + picolibc_patches + ${CMAKE_CURRENT_SOURCE_DIR}/patches/picolibc/0001-Enable-libcxx-builds.patch + ${CMAKE_CURRENT_SOURCE_DIR}/patches/picolibc/0002-Add-bootcode-for-AArch64-FVPs.patch +) FetchContent_Declare(llvmproject GIT_REPOSITORY https://github.com/llvm/llvm-project.git @@ -308,7 +313,7 @@ FetchContent_Declare(picolibc GIT_TAG "${picolibc_TAG}" GIT_SHALLOW "${picolibc_SHALLOW}" GIT_PROGRESS TRUE - PATCH_COMMAND git reset --quiet --hard && git clean --quiet --force -dx && git apply ${CMAKE_CURRENT_SOURCE_DIR}/patches/picolibc.patch + PATCH_COMMAND git reset --quiet --hard && git clean --quiet --force -dx && git apply ${picolibc_patches} # We only want to download the content, not configure it at this # stage. picolibc will be built in many configurations using # ExternalProject_Add using the sources that are checked out here. diff --git a/docs/building-from-source.md b/docs/building-from-source.md index 823d2ab..80c3366 100644 --- a/docs/building-from-source.md +++ b/docs/building-from-source.md @@ -89,7 +89,7 @@ mkdir repos git -C repos clone https://github.com/llvm/llvm-project.git git -C repos/llvm-project am -k "$PWD"/patches/llvm-project/*.patch git -C repos clone https://github.com/picolibc/picolibc.git -git -C repos/picolibc apply "$PWD"/patches/picolibc.patch +git -C repos/picolibc apply "$PWD"/patches/picolibc/*.patch mkdir build cd build cmake .. -GNinja -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=../repos/llvm-project -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=../repos/picolibc diff --git a/patches/picolibc.patch b/patches/picolibc/0001-Enable-libcxx-builds.patch similarity index 74% rename from patches/picolibc.patch rename to patches/picolibc/0001-Enable-libcxx-builds.patch index a77d879..4ff07a1 100644 --- a/patches/picolibc.patch +++ b/patches/picolibc/0001-Enable-libcxx-builds.patch @@ -1,8 +1,20 @@ +From 42f07bef7775a1387f9707e959f8b6782f9d6808 Mon Sep 17 00:00:00 2001 +From: Simi Pallipurath +Date: Thu, 14 Nov 2024 10:07:08 +0000 +Subject: [PATCH 1/2] [PATCH 1/2] Enable libcxx builds + +Modifications to build config and linker script required to enable +libc++ builds. +--- + meson.build | 12 ++++++++++++ + picolibc.ld.in | 3 +++ + 2 files changed, 15 insertions(+) + diff --git a/meson.build b/meson.build -index f90f5b818..2f8d63733 100644 +index 012d664bd..4161d6574 100644 --- a/meson.build +++ b/meson.build -@@ -1310,6 +1310,18 @@ if get_option('newlib-retargetable-locking') != get_option('newlib-multithread') +@@ -1318,6 +1318,18 @@ if get_option('newlib-retargetable-locking') != get_option('newlib-multithread') error('newlib-retargetable-locking and newlib-multithread must be set to the same value') endif diff --git a/patches/picolibc/0002-Add-bootcode-for-AArch64-FVPs.patch b/patches/picolibc/0002-Add-bootcode-for-AArch64-FVPs.patch new file mode 100644 index 0000000..cde586a --- /dev/null +++ b/patches/picolibc/0002-Add-bootcode-for-AArch64-FVPs.patch @@ -0,0 +1,870 @@ +From f2ca20cebc85850a50b80424bb0f81c927edd04b Mon Sep 17 00:00:00 2001 +From: Simi Pallipurath +Date: Thu, 14 Nov 2024 10:12:33 +0000 +Subject: [PATCH 2/2] [PATCH 2/2] Add bootcode for AArch64 FVPs + +The AArch64 FVP (Fixed Virtual Platform) models differ from QEMU in a +few ways which affect the crt0 code: + +* The memory map is different, so needs different page tables. +* They boot up at EL3, instead of EL1, so we need to set the EL3 versions of the system registers. +* Add option to build crt0 bootcode for different machines +* Build new FVP variants of crt0, instead of replacing QEMU ones +* Split assembly parts of AArch64 crt0 into a separate file +* Make error checking target-specific +--- + meson.build | 1 + + meson_options.txt | 3 + + picocrt/machine/aarch64/crt0.S | 200 +++++++++++++++++++ + picocrt/machine/aarch64/crt0.c | 198 +++---------------- + picocrt/machine/aarch64/meson.build | 9 +- + picocrt/meson.build | 296 ++++++++++++++++------------ + 6 files changed, 404 insertions(+), 303 deletions(-) + create mode 100644 picocrt/machine/aarch64/crt0.S + +diff --git a/meson.build b/meson.build +index 4161d6574..9d3f5c672 100644 +--- a/meson.build ++++ b/meson.build +@@ -151,6 +151,7 @@ multilib_exclude = get_option('multilib-exclude') + enable_picolib = get_option('picolib') + enable_picocrt = get_option('picocrt') + enable_picocrt_lib = get_option('picocrt-lib') ++test_machine = get_option('test-machine') + enable_semihost = get_option('semihost') + enable_tests = get_option('tests') + if get_option('tests-cdefs') == 'auto' +diff --git a/meson_options.txt b/meson_options.txt +index e0eacb443..766129ebd 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -132,6 +132,9 @@ option('test-stdin', type: 'boolean', value: false, + description: 'Enable tests that use stdin. This only works on a few targets') + option('fortify-source', type: 'combo', choices: ['none', '1', '2', '3'], value: '3', + description: 'Set _FORTIFY_SOURCE= when building tests') ++option('test-machine', type: 'string', value: 'qemu', ++ description: 'Machine-specific startup code to use when running tests') ++ + + option('tinystdio', type: 'boolean', value: true, + description: 'Use tiny stdio from avr libc') +diff --git a/picocrt/machine/aarch64/crt0.S b/picocrt/machine/aarch64/crt0.S +new file mode 100644 +index 000000000..4cb19854a +--- /dev/null ++++ b/picocrt/machine/aarch64/crt0.S +@@ -0,0 +1,200 @@ ++/************ Page table ************/ ++/* ++ * The smallest VA we can construct is 8GB, which needs 8 block page table ++ * entries, each covering 1GiB. ++ */ ++#define MMU_BLOCK_COUNT 8 ++ ++#define MMU_DESCRIPTOR_VALID (1 << 0) ++#define MMU_DESCRIPTOR_BLOCK (0 << 1) ++#define MMU_DESCRIPTOR_TABLE (1 << 1) ++ ++#define MMU_BLOCK_XN (1LL << 54) ++#define MMU_BLOCK_PXN (1LL << 53) ++#define MMU_BLOCK_CONTIG (1LL << 52) ++#define MMU_BLOCK_DBM (1LL << 51) ++#define MMU_BLOCK_GP (1LL << 50) ++ ++#define MMU_BLOCK_NT (1 << 16) ++#define MMU_BLOCK_OA_BIT 12 ++#define MMU_BLOCK_NG (1 << 11) ++#define MMU_BLOCK_AF (1 << 10) ++#define MMU_BLOCK_SH_BIT 8 ++#define MMU_BLOCK_SH_NS (0 << MMU_BLOCK_SH_BIT) ++#define MMU_BLOCK_SH_OS (2 << MMU_BLOCK_SH_BIT) ++#define MMU_BLOCK_SH_IS (3 << MMU_BLOCK_SH_BIT) ++#define MMU_BLOCK_AP_BIT 6 ++#define MMU_BLOCK_NS (1 << 5) ++#define MMU_BLOCK_ATTR_BIT 2 ++ ++#define MMU_NORMAL_FLAGS (MMU_DESCRIPTOR_VALID | \ ++ MMU_DESCRIPTOR_BLOCK | \ ++ MMU_BLOCK_AF | \ ++ MMU_BLOCK_SH_IS | \ ++ (0 << MMU_BLOCK_ATTR_BIT)) ++ ++#define MMU_DEVICE_FLAGS (MMU_DESCRIPTOR_VALID | \ ++ MMU_DESCRIPTOR_BLOCK | \ ++ MMU_BLOCK_AF | \ ++ (1 << MMU_BLOCK_ATTR_BIT)) ++ ++#define MMU_INVALID_FLAGS 0 ++ ++ .macro start_page_table ++ .section .rodata ++ .global __identity_page_table ++ .balign 65536 ++__identity_page_table: ++ .set block_num, 0 ++ .endm ++ ++ .macro page_table_entries count, flags ++ .rept \count ++ .8byte (block_num << 30) | \flags ++ .set block_num, block_num + 1 ++ .endr ++ .endm ++ ++ .macro end_page_table ++ .size __identity_page_table, MMU_BLOCK_COUNT * 8 ++ .if block_num != MMU_BLOCK_COUNT ++ .error "Wrong number of page table entries" ++ .endif ++ .endm ++ ++#if defined(MACHINE_qemu) ++ start_page_table ++ // [0x0000_0000,0x8000_0000): 2GiB normal memory ++ page_table_entries 2, MMU_NORMAL_FLAGS ++ // [0x8000_0000,0x1_0000_0000): 2GiB device memory ++ page_table_entries 2, MMU_DEVICE_FLAGS ++ // [0x1_0000_0000,0x2_0000_0000): 4GiB un-mapped ++ page_table_entries 4, MMU_INVALID_FLAGS ++ end_page_table ++#elif defined(MACHINE_fvp) ++ start_page_table ++ // [0x0000_0000,0x8000_0000): 2GiB unmapped. This actually contains a lot ++ // of different memory regions and devices, but we don't need any of them ++ // for testing. ++ page_table_entries 2, MMU_INVALID_FLAGS ++ // [0x8000_0000,0x1_0000_0000): 2GiB normal memory ++ page_table_entries 2, MMU_NORMAL_FLAGS ++ // [0x1_0000_0000,0x2_0000_0000): 4GiB un-mapped ++ page_table_entries 4, MMU_INVALID_FLAGS ++ end_page_table ++#else ++#error "Unknown machine type" ++#endif ++ ++ ++/************ Entry point ************/ ++ ++ // Defined in crt0.c ++ .global _cstart ++ .type cstart, %function ++ ++ // _start: Main entry point function, sets up the hardware to the point where ++ // we can execute C code. ++ .section .text.init.enter, "ax", %progbits ++ .global _start ++ .type _start, %function ++_start: ++ /* Use EL-banked stack pointer */ ++ msr SPSel, #1 ++ ++ /* Initialize stack */ ++ adrp x1, __stack ++ add x1, x1, :lo12:__stack ++ mov sp, x1 ++ ++ /* Enable FPU */ ++#if __ARM_FP ++#if defined(MACHINE_qemu) ++ mov x1, #(0x3 << 20) ++ msr CPACR_EL1, x1 ++#elif defined(MACHINE_fvp) ++ mrs x0, CPTR_EL3 ++ /* Clear CPTR_ELx.TFP, to enable FP/SIMD instructions at EL0 and EL1. */ ++ and x0, x0, #~(1<<10) ++ /* Set CPTR_ELx.EZ and .ESM, to enable SVE and SME instructions at EL3. These ++ * bits are ignored for cores which don't have the relevant feature. */ ++ ORR x0, x0, #1<<8 ++ ORR x0, x0, #1<<12 ++ msr CPTR_EL3, x0 ++#else ++#error "Unknown machine type" ++#endif ++#endif // __ARM_FP ++ ++ /* Jump into C code */ ++ bl _cstart ++ .size _start, .-_start ++ ++ ++ ++/************ Exception handlers ************/ ++#ifdef CRT0_SEMIHOST ++ ++ .macro vector_common ++ sub sp, sp, #256 ++ str x0, [sp, #0] ++ str x1, [sp, #8] ++ str x2, [sp, #16] ++ str x3, [sp, #24] ++ str x4, [sp, #32] ++ str x5, [sp, #40] ++ str x6, [sp, #48] ++ str x7, [sp, #56] ++ str x8, [sp, #64] ++ str x9, [sp, #72] ++ str x10, [sp, #80] ++ str x11, [sp, #88] ++ str x12, [sp, #96] ++ str x13, [sp, #104] ++ str x14, [sp, #112] ++ str x15, [sp, #120] ++ str x16, [sp, #128] ++ str x17, [sp, #136] ++ str x18, [sp, #144] ++ str x19, [sp, #152] ++ str x20, [sp, #160] ++ str x21, [sp, #168] ++ str x22, [sp, #176] ++ str x23, [sp, #184] ++ str x24, [sp, #192] ++ str x25, [sp, #200] ++ str x26, [sp, #208] ++ str x27, [sp, #216] ++ str x28, [sp, #224] ++ str x29, [sp, #232] ++ str x30, [sp, #240] ++#if defined(MACHINE_qemu) ++ mrs x0, ELR_EL1 ++#elif defined(MACHINE_fvp) ++ mrs x0, ELR_EL3 ++#else ++#error "Unknown machine type" ++#endif ++ str x0, [sp, #248] ++ mov x0, sp ++ .endm ++ ++ .global aarch64_fault ++ .type aarch64_fault, %function ++ ++ .macro exception_handler name, number ++ .section .init, "ax", %progbits ++ .global aarch64_\name\()_vector ++ .type aarch64_\name\()_vector, %function ++aarch64_\name\()_vector: ++ vector_common ++ mov x1, #\number ++ b aarch64_fault ++ .endm ++ ++ exception_handler sync, 0 ++ exception_handler irq, 1 ++ exception_handler fiq, 2 ++ exception_handler serror, 3 ++ ++#endif // CRT0_SEMIHOST +diff --git a/picocrt/machine/aarch64/crt0.c b/picocrt/machine/aarch64/crt0.c +index affb41fa9..dfe838111 100644 +--- a/picocrt/machine/aarch64/crt0.c ++++ b/picocrt/machine/aarch64/crt0.c +@@ -60,75 +60,11 @@ _set_tls(void *tls) + + #include "../../crt0.h" + +-/* +- * We need 4 1GB mappings to cover the usual Normal memory space, +- * which runs from 0x00000000 to 0x7fffffff along with the usual +- * Device space which runs from 0x80000000 to 0xffffffff. However, +- * it looks like the smallest VA we can construct is 8GB, so we'll +- * pad the space with invalid PTEs +- */ +-#define MMU_NORMAL_COUNT 2 +-#define MMU_DEVICE_COUNT 2 +-#define MMU_INVALID_COUNT 4 +-extern uint64_t __identity_page_table[MMU_NORMAL_COUNT + MMU_DEVICE_COUNT + MMU_INVALID_COUNT]; +- +-#define MMU_DESCRIPTOR_VALID (1 << 0) +-#define MMU_DESCRIPTOR_BLOCK (0 << 1) +-#define MMU_DESCRIPTOR_TABLE (1 << 1) +- +-#define MMU_BLOCK_XN (1LL << 54) +-#define MMU_BLOCK_PXN (1LL << 53) +-#define MMU_BLOCK_CONTIG (1LL << 52) +-#define MMU_BLOCK_DBM (1LL << 51) +-#define MMU_BLOCK_GP (1LL << 50) +- +-#define MMU_BLOCK_NT (1 << 16) +-#define MMU_BLOCK_OA_BIT 12 +-#define MMU_BLOCK_NG (1 << 11) +-#define MMU_BLOCK_AF (1 << 10) +-#define MMU_BLOCK_SH_BIT 8 +-#define MMU_BLOCK_SH_NS (0 << MMU_BLOCK_SH_BIT) +-#define MMU_BLOCK_SH_OS (2 << MMU_BLOCK_SH_BIT) +-#define MMU_BLOCK_SH_IS (3 << MMU_BLOCK_SH_BIT) +-#define MMU_BLOCK_AP_BIT 6 +-#define MMU_BLOCK_NS (1 << 5) +-#define MMU_BLOCK_ATTR_BIT 2 +- +-#define MMU_NORMAL_FLAGS (MMU_DESCRIPTOR_VALID | \ +- MMU_DESCRIPTOR_BLOCK | \ +- MMU_BLOCK_AF | \ +- MMU_BLOCK_SH_IS | \ +- (0 << MMU_BLOCK_ATTR_BIT)) +- +-#define MMU_DEVICE_FLAGS (MMU_DESCRIPTOR_VALID | \ +- MMU_DESCRIPTOR_BLOCK | \ +- MMU_BLOCK_AF | \ +- (1 << MMU_BLOCK_ATTR_BIT)) +- +-#define MMU_INVALID_FLAGS 0 +- +-__asm__( +- ".section .rodata\n" +- ".global __identity_page_table\n" +- ".balign 65536\n" +- "__identity_page_table:\n" +- ".set _i, 0\n" +- ".rept " __XSTRING(MMU_NORMAL_COUNT) "\n" +- " .8byte (_i << 30) |" __XSTRING(MMU_NORMAL_FLAGS) "\n" +- " .set _i, _i + 1\n" +- ".endr\n" +- ".set _i, 0\n" +- ".rept " __XSTRING(MMU_DEVICE_COUNT) "\n" +- " .8byte (1 << 31) | (_i << 30) |" __XSTRING(MMU_DEVICE_FLAGS) "\n" +- " .set _i, _i + 1\n" +- ".endr\n" +- ".set _i, 0\n" +- ".rept " __XSTRING(MMU_INVALID_COUNT) "\n" +- " .8byte " __XSTRING(MMU_INVALID_FLAGS) "\n" +- " .set _i, _i + 1\n" +- ".endr\n" +- ".size __identity_page_table, " __XSTRING((MMU_NORMAL_COUNT + MMU_DEVICE_COUNT + MMU_INVALID_COUNT) * 8) "\n" +-); ++/* Defined in crt0.S */ ++#define MMU_BLOCK_COUNT 8 ++extern uint64_t __identity_page_table[MMU_BLOCK_COUNT]; ++extern void _start(void); ++extern const void *__vector_table[]; + + #define SCTLR_MMU (1 << 0) + #define SCTLR_A (1 << 1) +@@ -159,12 +95,19 @@ __asm__( + #define TCR_IPS_BIT 32 + #define TCR_IPS_4GB (0LL << TCR_IPS_BIT) + +-extern const void *__vector_table[]; ++/* QEMU boots into EL1, and FVPs boot into EL3, so we need to use the correct ++ * system registers. */ ++#if defined(MACHINE_qemu) ++#define BOOT_EL "EL1" ++#elif defined(MACHINE_fvp) ++#define BOOT_EL "EL3" ++#else ++#error "Unknown machine type" ++#endif + +-static void __attribute((used)) +-_cstart(void) ++void _cstart(void) + { +- uint64_t sctlr_el1; ++ uint64_t sctlr; + + /* Invalidate the cache */ + __asm__("ic iallu"); +@@ -174,7 +117,7 @@ _cstart(void) + * Set up the TCR register to provide a 33bit VA space using + * 4kB pages over 4GB of PA + */ +- __asm__("msr tcr_el1, %x0" :: ++ __asm__("msr tcr_"BOOT_EL", %x0" :: + "r" ((0x1f << TCR_T0SZ_BIT) | + TCR_IRGN0_WB_WA | + TCR_ORGN0_WB_WA | +@@ -184,7 +127,7 @@ _cstart(void) + TCR_IPS_4GB)); + + /* Load the page table base */ +- __asm__("msr ttbr0_el1, %x0" :: "r" (__identity_page_table)); ++ __asm__("msr ttbr0_"BOOT_EL", %x0" :: "r" (__identity_page_table)); + + /* + * Set the memory attributions in the MAIR register: +@@ -192,42 +135,24 @@ _cstart(void) + * Region 0 is Normal memory + * Region 1 is Device memory + */ +- __asm__("msr mair_el1, %x0" :: ++ __asm__("msr mair_"BOOT_EL", %x0" :: + "r" ((0xffLL << 0) | (0x00LL << 8))); + + /* + * Enable caches, and the MMU, disable alignment requirements + * and write-implies-XN + */ +- __asm__("mrs %x0, sctlr_el1" : "=r" (sctlr_el1)); +- sctlr_el1 |= SCTLR_ICACHE | SCTLR_C | SCTLR_MMU; +- sctlr_el1 &= ~(SCTLR_A | SCTLR_WXN); +- __asm__("msr sctlr_el1, %x0" :: "r" (sctlr_el1)); ++ __asm__("mrs %x0, sctlr_"BOOT_EL"" : "=r" (sctlr)); ++ sctlr |= SCTLR_ICACHE | SCTLR_C | SCTLR_MMU; ++ sctlr &= ~(SCTLR_A | SCTLR_WXN); ++ __asm__("msr sctlr_"BOOT_EL", %x0" :: "r" (sctlr)); + __asm__("isb\n"); + + /* Set the vector base address register */ +- __asm__("msr vbar_el1, %x0" :: "r" (__vector_table)); ++ __asm__("msr vbar_"BOOT_EL", %x0" :: "r" (__vector_table)); + __start(); + } + +-void __section(".text.init.enter") +-_start(void) +-{ +- /* Switch to EL1 */ +- __asm__("msr SPSel, #1"); +- +- /* Initialize stack */ +- __asm__("adrp x1, __stack"); +- __asm__("add x1, x1, :lo12:__stack"); +- __asm__("mov sp, x1"); +-#if __ARM_FP +- /* Enable FPU */ +- __asm__("mov x1, #(0x3 << 20)"); +- __asm__("msr cpacr_el1,x1"); +-#endif +- /* Jump into C code */ +- __asm__("bl _cstart"); +-} + + #ifdef CRT0_SEMIHOST + +@@ -269,13 +194,9 @@ static const char *const reasons[] = { + "serror\n" + }; + +-#define REASON_SYNC 0 +-#define REASON_IRQ 1 +-#define REASON_FIQ 2 +-#define REASON_SERROR 3 +- +-static void __attribute__((used)) +-aarch64_fault(struct fault *f, int reason) ++/* Called from assembly wrappers in crt0.S, which fills *f with the register ++ * values at the point the fault happened. */ ++void aarch64_fault(struct fault *f, int reason) + { + int r; + fputs("AARCH64 fault: ", stdout); +@@ -292,69 +213,4 @@ aarch64_fault(struct fault *f, int reason) + _exit(1); + } + +-#define VECTOR_COMMON \ +- __asm__("sub sp, sp, #256"); \ +- __asm__("str x0, [sp, #0]"); \ +- __asm__("str x1, [sp, #8]"); \ +- __asm__("str x2, [sp, #16]"); \ +- __asm__("str x3, [sp, #24]"); \ +- __asm__("str x4, [sp, #32]"); \ +- __asm__("str x5, [sp, #40]"); \ +- __asm__("str x6, [sp, #48]"); \ +- __asm__("str x7, [sp, #56]"); \ +- __asm__("str x8, [sp, #64]"); \ +- __asm__("str x9, [sp, #72]"); \ +- __asm__("str x10, [sp, #80]"); \ +- __asm__("str x11, [sp, #88]"); \ +- __asm__("str x12, [sp, #96]"); \ +- __asm__("str x13, [sp, #104]"); \ +- __asm__("str x14, [sp, #112]"); \ +- __asm__("str x15, [sp, #120]"); \ +- __asm__("str x16, [sp, #128]"); \ +- __asm__("str x17, [sp, #136]"); \ +- __asm__("str x18, [sp, #144]"); \ +- __asm__("str x19, [sp, #152]"); \ +- __asm__("str x20, [sp, #160]"); \ +- __asm__("str x21, [sp, #168]"); \ +- __asm__("str x22, [sp, #176]"); \ +- __asm__("str x23, [sp, #184]"); \ +- __asm__("str x24, [sp, #192]"); \ +- __asm__("str x25, [sp, #200]"); \ +- __asm__("str x26, [sp, #208]"); \ +- __asm__("str x27, [sp, #216]"); \ +- __asm__("str x28, [sp, #224]"); \ +- __asm__("str x29, [sp, #232]"); \ +- __asm__("str x30, [sp, #240]"); \ +- __asm__("mrs x0, ELR_EL1\n"); \ +- __asm__("str x0, [sp, #248]"); \ +- __asm__("mrs x0, ESR_EL1\n"); \ +- __asm__("str x0, [sp, #256]"); \ +- __asm__("mrs x0, FAR_EL1\n"); \ +- __asm__("str x0, [sp, #264]"); \ +- __asm__("mov x0, sp") +- +-void __section(".init") +-aarch64_sync_vector(void) +-{ +- VECTOR_COMMON; +- __asm__("mov x1, #" REASON(REASON_SYNC)); +- __asm__("b aarch64_fault"); +-} +- +-void __section(".init") +-aarch64_irq_vector(void) +-{ +- VECTOR_COMMON; +- __asm__("mov x1, #" REASON(REASON_IRQ)); +- __asm__("b aarch64_fault"); +-} +- +-void __section(".init") +-aarch64_fiq_vector(void) +-{ +- VECTOR_COMMON; +- __asm__("mov x1, #" REASON(REASON_FIQ)); +- __asm__("b aarch64_fault"); +-} +- + #endif /* CRT0_SEMIHOST */ +diff --git a/picocrt/machine/aarch64/meson.build b/picocrt/machine/aarch64/meson.build +index 808d691a5..923d32c3b 100644 +--- a/picocrt/machine/aarch64/meson.build ++++ b/picocrt/machine/aarch64/meson.build +@@ -32,4 +32,11 @@ + # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + # OF THE POSSIBILITY OF SUCH DAMAGE. + # +-src_picocrt += files('crt0.c') ++src_picocrt += files('crt0.c', 'crt0.S') ++ ++picocrt_machines += [ ++ { ++ 'name': 'fvp', ++ 'suffix': '-fvp', ++ }, ++] +diff --git a/picocrt/meson.build b/picocrt/meson.build +index 76965990f..be8f875be 100644 +--- a/picocrt/meson.build ++++ b/picocrt/meson.build +@@ -36,6 +36,17 @@ + src_picocrt = [] + src_picocrt_none = files('crt0-none.c') + ++# Machine-specific crt0 variants to build. ++picocrt_machines = [ ++ { ++ # Must match a valid value of the 'test-machine' option, and will cause the ++ # MACHINE_ preprocessor macro to be defined when compiling crt0. ++ 'name': 'qemu', ++ # Suffix used on file names, QEMU's is empty because it is the default. ++ 'suffix': '', ++ }, ++] ++ + machine_dir = 'machine' / host_cpu_family + picocrt_march_add='' + if fs.is_dir(machine_dir) +@@ -44,6 +55,16 @@ else + src_picocrt = files('shared/crt0.c') + endif + ++machine_found = false ++foreach machine : picocrt_machines ++ if machine['name'] == test_machine ++ machine_found = true ++ endif ++endforeach ++if not machine_found ++ error(test_machine + ': requested test machine not found') ++endif ++ + foreach target : targets + value = get_variable('target_' + target) + +@@ -60,150 +81,163 @@ foreach target : targets + value = [value[0], new_cflags] + endif + +- if target == '' +- crt_name = 'crt0.o' +- crt_hosted_name = 'crt0-hosted.o' +- crt_minimal_name = 'crt0-minimal.o' +- crt_semihost_name = 'crt0-semihost.o' +- crt_none_name = 'crt0-none.o' +- libcrt_name = 'crt0' +- libcrt_hosted_name = 'crt0-hosted' +- libcrt_minimal_name = 'crt0-minimal' +- libcrt_semihost_name = 'crt0-semihost' +- libcrt_none_name = 'crt0-none' +- else +- crt_name = join_paths(target, 'crt0.o') +- crt_hosted_name = join_paths(target, 'crt0-hosted.o') +- crt_minimal_name = join_paths(target, 'crt0-minimal.o') +- crt_semihost_name = join_paths(target, 'crt0-semihost.o') +- crt_none_name = join_paths(target, 'crt0-none.o') +- libcrt_name = join_paths(target, 'libcrt0') +- libcrt_hosted_name = join_paths(target, 'libcrt0-hosted') +- libcrt_minimal_name = join_paths(target, 'libcrt0-minimal') +- libcrt_semihost_name = join_paths(target, 'libcrt0-semihost') +- libcrt_none_name = join_paths(target, 'libcrt0-none') +- endif ++ foreach machine : picocrt_machines ++ suffix = machine['suffix'] ++ if target == '' ++ crt_name = 'crt0' + suffix + '.o' ++ crt_hosted_name = 'crt0-hosted' + suffix + '.o' ++ crt_minimal_name = 'crt0-minimal' + suffix + '.o' ++ crt_semihost_name = 'crt0-semihost' + suffix + '.o' ++ crt_none_name = 'crt0-none' + suffix + '.o' ++ libcrt_name = 'crt0' + suffix ++ libcrt_hosted_name = 'crt0-hosted' + suffix ++ libcrt_minimal_name = 'crt0-minimal' + suffix ++ libcrt_semihost_name = 'crt0-semihost' + suffix ++ libcrt_none_name = 'crt0-none' + suffix ++ else ++ crt_name = join_paths(target, 'crt0' + suffix + '.o') ++ crt_hosted_name = join_paths(target, 'crt0-hosted' + suffix + '.o') ++ crt_minimal_name = join_paths(target, 'crt0-minimal' + suffix + '.o') ++ crt_semihost_name = join_paths(target, 'crt0-semihost' + suffix + '.o') ++ crt_none_name = join_paths(target, 'crt0-none' + suffix + '.o') ++ libcrt_name = join_paths(target, 'libcrt0' + suffix) ++ libcrt_hosted_name = join_paths(target, 'libcrt0-hosted' + suffix) ++ libcrt_minimal_name = join_paths(target, 'libcrt0-minimal' + suffix) ++ libcrt_semihost_name = join_paths(target, 'libcrt0-semihost' + suffix) ++ libcrt_none_name = join_paths(target, 'libcrt0-none' + suffix) ++ endif + +- crt0_name = 'crt0' + target +- crt0_hosted_name = 'crt0_hosted' + target +- crt0_minimal_name = 'crt0_minimal' + target +- crt0_semihost_name = 'crt0_semihost' + target +- crt0_none_name = 'crt0_none' + target +- +- _c_args = value[1] + arg_fnobuiltin + ['-ffreestanding'] +- _link_args = value[1] + ['-r', '-ffreestanding'] +- +- # The normal variant does not call 'exit' after return from main (c lingo: freestanding execution environment) +- _crt = executable(crt_name, +- src_picocrt, +- include_directories : inc, +- install : true, +- install_dir : instdir, +- c_args : _c_args, +- link_args : _link_args) +- +- set_variable(crt0_name, +- _crt.extract_objects(src_picocrt) +- ) +- +- if enable_picocrt_lib +- static_library(libcrt_name, +- [], +- include_directories : inc, +- install : true, +- install_dir : instdir, +- c_args : _c_args, +- objects: get_variable(crt0_name), +- pic: false) +- endif ++ crt0_name = 'crt0' + target ++ crt0_hosted_name = 'crt0_hosted' + target ++ crt0_minimal_name = 'crt0_minimal' + target ++ crt0_semihost_name = 'crt0_semihost' + target ++ crt0_none_name = 'crt0_none' + target ++ ++ _c_args = value[1] + arg_fnobuiltin + ['-ffreestanding', '-DMACHINE_' + machine['name']] ++ _link_args = value[1] + ['-r', '-ffreestanding'] ++ ++ # The normal variant does not call 'exit' after return from main (c lingo: freestanding execution environment) ++ _crt = executable(crt_name, ++ src_picocrt, ++ include_directories : inc, ++ install : true, ++ install_dir : instdir, ++ c_args : _c_args, ++ link_args : _link_args) ++ ++ if machine['name'] == test_machine ++ set_variable(crt0_name, ++ _crt.extract_objects(src_picocrt) ++ ) ++ endif + +- # The 'hosted' variant calls 'exit' after return from main (c lingo: hosted execution environment) +- _crt = executable(crt_hosted_name, +- src_picocrt, +- include_directories : inc, +- install : true, +- install_dir : instdir, +- c_args : _c_args + ['-DCRT0_EXIT'], +- link_args : _link_args) +- +- set_variable(crt0_hosted_name, +- _crt.extract_objects(src_picocrt) +- ) +- +- if enable_picocrt_lib +- static_library(libcrt_hosted_name, +- [], +- include_directories : inc, +- install : true, +- install_dir : instdir, +- pic: false, +- objects: get_variable(crt0_hosted_name), +- c_args : value[1] + ['-DCRT0_EXIT']) +- endif ++ if enable_picocrt_lib ++ static_library(libcrt_name, ++ [], ++ include_directories : inc, ++ install : true, ++ install_dir : instdir, ++ c_args : _c_args, ++ objects: _crt.extract_objects(src_picocrt), ++ pic: false) ++ endif + +- # The 'minimal' variant doesn't call exit, nor does it invoke any constructors +- _crt = executable(crt_minimal_name, +- src_picocrt, +- include_directories : inc, +- install : true, +- install_dir : instdir, +- c_args : _c_args + ['-DCONSTRUCTORS=0'], +- link_args : _link_args) +- +- set_variable(crt0_minimal_name, +- _crt.extract_objects(src_picocrt) +- ) +- +- if enable_picocrt_lib +- static_library(libcrt_minimal_name, +- [], +- include_directories : inc, +- install : true, +- install_dir : instdir, +- pic: false, +- objects: get_variable(crt0_minimal_name), +- c_args : _c_args + ['-DCONSTRUCTORS=0']) +- endif ++ # The 'hosted' variant calls 'exit' after return from main (c lingo: hosted execution environment) ++ _crt = executable(crt_hosted_name, ++ src_picocrt, ++ include_directories : inc, ++ install : true, ++ install_dir : instdir, ++ c_args : _c_args + ['-DCRT0_EXIT'], ++ link_args : _link_args) ++ ++ if machine['name'] == test_machine ++ set_variable(crt0_hosted_name, ++ _crt.extract_objects(src_picocrt) ++ ) ++ endif + +- if has_arm_semihost +- # The 'semihost' variant calls sys_semihost_get_cmdline to build argv +- # and calls exit when main returns +- _crt = executable(crt_semihost_name, +- src_picocrt, +- include_directories : inc, +- install : true, +- install_dir : instdir, +- c_args : _c_args + ['-DCRT0_EXIT', '-DCRT0_SEMIHOST'], +- link_args : _link_args) +- +- set_variable(crt0_semihost_name, +- _crt.extract_objects(src_picocrt) +- ) ++ if enable_picocrt_lib ++ static_library(libcrt_hosted_name, ++ [], ++ include_directories : inc, ++ install : true, ++ install_dir : instdir, ++ pic: false, ++ objects: _crt.extract_objects(src_picocrt), ++ c_args : value[1] + ['-DCRT0_EXIT']) ++ endif ++ ++ # The 'minimal' variant doesn't call exit, nor does it invoke any constructors ++ _crt = executable(crt_minimal_name, ++ src_picocrt, ++ include_directories : inc, ++ install : true, ++ install_dir : instdir, ++ c_args : _c_args + ['-DCONSTRUCTORS=0'], ++ link_args : _link_args) ++ ++ if machine['name'] == test_machine ++ set_variable(crt0_minimal_name, ++ _crt.extract_objects(src_picocrt) ++ ) ++ endif + + if enable_picocrt_lib +- static_library(libcrt_semihost_name, ++ static_library(libcrt_minimal_name, + [], +- include_directories : inc, ++ include_directories : inc, + install : true, + install_dir : instdir, + pic: false, +- objects: get_variable(crt0_semihost_name), +- c_args : value[1] + ['-DCRT0_EXIT', '-DCRT0_SEMIHOST']) ++ objects: _crt.extract_objects(src_picocrt), ++ c_args : _c_args + ['-DCONSTRUCTORS=0']) + endif +- endif + +- # The 'none' variant is completely empty +- _crt = executable(crt_none_name, +- src_picocrt_none, +- include_directories : inc, +- install : true, +- install_dir : instdir, +- c_args : _c_args, +- link_args : _link_args) ++ if has_arm_semihost ++ # The 'semihost' variant calls sys_semihost_get_cmdline to build argv ++ # and calls exit when main returns ++ _crt = executable(crt_semihost_name, ++ src_picocrt, ++ include_directories : inc, ++ install : true, ++ install_dir : instdir, ++ c_args : _c_args + ['-DCRT0_EXIT', '-DCRT0_SEMIHOST'], ++ link_args : _link_args) ++ ++ if machine['name'] == test_machine ++ set_variable(crt0_semihost_name, ++ _crt.extract_objects(src_picocrt) ++ ) ++ endif + +- set_variable(crt0_none_name, +- _crt.extract_objects(src_picocrt_none) +- ) ++ if enable_picocrt_lib ++ static_library(libcrt_semihost_name, ++ [], ++ include_directories : inc, ++ install : true, ++ install_dir : instdir, ++ pic: false, ++ objects: _crt.extract_objects(src_picocrt), ++ c_args : value[1] + ['-DCRT0_EXIT', '-DCRT0_SEMIHOST']) ++ endif ++ endif ++ ++ # The 'none' variant is completely empty ++ _crt = executable(crt_none_name, ++ src_picocrt_none, ++ include_directories : inc, ++ install : true, ++ install_dir : instdir, ++ c_args : _c_args, ++ link_args : _link_args) ++ ++ if machine['name'] == test_machine ++ set_variable(crt0_none_name, ++ _crt.extract_objects(src_picocrt_none) ++ ) ++ endif + ++ endforeach + + endforeach From 17e7fcf4db40d3fe9ae2a29637ed9ffb4ca22f7d Mon Sep 17 00:00:00 2001 From: Nashe Mncube Date: Thu, 14 Nov 2024 15:17:24 +0000 Subject: [PATCH 08/16] [Perf] Update inlining memcpy patch (#563) The patch file for setting inilining memcpy preference was slightly incorrect. Use of the SmallVector data structure caused issues with correctly inlining on some tests. The optimisation was also not enabled for v8.1m mainline targets as it should be. I've updated the patch file to reflect this. --- Omax.cfg | 1 + ...ble-MEMCPY-LDM-STM-inlining-for-v7-m.patch | 214 ----------- ...-LDM-STM-inlining-preference-for-v7m.patch | 350 ++++++++++++++++++ 3 files changed, 351 insertions(+), 214 deletions(-) delete mode 100644 patches/llvm-project-perf/0002-ARM-CodeGen-Disable-MEMCPY-LDM-STM-inlining-for-v7-m.patch create mode 100644 patches/llvm-project-perf/0002-ARM-Codegen-Set-LDM-STM-inlining-preference-for-v7m.patch diff --git a/Omax.cfg b/Omax.cfg index 6918418..78bec9f 100644 --- a/Omax.cfg +++ b/Omax.cfg @@ -8,3 +8,4 @@ -mllvm -enable-dfa-jump-thread \ -mllvm -enable-loop-flatten \ -mllvm -enable-unroll-and-jam \ +-mllvm -enable-inline-memcpy-ld-st diff --git a/patches/llvm-project-perf/0002-ARM-CodeGen-Disable-MEMCPY-LDM-STM-inlining-for-v7-m.patch b/patches/llvm-project-perf/0002-ARM-CodeGen-Disable-MEMCPY-LDM-STM-inlining-for-v7-m.patch deleted file mode 100644 index b25c6f9..0000000 --- a/patches/llvm-project-perf/0002-ARM-CodeGen-Disable-MEMCPY-LDM-STM-inlining-for-v7-m.patch +++ /dev/null @@ -1,214 +0,0 @@ -From 40f07cbde57022b25412cf1c9239755613500d86 Mon Sep 17 00:00:00 2001 -From: nasmnc01 -Author: Scott Douglass -Date: Tue, 13 Aug 2024 10:55:51 +0100 -Subject: [PATCH] [ARM][CodeGen] Prefer MEMCPY LDM/STM inlining for v7-m - -This patch changes the behaviour of memcpy inlining on v7m targets. -The old behaviour was to inline memcpys with LDM/STM instructions. -Alternatively, using LD/ST instructions for memcpy inlining allowed -for performance gains of 1% to 2% on selected benchmarks. - -Co-authored-by: Nashe Mncube ---- - llvm/lib/Target/ARM/ARMFeatures.td | 5 + - llvm/lib/Target/ARM/ARMProcessors.td | 2 +- - llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp | 121 ++++++++++++++++++++ - llvm/lib/Target/ARM/ARMSelectionDAGInfo.h | 6 + - 4 files changed, 133 insertions(+), 1 deletion(-) - -diff --git a/llvm/lib/Target/ARM/ARMFeatures.td b/llvm/lib/Target/ARM/ARMFeatures.td -index bb437698296c..f7fa00aba424 100644 ---- a/llvm/lib/Target/ARM/ARMFeatures.td -+++ b/llvm/lib/Target/ARM/ARMFeatures.td -@@ -510,6 +510,11 @@ def FeatureNoPostRASched : SubtargetFeature<"disable-postra-scheduler", - "DisablePostRAScheduler", "true", - "Don't schedule again after register allocation">; - -+def FeatureUseInlineMemcpyAsLdSt : -+ SubtargetFeature<"use-inline-memcpy-ldst", "UseInlineMemcpyAsLdSt", -+ "true", "Use memcpy inlining as LD/ST instructions">; -+ -+ - // Armv8.5-A extensions - - // Has speculation barrier. -diff --git a/llvm/lib/Target/ARM/ARMProcessors.td b/llvm/lib/Target/ARM/ARMProcessors.td -index b94a5fc16146..ffb0c86bc687 100644 ---- a/llvm/lib/Target/ARM/ARMProcessors.td -+++ b/llvm/lib/Target/ARM/ARMProcessors.td -@@ -96,7 +96,7 @@ def ProcR52plus : SubtargetFeature<"r52plus", "ARMProcFamily", "CortexR52plus", - def ProcM3 : SubtargetFeature<"m3", "ARMProcFamily", "CortexM3", - "Cortex-M3 ARM processors", []>; - def ProcM7 : SubtargetFeature<"m7", "ARMProcFamily", "CortexM7", -- "Cortex-M7 ARM processors", []>; -+ "Cortex-M7 ARM processors", [FeatureUseInlineMemcpyAsLdSt]>; - - //===----------------------------------------------------------------------===// - // ARM processors -diff --git a/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp b/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp -index c57825949c1c..63ae7a042886 100644 ---- a/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp -+++ b/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp -@@ -12,6 +12,7 @@ - - #include "ARMTargetMachine.h" - #include "ARMTargetTransformInfo.h" -+#include "llvm/ADT/SmallVector.h" - #include "llvm/CodeGen/SelectionDAG.h" - #include "llvm/IR/DerivedTypes.h" - #include "llvm/Support/CommandLine.h" -@@ -138,6 +139,122 @@ SDValue ARMSelectionDAGInfo::EmitSpecializedLibcall( - return CallResult.second; - } - -+SDValue ARMSelectionDAGInfo::EmitMemcpyAsLdSt( -+ SelectionDAG &DAG, SDLoc dl, const ARMSubtarget &Subtarget, SDValue Chain, -+ SDValue Dst, SDValue Src, uint64_t SizeVal, bool isVolatile, -+ MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) const { -+ // Do repeated batches of 4-byte loads and stores. -+ unsigned BytesLeft = SizeVal & 3; -+ unsigned NumMemOps = SizeVal >> 2; -+ unsigned EmittedNumMemOps = 0; -+ EVT VT = MVT::i32; -+ unsigned VTSize = 4; -+ unsigned I = 0; -+ // Emit a maximum of 4 loads in Thumb1 since we have fewer registers -+ const unsigned MaxLoads = Subtarget.isThumb1Only() ? 4 : 6; -+ SmallVector TFOps(6); -+ SmallVector Loads(6); -+ uint64_t SrcOff = 0, DstOff = 0; -+ -+ MachineMemOperand::Flags MOFlags = MachineMemOperand::Flags::MONone; -+ if (isVolatile) -+ MOFlags = MachineMemOperand::Flags::MOVolatile; -+ MachineMemOperand::Flags LoadMOFlags = MOFlags; -+ if (SrcPtrInfo.isDereferenceable(SizeVal, *DAG.getContext(), -+ DAG.getDataLayout())) -+ LoadMOFlags |= MachineMemOperand::Flags::MODereferenceable; -+ if (auto *V = SrcPtrInfo.V.dyn_cast()) -+ if (isa(V) && cast(V)->isConstant()) -+ LoadMOFlags |= MachineMemOperand::Flags::MOInvariant; -+ MachineMemOperand::Flags StoreMOFlags = MOFlags; -+ if (DstPtrInfo.isDereferenceable(SizeVal, *DAG.getContext(), -+ DAG.getDataLayout())) -+ StoreMOFlags |= MachineMemOperand::Flags::MODereferenceable; -+ -+ // Emit up to MaxLoads loads, then a TokenFactor barrier, then the -+ // same number of stores. The loads and stores may get combined into -+ // ldm/stm later on. -+ while (EmittedNumMemOps < NumMemOps) { -+ for (I = 0; I < MaxLoads && EmittedNumMemOps + I < NumMemOps; ++I) { -+ Loads[I] = DAG.getLoad(VT, dl, Chain, -+ DAG.getNode(ISD::ADD, dl, MVT::i32, Src, -+ DAG.getConstant(SrcOff, dl, MVT::i32)), -+ SrcPtrInfo.getWithOffset(SrcOff), MaybeAlign(0), -+ LoadMOFlags); -+ TFOps[I] = Loads[I].getValue(1); -+ SrcOff += VTSize; -+ } -+ Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, -+ ArrayRef(TFOps.data(), I)); -+ -+ for (I = 0; I < MaxLoads && EmittedNumMemOps + I < NumMemOps; ++I) { -+ TFOps[I] = DAG.getStore( -+ Chain, dl, Loads[I], -+ DAG.getNode(ISD::ADD, dl, MVT::i32, Dst, -+ DAG.getConstant(DstOff, dl, MVT::i32)), -+ DstPtrInfo.getWithOffset(DstOff), MaybeAlign(0), StoreMOFlags); -+ DstOff += VTSize; -+ } -+ Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, -+ ArrayRef(TFOps.data(), I)); -+ -+ EmittedNumMemOps += I; -+ } -+ -+ if (BytesLeft == 0) -+ return Chain; -+ -+ // Issue loads / stores for the trailing (1 - 3) bytes. -+ unsigned BytesLeftSave = BytesLeft; -+ I = 0; -+ while (BytesLeft) { -+ if (BytesLeft >= 2) { -+ VT = MVT::i16; -+ VTSize = 2; -+ } else { -+ VT = MVT::i8; -+ VTSize = 1; -+ } -+ -+ Loads[I] = DAG.getLoad(VT, dl, Chain, -+ DAG.getNode(ISD::ADD, dl, MVT::i32, Src, -+ DAG.getConstant(SrcOff, dl, MVT::i32)), -+ SrcPtrInfo.getWithOffset(SrcOff), MaybeAlign(0), -+ LoadMOFlags); -+ -+ TFOps[I] = Loads[I].getValue(1); -+ ++I; -+ SrcOff += VTSize; -+ BytesLeft -= VTSize; -+ } -+ Chain = -+ DAG.getNode(ISD::TokenFactor, dl, MVT::Other, ArrayRef(TFOps.data(), I)); -+ -+ I = 0; -+ BytesLeft = BytesLeftSave; -+ while (BytesLeft) { -+ if (BytesLeft >= 2) { -+ VT = MVT::i16; -+ VTSize = 2; -+ } else { -+ VT = MVT::i8; -+ VTSize = 1; -+ } -+ -+ TFOps[I] = DAG.getStore(Chain, dl, Loads[I], -+ DAG.getNode(ISD::ADD, dl, MVT::i32, Dst, -+ DAG.getConstant(DstOff, dl, MVT::i32)), -+ DstPtrInfo.getWithOffset(DstOff), MaybeAlign(0), -+ StoreMOFlags); -+ ++I; -+ DstOff += VTSize; -+ BytesLeft -= VTSize; -+ } -+ -+ return DAG.getNode(ISD::TokenFactor, dl, MVT::Other, -+ ArrayRef(TFOps.data(), I)); -+} -+ - static bool shouldGenerateInlineTPLoop(const ARMSubtarget &Subtarget, - const SelectionDAG &DAG, - ConstantSDNode *ConstantSize, -@@ -192,6 +309,10 @@ SDValue ARMSelectionDAGInfo::EmitTargetCodeForMemcpy( - return EmitSpecializedLibcall(DAG, dl, Chain, Dst, Src, Size, - Alignment.value(), RTLIB::MEMCPY); - -+ if (Subtarget.useInlineMemcpyAsLdSt()) -+ return EmitMemcpyAsLdSt(DAG, dl, Subtarget, Chain, Dst, Src, SizeVal, -+ isVolatile, DstPtrInfo, SrcPtrInfo); -+ - unsigned BytesLeft = SizeVal & 3; - unsigned NumMemOps = SizeVal >> 2; - unsigned EmittedNumMemOps = 0; -diff --git a/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h b/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h -index 275b1c0f8dc0..6ff422c15b12 100644 ---- a/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h -+++ b/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h -@@ -44,6 +44,12 @@ public: - MachinePointerInfo DstPtrInfo, - MachinePointerInfo SrcPtrInfo) const override; - -+ SDValue EmitMemcpyAsLdSt(SelectionDAG &DAG, SDLoc dl, -+ const ARMSubtarget &Subtarget, SDValue Chain, -+ SDValue Dst, SDValue Src, uint64_t SizeVal, -+ bool isVolatile, MachinePointerInfo DstPtrInfo, -+ MachinePointerInfo SrcPtrInfo) const; -+ - SDValue - EmitTargetCodeForMemmove(SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, - SDValue Dst, SDValue Src, SDValue Size, --- -2.34.1 - diff --git a/patches/llvm-project-perf/0002-ARM-Codegen-Set-LDM-STM-inlining-preference-for-v7m.patch b/patches/llvm-project-perf/0002-ARM-Codegen-Set-LDM-STM-inlining-preference-for-v7m.patch new file mode 100644 index 0000000..20dffa4 --- /dev/null +++ b/patches/llvm-project-perf/0002-ARM-Codegen-Set-LDM-STM-inlining-preference-for-v7m.patch @@ -0,0 +1,350 @@ +From 8aa999e52ef03be7d8c05f4bd151d7df60d17e8f Mon Sep 17 00:00:00 2001 +From: Scott Douglass +Date: Tue, 13 Aug 2024 10:55:51 +0100 +Subject: [PATCH] [ARM][CodeGen]Prefer MEMCPY LDM/STM inlining for v7-m + +This patch changes the behaviour of memcpy inlining on v7m targets. +The old behaviour was to inline memcpys with LDM/STM instructions. +Alternatively, using LD/ST instructions for memcpy inlining allowed +for performance gains of 1% to 2% on selected benchmarks. + +Co-authored-by: Nashe Mncube +--- + llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp | 120 +++++++++++++++ + llvm/lib/Target/ARM/ARMSelectionDAGInfo.h | 6 + + llvm/test/CodeGen/ARM/memcpy-v7m.ll | 161 ++++++++++++++++++++ + 3 files changed, 287 insertions(+) + create mode 100644 llvm/test/CodeGen/ARM/memcpy-v7m.ll + +diff --git a/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp b/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp +index e7ea10ff971a..09ed4ab219a1 100644 +--- a/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp ++++ b/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp +@@ -30,6 +30,10 @@ cl::opt EnableMemtransferTPLoop( + "Allow (may be subject to certain conditions) " + "conversion of memcpy to TP loop."))); + ++static cl::opt EnableInlineMemcpyAsLdSt( ++ "enable-inline-memcpy-ld-st", cl::init(false), cl::Hidden, ++ cl::desc("Inline memcpy with LD/ST instructions.")); ++ + // Emit, if possible, a specialized version of the given Libcall. Typically this + // means selecting the appropriately aligned version, but we also convert memset + // of 0 into memclr. +@@ -136,6 +140,118 @@ SDValue ARMSelectionDAGInfo::EmitSpecializedLibcall( + return CallResult.second; + } + ++SDValue ARMSelectionDAGInfo::EmitMemcpyAsLdSt( ++ SelectionDAG &DAG, SDLoc dl, const ARMSubtarget &Subtarget, SDValue Chain, ++ SDValue Dst, SDValue Src, uint64_t SizeVal, bool isVolatile, ++ MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) const { ++ // Do repeated batches of 4-byte loads and stores. ++ unsigned BytesLeft = SizeVal & 3; ++ unsigned NumMemOps = SizeVal >> 2; ++ unsigned EmittedNumMemOps = 0; ++ EVT VT = MVT::i32; ++ unsigned VTSize = 4; ++ unsigned I = 0; ++ // Emit a maximum of 4 loads in Thumb1 since we have fewer registers ++ const unsigned MaxLoads = Subtarget.isThumb1Only() ? 4 : 6; ++ SDValue TFOps[6]; ++ SDValue Loads[6]; ++ uint64_t SrcOff = 0, DstOff = 0; ++ ++ MachineMemOperand::Flags MOFlags = MachineMemOperand::Flags::MONone; ++ if (isVolatile) ++ MOFlags = MachineMemOperand::Flags::MOVolatile; ++ MachineMemOperand::Flags LoadMOFlags = MOFlags; ++ if (SrcPtrInfo.isDereferenceable(SizeVal, *DAG.getContext(), ++ DAG.getDataLayout())) ++ LoadMOFlags |= MachineMemOperand::Flags::MODereferenceable; ++ if (auto *V = SrcPtrInfo.V.dyn_cast()) ++ if (isa(V) && cast(V)->isConstant()) ++ LoadMOFlags |= MachineMemOperand::Flags::MOInvariant; ++ MachineMemOperand::Flags StoreMOFlags = MOFlags; ++ if (DstPtrInfo.isDereferenceable(SizeVal, *DAG.getContext(), ++ DAG.getDataLayout())) ++ StoreMOFlags |= MachineMemOperand::Flags::MODereferenceable; ++ ++ // Emit up to MaxLoads loads, then a TokenFactor barrier, then the ++ // same number of stores. The loads and stores may get combined into ++ // ldm/stm later on. ++ while (EmittedNumMemOps < NumMemOps) { ++ for (I = 0; I < MaxLoads && EmittedNumMemOps + I < NumMemOps; ++I) { ++ Loads[I] = DAG.getLoad(VT, dl, Chain, ++ DAG.getNode(ISD::ADD, dl, MVT::i32, Src, ++ DAG.getConstant(SrcOff, dl, MVT::i32)), ++ SrcPtrInfo.getWithOffset(SrcOff), MaybeAlign(0), ++ LoadMOFlags); ++ TFOps[I] = Loads[I].getValue(1); ++ SrcOff += VTSize; ++ } ++ Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, ArrayRef(TFOps, I)); ++ ++ for (I = 0; I < MaxLoads && EmittedNumMemOps + I < NumMemOps; ++I) { ++ TFOps[I] = DAG.getStore( ++ Chain, dl, Loads[I], ++ DAG.getNode(ISD::ADD, dl, MVT::i32, Dst, ++ DAG.getConstant(DstOff, dl, MVT::i32)), ++ DstPtrInfo.getWithOffset(DstOff), MaybeAlign(0), StoreMOFlags); ++ DstOff += VTSize; ++ } ++ Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, ArrayRef(TFOps, I)); ++ ++ EmittedNumMemOps += I; ++ } ++ ++ if (BytesLeft == 0) ++ return Chain; ++ ++ // Issue loads / stores for the trailing (1 - 3) bytes. ++ unsigned BytesLeftSave = BytesLeft; ++ I = 0; ++ while (BytesLeft) { ++ if (BytesLeft >= 2) { ++ VT = MVT::i16; ++ VTSize = 2; ++ } else { ++ VT = MVT::i8; ++ VTSize = 1; ++ } ++ ++ Loads[I] = DAG.getLoad(VT, dl, Chain, ++ DAG.getNode(ISD::ADD, dl, MVT::i32, Src, ++ DAG.getConstant(SrcOff, dl, MVT::i32)), ++ SrcPtrInfo.getWithOffset(SrcOff), MaybeAlign(0), ++ LoadMOFlags); ++ ++ TFOps[I] = Loads[I].getValue(1); ++ ++I; ++ SrcOff += VTSize; ++ BytesLeft -= VTSize; ++ } ++ Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, ArrayRef(TFOps, I)); ++ ++ I = 0; ++ BytesLeft = BytesLeftSave; ++ while (BytesLeft) { ++ if (BytesLeft >= 2) { ++ VT = MVT::i16; ++ VTSize = 2; ++ } else { ++ VT = MVT::i8; ++ VTSize = 1; ++ } ++ ++ TFOps[I] = DAG.getStore(Chain, dl, Loads[I], ++ DAG.getNode(ISD::ADD, dl, MVT::i32, Dst, ++ DAG.getConstant(DstOff, dl, MVT::i32)), ++ DstPtrInfo.getWithOffset(DstOff), MaybeAlign(0), ++ StoreMOFlags); ++ ++I; ++ DstOff += VTSize; ++ BytesLeft -= VTSize; ++ } ++ ++ return DAG.getNode(ISD::TokenFactor, dl, MVT::Other, ArrayRef(TFOps, I)); ++} ++ + static bool shouldGenerateInlineTPLoop(const ARMSubtarget &Subtarget, + const SelectionDAG &DAG, + ConstantSDNode *ConstantSize, +@@ -190,6 +306,10 @@ SDValue ARMSelectionDAGInfo::EmitTargetCodeForMemcpy( + return EmitSpecializedLibcall(DAG, dl, Chain, Dst, Src, Size, + Alignment.value(), RTLIB::MEMCPY); + ++ if (EnableInlineMemcpyAsLdSt && Subtarget.isMClass() && Subtarget.hasV7Ops()) ++ return EmitMemcpyAsLdSt(DAG, dl, Subtarget, Chain, Dst, Src, SizeVal, ++ isVolatile, DstPtrInfo, SrcPtrInfo); ++ + unsigned BytesLeft = SizeVal & 3; + unsigned NumMemOps = SizeVal >> 2; + unsigned EmittedNumMemOps = 0; +diff --git a/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h b/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h +index 275b1c0f8dc0..6ff422c15b12 100644 +--- a/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h ++++ b/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h +@@ -44,6 +44,12 @@ public: + MachinePointerInfo DstPtrInfo, + MachinePointerInfo SrcPtrInfo) const override; + ++ SDValue EmitMemcpyAsLdSt(SelectionDAG &DAG, SDLoc dl, ++ const ARMSubtarget &Subtarget, SDValue Chain, ++ SDValue Dst, SDValue Src, uint64_t SizeVal, ++ bool isVolatile, MachinePointerInfo DstPtrInfo, ++ MachinePointerInfo SrcPtrInfo) const; ++ + SDValue + EmitTargetCodeForMemmove(SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, + SDValue Dst, SDValue Src, SDValue Size, +diff --git a/llvm/test/CodeGen/ARM/memcpy-v7m.ll b/llvm/test/CodeGen/ARM/memcpy-v7m.ll +new file mode 100644 +index 000000000000..12f74c04087e +--- /dev/null ++++ b/llvm/test/CodeGen/ARM/memcpy-v7m.ll +@@ -0,0 +1,161 @@ ++; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 ++; RUN: llc -mtriple=arm-none-eabi -mcpu=cortex-m7 -verify-machineinstrs -enable-inline-memcpy-ld-st %s -o - | FileCheck %s ++ ++@d = external global [64 x i32] ++@s = external global [64 x i32] ++@d_32 = external global[32 x i32] ++@s_32 = external global[32 x i32] ++ ++ ++define void @t1() #0 { ++; CHECK-LABEL: t1: ++; CHECK: @ %bb.0: @ %entry ++; CHECK-NEXT: movw r0, :lower16:d ++; CHECK-NEXT: movw r2, :lower16:s ++; CHECK-NEXT: movt r0, :upper16:d ++; CHECK-NEXT: movt r2, :upper16:s ++; CHECK-NEXT: ldr r1, [r0] ++; CHECK-NEXT: str r1, [r2] ++; CHECK-NEXT: ldr r3, [r0, #4] ++; CHECK-NEXT: str r3, [r2, #4] ++; CHECK-NEXT: ldr r1, [r0, #8] ++; CHECK-NEXT: ldr r3, [r0, #12] ++; CHECK-NEXT: ldrb r0, [r0, #16] ++; CHECK-NEXT: strd r1, r3, [r2, #8] ++; CHECK-NEXT: strb r0, [r2, #16] ++; CHECK-NEXT: bx lr ++entry: ++ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* bitcast ([64 x i32]* @s to i8*), i8* bitcast ([64 x i32]* @d to i8*), i32 17, i32 4, i1 false) ++ ret void ++} ++ ++define void @t2() #0 { ++; CHECK-LABEL: t2: ++; CHECK: @ %bb.0: @ %entry ++; CHECK-NEXT: movw r0, :lower16:d ++; CHECK-NEXT: movw r1, :lower16:s ++; CHECK-NEXT: movt r0, :upper16:d ++; CHECK-NEXT: movt r1, :upper16:s ++; CHECK-NEXT: ldr.w r2, [r0, #11] ++; CHECK-NEXT: str.w r2, [r1, #11] ++; CHECK-NEXT: ldr r2, [r0] ++; CHECK-NEXT: str r2, [r1] ++; CHECK-NEXT: ldr r2, [r0, #4] ++; CHECK-NEXT: str r2, [r1, #4] ++; CHECK-NEXT: ldr r0, [r0, #8] ++; CHECK-NEXT: str r0, [r1, #8] ++; CHECK-NEXT: bx lr ++entry: ++ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* bitcast ([64 x i32]* @s to i8*), i8* bitcast ([64 x i32]* @d to i8*), i32 15, i32 4, i1 false) ++ ret void ++} ++ ++declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture readonly, i32, i32, i1) #1 ++ ++ ++define void @t3() #0 { ++; CHECK-LABEL: t3: ++; CHECK: @ %bb.0: ++; CHECK-NEXT: movw r0, :lower16:d_32 ++; CHECK-NEXT: movw r2, :lower16:s_32 ++; CHECK-NEXT: movt r0, :upper16:d_32 ++; CHECK-NEXT: movt r2, :upper16:s_32 ++; CHECK-NEXT: ldr r1, [r0] ++; CHECK-NEXT: str r1, [r2] ++; CHECK-NEXT: ldr r3, [r0, #4] ++; CHECK-NEXT: str r3, [r2, #4] ++; CHECK-NEXT: ldr r1, [r0, #8] ++; CHECK-NEXT: ldr r3, [r0, #12] ++; CHECK-NEXT: ldrb r0, [r0, #16] ++; CHECK-NEXT: strd r1, r3, [r2, #8] ++; CHECK-NEXT: strb r0, [r2, #16] ++; CHECK-NEXT: bx lr ++ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* bitcast ([32 x i32]* @s_32 to i8*), i8* bitcast ([32 x i32]* @d_32 to i8*), i32 17, i32 4, i1 false) ++ ret void ++} ++ ++define void @t4() #0 { ++; CHECK-LABEL: t4: ++; CHECK: @ %bb.0: ++; CHECK-NEXT: movw r0, :lower16:d_32 ++; CHECK-NEXT: movw r1, :lower16:s_32 ++; CHECK-NEXT: movt r0, :upper16:d_32 ++; CHECK-NEXT: movt r1, :upper16:s_32 ++; CHECK-NEXT: ldr.w r2, [r0, #11] ++; CHECK-NEXT: str.w r2, [r1, #11] ++; CHECK-NEXT: ldr r2, [r0] ++; CHECK-NEXT: str r2, [r1] ++; CHECK-NEXT: ldr r2, [r0, #4] ++; CHECK-NEXT: str r2, [r1, #4] ++; CHECK-NEXT: ldr r0, [r0, #8] ++; CHECK-NEXT: str r0, [r1, #8] ++; CHECK-NEXT: bx lr ++ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* bitcast ([32 x i32]* @s_32 to i8*), i8* bitcast ([32 x i32]* @d_32 to i8*), i32 15, i32 4, i1 false) ++ ret void ++} ++ ++define void @t5() #0 { ++; CHECK-LABEL: t5: ++; CHECK: @ %bb.0: @ %entry ++; CHECK-NEXT: .save {r4, r5, r7, lr} ++; CHECK-NEXT: push {r4, r5, r7, lr} ++; CHECK-NEXT: movw r0, :lower16:d ++; CHECK-NEXT: movw r1, :lower16:s ++; CHECK-NEXT: movt r0, :upper16:d ++; CHECK-NEXT: movt r1, :upper16:s ++; CHECK-NEXT: ldr r0, [r0] ++; CHECK-NEXT: ldr r1, [r1] ++; CHECK-NEXT: add.w r12, r0, #12 ++; CHECK-NEXT: ldr r3, [r0, #24] ++; CHECK-NEXT: ldrd r2, lr, [r0, #4] ++; CHECK-NEXT: ldm.w r12, {r4, r5, r12} ++; CHECK-NEXT: str r3, [r1, #24] ++; CHECK-NEXT: add.w r3, r1, #12 ++; CHECK-NEXT: strd r2, lr, [r1, #4] ++; CHECK-NEXT: stm.w r3, {r4, r5, r12} ++; CHECK-NEXT: ldr r0, [r0, #28] ++; CHECK-NEXT: str r0, [r1, #28] ++; CHECK-NEXT: pop {r4, r5, r7, pc} ++entry: ++ %0 = load i32*, i32** @s, align 4 ++ %arrayidx = getelementptr inbounds i32, i32* %0, i32 1 ++ %1 = bitcast i32* %arrayidx to i8* ++ %2 = load i32*, i32** @d, align 4 ++ %arrayidx1 = getelementptr inbounds i32, i32* %2, i32 1 ++ %3 = bitcast i32* %arrayidx1 to i8* ++ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %1, i8* %3, i32 28, i32 4, i1 false) ++ ret void ++} ++ ++define void @t6() #0 { ++; CHECK-LABEL: t6: ++; CHECK: @ %bb.0: @ %entry ++; CHECK-NEXT: .save {r4, r5, r7, lr} ++; CHECK-NEXT: push {r4, r5, r7, lr} ++; CHECK-NEXT: movw r0, :lower16:d ++; CHECK-NEXT: movw r1, :lower16:s ++; CHECK-NEXT: movt r0, :upper16:d ++; CHECK-NEXT: movt r1, :upper16:s ++; CHECK-NEXT: ldr r0, [r0] ++; CHECK-NEXT: ldr r1, [r1] ++; CHECK-NEXT: add.w r12, r0, #12 ++; CHECK-NEXT: ldr r3, [r0, #24] ++; CHECK-NEXT: ldrd r2, lr, [r0, #4] ++; CHECK-NEXT: ldm.w r12, {r4, r5, r12} ++; CHECK-NEXT: str r3, [r1, #24] ++; CHECK-NEXT: add.w r3, r1, #12 ++; CHECK-NEXT: strd r2, lr, [r1, #4] ++; CHECK-NEXT: stm.w r3, {r4, r5, r12} ++; CHECK-NEXT: ldr r0, [r0, #28] ++; CHECK-NEXT: str r0, [r1, #28] ++; CHECK-NEXT: pop {r4, r5, r7, pc} ++entry: ++ %0 = load i32*, i32** @s, align 8 ++ %arrayidx = getelementptr inbounds i32, i32* %0, i32 1 ++ %1 = bitcast i32* %arrayidx to i8* ++ %2 = load i32*, i32** @d, align 8 ++ %arrayidx1 = getelementptr inbounds i32, i32* %2, i32 1 ++ %3 = bitcast i32* %arrayidx1 to i8* ++ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %1, i8* %3, i32 28, i32 4, i1 false) ++ ret void ++} +-- +2.34.1 + From 8ac25ff6d053c443027c8a3be43b6eb89e8262f4 Mon Sep 17 00:00:00 2001 From: Nashe Mncube Date: Fri, 15 Nov 2024 09:20:56 +0000 Subject: [PATCH 09/16] Document enable-inline-memcpy-ld-st flag (#565) Adds documentation of the optional inline-memcpy-ld-st flag. --- docs/optimization-flags.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/optimization-flags.md b/docs/optimization-flags.md index 6739601..159d07a 100644 --- a/docs/optimization-flags.md +++ b/docs/optimization-flags.md @@ -2,8 +2,14 @@ Additional optimization flags ============================= ## Additional loop unroll in the LTO pipeline -In some cases it is benefitial to perform an additional loop unroll pass so that extra information becomes available to later passes, e.g. SROA. +In some cases it is benefitial to perform an additional loop unroll pass so that extra information becomes available to later passes, e.g. SROA. Use cases where this could be beneficial - multiple (N>=4) nested loops. -### Usage: +### Usage: -Wl,-plugin-opt=-extra-LTO-loop-unroll=true/false + +## Inline memcpy with LD/ST instructions +In some cases inlining of memcpy instructions performs best when using LD/ST instructions. + +### Usage: + -mllvm -enable-inline-memcpy-ld-st From 0123938f9751da1324aac857d74913c72e2863cb Mon Sep 17 00:00:00 2001 From: Lucas Duarte Prates Date: Fri, 15 Nov 2024 16:55:51 +0000 Subject: [PATCH 10/16] Update version of FVPs used for testing (#568) A new version of Arm's Ecosystem FVPs have been release and, with that, the links for the older versions are no longer valid. This updates the get_fvps.sh script to use the links for the new version. --- fvp/get_fvps.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fvp/get_fvps.sh b/fvp/get_fvps.sh index 27d3ae4..aa1ccd4 100755 --- a/fvp/get_fvps.sh +++ b/fvp/get_fvps.sh @@ -35,9 +35,9 @@ while true; do done URL_CORSONE_310='https://developer.arm.com/-/media/Arm%20Developer%20Community/Downloads/OSS/FVP/Corstone-310/FVP_Corstone_SSE-310_11.24_13_Linux64.tgz?rev=c370b571bdff42d3a0152471eca3d798&hash=1E388EE3B6E8F675D02D2832DBE61946DEC0386A' -URL_BASE_AEM_A='https://developer.arm.com/-/cdn-downloads/permalink/Fixed-Virtual-Platforms/FM-11.26/FVP_Base_RevC-2xAEMvA_11.26_11_Linux64.tgz' -URL_BASE_AEM_R='https://developer.arm.com/-/cdn-downloads/permalink/Fixed-Virtual-Platforms/FM-11.26/FVP_Base_AEMv8R_11.26_11_Linux64.tgz' -URL_CRYPTO='https://developer.arm.com/-/cdn-downloads/permalink/Fast-Models-Crypto-Plug-in/FM-11.26/FastModels_crypto_11.26.011_Linux64.tgz' +URL_BASE_AEM_A='https://developer.arm.com/-/cdn-downloads/permalink/Fixed-Virtual-Platforms/FM-11.27/FVP_Base_RevC-2xAEMvA_11.27_19_Linux64.tgz' +URL_BASE_AEM_R='https://developer.arm.com/-/cdn-downloads/permalink/Fixed-Virtual-Platforms/FM-11.27/FVP_Base_AEMv8R_11.27_19_Linux64.tgz' +URL_CRYPTO='https://developer.arm.com/-/cdn-downloads/permalink/Fast-Models-Crypto-Plug-in/FM-11.27/FastModels_crypto_11.27.019_Linux64.tgz' cd "$(dirname "$0")" @@ -59,19 +59,19 @@ tar -xf ${DOWNLOAD_DIR}/FVP_Corstone_SSE-310_11.24_13_Linux64.tgz fi if [ ! -d "Base_RevC_AEMvA_pkg" ]; then -tar -xf ${DOWNLOAD_DIR}/FVP_Base_RevC-2xAEMvA_11.26_11_Linux64.tgz +tar -xf ${DOWNLOAD_DIR}/FVP_Base_RevC-2xAEMvA_11.27_19_Linux64.tgz # (Extracted directly into ./Base_RevC_AEMvA_pkg/, no installer) fi if [ ! -d "AEMv8R_base_pkg" ]; then -tar -xf ${DOWNLOAD_DIR}/FVP_Base_AEMv8R_11.26_11_Linux64.tgz +tar -xf ${DOWNLOAD_DIR}/FVP_Base_AEMv8R_11.27_19_Linux64.tgz # (Extracted directly into ./AEMv8R_base_pkg/, no installer) fi -if [ ! -d "FastModelsPortfolio_11.26" ]; then -tar -xf ${DOWNLOAD_DIR}/FastModels_crypto_11.26.011_Linux64.tgz +if [ ! -d "FastModelsPortfolio_11.27" ]; then +tar -xf ${DOWNLOAD_DIR}/FastModels_crypto_11.27.019_Linux64.tgz # SDDKW-93582: Non-interactive installation fails if cwd is different. -pushd FastModels_crypto_11.26.011_Linux64 +pushd FastModels_crypto_11.27.019_Linux64 # This installer doesn't allow providing a default path for interactive # installation. ./setup.bin $INSTALLER_FLAGS_CRYPTO From 325434a265558b2efb81ed0e0f9bbea7f42410ad Mon Sep 17 00:00:00 2001 From: Nashe Mncube Date: Mon, 18 Nov 2024 10:32:46 +0000 Subject: [PATCH 11/16] [NFC]Format patch file for Windows (#570) Windows expects newline to have a space at the end of them. Because of this my updated patch file failed to build on Windows. This commit adds the appropriate spaces. --- ...degen-Set-LDM-STM-inlining-preference-for-v7m.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/patches/llvm-project-perf/0002-ARM-Codegen-Set-LDM-STM-inlining-preference-for-v7m.patch b/patches/llvm-project-perf/0002-ARM-Codegen-Set-LDM-STM-inlining-preference-for-v7m.patch index 20dffa4..b0b7248 100644 --- a/patches/llvm-project-perf/0002-ARM-Codegen-Set-LDM-STM-inlining-preference-for-v7m.patch +++ b/patches/llvm-project-perf/0002-ARM-Codegen-Set-LDM-STM-inlining-preference-for-v7m.patch @@ -23,7 +23,7 @@ index e7ea10ff971a..09ed4ab219a1 100644 @@ -30,6 +30,10 @@ cl::opt EnableMemtransferTPLoop( "Allow (may be subject to certain conditions) " "conversion of memcpy to TP loop."))); - + +static cl::opt EnableInlineMemcpyAsLdSt( + "enable-inline-memcpy-ld-st", cl::init(false), cl::Hidden, + cl::desc("Inline memcpy with LD/ST instructions.")); @@ -34,7 +34,7 @@ index e7ea10ff971a..09ed4ab219a1 100644 @@ -136,6 +140,118 @@ SDValue ARMSelectionDAGInfo::EmitSpecializedLibcall( return CallResult.second; } - + +SDValue ARMSelectionDAGInfo::EmitMemcpyAsLdSt( + SelectionDAG &DAG, SDLoc dl, const ARMSubtarget &Subtarget, SDValue Chain, + SDValue Dst, SDValue Src, uint64_t SizeVal, bool isVolatile, @@ -153,7 +153,7 @@ index e7ea10ff971a..09ed4ab219a1 100644 @@ -190,6 +306,10 @@ SDValue ARMSelectionDAGInfo::EmitTargetCodeForMemcpy( return EmitSpecializedLibcall(DAG, dl, Chain, Dst, Src, Size, Alignment.value(), RTLIB::MEMCPY); - + + if (EnableInlineMemcpyAsLdSt && Subtarget.isMClass() && Subtarget.hasV7Ops()) + return EmitMemcpyAsLdSt(DAG, dl, Subtarget, Chain, Dst, Src, SizeVal, + isVolatile, DstPtrInfo, SrcPtrInfo); @@ -168,7 +168,7 @@ index 275b1c0f8dc0..6ff422c15b12 100644 @@ -44,6 +44,12 @@ public: MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) const override; - + + SDValue EmitMemcpyAsLdSt(SelectionDAG &DAG, SDLoc dl, + const ARMSubtarget &Subtarget, SDValue Chain, + SDValue Dst, SDValue Src, uint64_t SizeVal, @@ -345,6 +345,6 @@ index 000000000000..12f74c04087e + tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %1, i8* %3, i32 28, i32 4, i1 false) + ret void +} --- +-- 2.34.1 From 4f3243f287fd9c3bd24683d826d8b9532eb65946 Mon Sep 17 00:00:00 2001 From: dcandler Date: Mon, 18 Nov 2024 13:08:33 +0000 Subject: [PATCH 12/16] Move CMake code for building multilib and variants to subprojects (#562) This patch restructures the top-level CMake script in order to split building the library variants into a separate CMake project. This better encapsulates the code to build the variants, and untethers it from the toolchain builds so that libraries can be developed and tested without having the rebuild the entire toolchain. Similarly, a new subproject has been created to build a multilib set of library variants, using a selected C library. A simple JSON format has been used to define the flags and variants, which are then built and collected into the appropriate layout. --- CMakeLists.txt | 1646 +---------------- arm-multilib/CMakeLists.txt | 282 +++ arm-multilib/json/multilib.json | 259 +++ arm-multilib/json/variants/aarch64a.json | 40 + .../json/variants/aarch64a_exn_rtti.json | 40 + arm-multilib/json/variants/armv4t.json | 41 + .../json/variants/armv4t_exn_rtti.json | 41 + arm-multilib/json/variants/armv5te.json | 41 + .../json/variants/armv5te_exn_rtti.json | 41 + .../json/variants/armv6m_soft_nofp.json | 40 + .../variants/armv6m_soft_nofp_exn_rtti.json | 40 + .../json/variants/armv7a_hard_vfpv3_d16.json | 41 + .../armv7a_hard_vfpv3_d16_exn_rtti.json | 41 + .../json/variants/armv7a_soft_nofp.json | 41 + .../variants/armv7a_soft_nofp_exn_rtti.json | 41 + .../json/variants/armv7a_soft_vfpv3_d16.json | 41 + .../armv7a_soft_vfpv3_d16_exn_rtti.json | 41 + .../variants/armv7m_hard_fpv4_sp_d16.json | 40 + .../armv7m_hard_fpv4_sp_d16_exn_rtti.json | 40 + .../json/variants/armv7m_hard_fpv5_d16.json | 40 + .../armv7m_hard_fpv5_d16_exn_rtti.json | 40 + .../variants/armv7m_soft_fpv4_sp_d16.json | 40 + .../armv7m_soft_fpv4_sp_d16_exn_rtti.json | 40 + .../json/variants/armv7m_soft_nofp.json | 40 + .../variants/armv7m_soft_nofp_exn_rtti.json | 40 + .../json/variants/armv7r_hard_vfpv3_d16.json | 41 + .../armv7r_hard_vfpv3_d16_exn_rtti.json | 41 + .../json/variants/armv7r_hard_vfpv3xd.json | 41 + .../armv7r_hard_vfpv3xd_exn_rtti.json | 41 + .../json/variants/armv7r_soft_nofp.json | 41 + .../variants/armv7r_soft_nofp_exn_rtti.json | 41 + .../json/variants/armv7r_soft_vfpv3xd.json | 41 + .../armv7r_soft_vfpv3xd_exn_rtti.json | 41 + .../variants/armv8.1m.main_hard_fp_nomve.json | 40 + .../armv8.1m.main_hard_fp_nomve_exn_rtti.json | 40 + ...rmv8.1m.main_hard_fp_nomve_pacret_bti.json | 40 + ...ain_hard_fp_nomve_pacret_bti_exn_rtti.json | 40 + .../armv8.1m.main_hard_fpdp_nomve.json | 40 + ...rmv8.1m.main_hard_fpdp_nomve_exn_rtti.json | 40 + ...v8.1m.main_hard_fpdp_nomve_pacret_bti.json | 40 + ...n_hard_fpdp_nomve_pacret_bti_exn_rtti.json | 40 + .../variants/armv8.1m.main_hard_nofp_mve.json | 40 + .../armv8.1m.main_hard_nofp_mve_exn_rtti.json | 40 + ...rmv8.1m.main_hard_nofp_mve_pacret_bti.json | 40 + ...ain_hard_nofp_mve_pacret_bti_exn_rtti.json | 40 + .../armv8.1m.main_soft_nofp_nomve.json | 40 + ...rmv8.1m.main_soft_nofp_nomve_exn_rtti.json | 40 + ...v8.1m.main_soft_nofp_nomve_pacret_bti.json | 40 + ...n_soft_nofp_nomve_pacret_bti_exn_rtti.json | 40 + .../json/variants/armv8m.main_hard_fp.json | 40 + .../armv8m.main_hard_fp_exn_rtti.json | 40 + .../json/variants/armv8m.main_soft_nofp.json | 40 + .../armv8m.main_soft_nofp_exn_rtti.json | 40 + .../multilib-generate.py | 6 +- {cmake => arm-multilib}/multilib.yaml.in | 0 arm-runtimes/CMakeLists.txt | 800 ++++++++ arm-runtimes/meson-cross-build.txt.in | 31 + .../test-support}/lit-exec-fvp.py | 0 .../test-support}/lit-exec-qemu.py | 0 .../test-support}/llvm-libc++-picolibc.cfg.in | 6 +- .../llvm-libc++abi-picolibc.cfg.in | 6 +- .../llvm-libunwind-picolibc.cfg.in | 6 +- .../test-support/modify-compiler-rt-xml.py | 54 + .../test-support/modify-picolibc-xml.py | 45 + .../test-support}/picolibc-test-wrapper.py | 0 .../test-support}/run_fvp.py | 0 .../test-support}/run_qemu.py | 0 arm-runtimes/to_meson_list.cmake | 9 + cmake/fetch_llvm.cmake | 33 + cmake/fetch_newlib.cmake | 25 + cmake/fetch_picolibc.cmake | 31 + cmake/read_versions.cmake | 22 + docs/building-from-source.md | 80 + test-support/run-picolibc-tests.py | 116 -- 74 files changed, 3802 insertions(+), 1673 deletions(-) create mode 100644 arm-multilib/CMakeLists.txt create mode 100644 arm-multilib/json/multilib.json create mode 100644 arm-multilib/json/variants/aarch64a.json create mode 100644 arm-multilib/json/variants/aarch64a_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv4t.json create mode 100644 arm-multilib/json/variants/armv4t_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv5te.json create mode 100644 arm-multilib/json/variants/armv5te_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv6m_soft_nofp.json create mode 100644 arm-multilib/json/variants/armv6m_soft_nofp_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv7a_hard_vfpv3_d16.json create mode 100644 arm-multilib/json/variants/armv7a_hard_vfpv3_d16_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv7a_soft_nofp.json create mode 100644 arm-multilib/json/variants/armv7a_soft_nofp_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv7a_soft_vfpv3_d16.json create mode 100644 arm-multilib/json/variants/armv7a_soft_vfpv3_d16_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv7m_hard_fpv4_sp_d16.json create mode 100644 arm-multilib/json/variants/armv7m_hard_fpv4_sp_d16_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv7m_hard_fpv5_d16.json create mode 100644 arm-multilib/json/variants/armv7m_hard_fpv5_d16_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv7m_soft_fpv4_sp_d16.json create mode 100644 arm-multilib/json/variants/armv7m_soft_fpv4_sp_d16_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv7m_soft_nofp.json create mode 100644 arm-multilib/json/variants/armv7m_soft_nofp_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv7r_hard_vfpv3_d16.json create mode 100644 arm-multilib/json/variants/armv7r_hard_vfpv3_d16_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv7r_hard_vfpv3xd.json create mode 100644 arm-multilib/json/variants/armv7r_hard_vfpv3xd_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv7r_soft_nofp.json create mode 100644 arm-multilib/json/variants/armv7r_soft_nofp_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv7r_soft_vfpv3xd.json create mode 100644 arm-multilib/json/variants/armv7r_soft_vfpv3xd_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve.json create mode 100644 arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti.json create mode 100644 arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve.json create mode 100644 arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti.json create mode 100644 arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve.json create mode 100644 arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti.json create mode 100644 arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve.json create mode 100644 arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti.json create mode 100644 arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv8m.main_hard_fp.json create mode 100644 arm-multilib/json/variants/armv8m.main_hard_fp_exn_rtti.json create mode 100644 arm-multilib/json/variants/armv8m.main_soft_nofp.json create mode 100644 arm-multilib/json/variants/armv8m.main_soft_nofp_exn_rtti.json rename multilib-generate.py => arm-multilib/multilib-generate.py (97%) rename {cmake => arm-multilib}/multilib.yaml.in (100%) create mode 100644 arm-runtimes/CMakeLists.txt create mode 100644 arm-runtimes/meson-cross-build.txt.in rename {test-support => arm-runtimes/test-support}/lit-exec-fvp.py (100%) rename {test-support => arm-runtimes/test-support}/lit-exec-qemu.py (100%) rename {test-support => arm-runtimes/test-support}/llvm-libc++-picolibc.cfg.in (89%) rename {test-support => arm-runtimes/test-support}/llvm-libc++abi-picolibc.cfg.in (86%) rename {test-support => arm-runtimes/test-support}/llvm-libunwind-picolibc.cfg.in (88%) create mode 100644 arm-runtimes/test-support/modify-compiler-rt-xml.py create mode 100644 arm-runtimes/test-support/modify-picolibc-xml.py rename {test-support => arm-runtimes/test-support}/picolibc-test-wrapper.py (100%) rename {test-support => arm-runtimes/test-support}/run_fvp.py (100%) rename {test-support => arm-runtimes/test-support}/run_qemu.py (100%) create mode 100644 arm-runtimes/to_meson_list.cmake create mode 100644 cmake/fetch_llvm.cmake create mode 100644 cmake/fetch_newlib.cmake create mode 100644 cmake/fetch_picolibc.cmake create mode 100644 cmake/read_versions.cmake delete mode 100755 test-support/run-picolibc-tests.py diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d1bebc..1f32aa7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,9 +123,13 @@ set(TARGET_LIBRARIES_DIR "lib/clang-runtimes" CACHE STRING "Directory containing the target libraries." ) +set(LLVM_TOOLCHAIN_MULTILIB_JSON + "${CMAKE_CURRENT_SOURCE_DIR}/arm-multilib/json/multilib.json" CACHE STRING + "JSON file defining the multilib." +) set(LLVM_TOOLCHAIN_LIBRARY_VARIANTS - "" CACHE STRING - "Build only the specified library variants. If not specified then build all variants." + "all" CACHE STRING + "Build only the specified library variants, or \"all\"." ) option( LIBS_DEPEND_ON_TOOLS @@ -134,6 +138,13 @@ option( the tools every time you update llvm-project." ON ) +option( + LIBS_USE_COMPILER_LAUNCHER + "Pass CMAKE_C_COMPILER_LAUNCHER and CMAKE_CXX_COMPILER_LAUNCHER + down to the library builds, so that programs such as ccache can + be used to speed up repeated builds. This is not done by default, + as it can also make the inital build slower due to the cold cache." +) option( APPLY_LLVM_PERFORMANCE_PATCHES "During checkout, apply optional downstream patches to @@ -257,82 +268,12 @@ include(ProcessorCount) # # If you want to stop cmake updating the repos then run # cmake . -DFETCHCONTENT_FULLY_DISCONNECTED=ON - -# Read which revisions of the repos to use. -file(READ versions.json VERSIONS_JSON) -function(read_repo_version output_variable_prefix repo) - string(JSON tag GET ${VERSIONS_JSON} "repos" "${repo}" "tag") - string(JSON tagType GET ${VERSIONS_JSON} "repos" "${repo}" "tagType") - if(tagType STREQUAL "commithash") - # GIT_SHALLOW doesn't work with commit hashes. - set(shallow OFF) - elseif(tagType STREQUAL "branch") - set(shallow ON) - # CMake docs recommend that "branch names and tags should - # generally be specified as remote names" - set(tag "origin/${tag}") - elseif(tagType STREQUAL "tag") - set(shallow ON) - else() - message(FATAL_ERROR "Unrecognised tagType ${tagType}") - endif() - - set(${output_variable_prefix}_TAG "${tag}" PARENT_SCOPE) - set(${output_variable_prefix}_SHALLOW "${shallow}" PARENT_SCOPE) -endfunction() -read_repo_version(llvmproject llvm-project) -if(NOT (LLVM_TOOLCHAIN_C_LIBRARY STREQUAL llvmlibc)) # libc in a separate repo? - read_repo_version(${LLVM_TOOLCHAIN_C_LIBRARY} ${LLVM_TOOLCHAIN_C_LIBRARY}) -endif() - -set(LLVM_PATCH_COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/patch_llvm.py ${CMAKE_CURRENT_SOURCE_DIR}/patches/llvm-project) -if(APPLY_LLVM_PERFORMANCE_PATCHES) - set(LLVM_PATCH_COMMAND ${LLVM_PATCH_COMMAND} && ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/patch_llvm.py ${CMAKE_CURRENT_SOURCE_DIR}/patches/llvm-project-perf) +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/fetch_llvm.cmake) +if(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL picolibc) + include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/fetch_picolibc.cmake) endif() -set( - picolibc_patches - ${CMAKE_CURRENT_SOURCE_DIR}/patches/picolibc/0001-Enable-libcxx-builds.patch - ${CMAKE_CURRENT_SOURCE_DIR}/patches/picolibc/0002-Add-bootcode-for-AArch64-FVPs.patch -) - -FetchContent_Declare(llvmproject - GIT_REPOSITORY https://github.com/llvm/llvm-project.git - GIT_TAG "${llvmproject_TAG}" - GIT_SHALLOW "${llvmproject_SHALLOW}" - GIT_PROGRESS TRUE - PATCH_COMMAND ${LLVM_PATCH_COMMAND} - # Add the llvm subdirectory later to ensure that - # LLVMEmbeddedToolchainForArm is the first project declared. - # Otherwise CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT - # can't be used. - SOURCE_SUBDIR do_not_add_llvm_subdir_yet -) - -FetchContent_Declare(picolibc - GIT_REPOSITORY https://github.com/picolibc/picolibc.git - GIT_TAG "${picolibc_TAG}" - GIT_SHALLOW "${picolibc_SHALLOW}" - GIT_PROGRESS TRUE - PATCH_COMMAND git reset --quiet --hard && git clean --quiet --force -dx && git apply ${picolibc_patches} - # We only want to download the content, not configure it at this - # stage. picolibc will be built in many configurations using - # ExternalProject_Add using the sources that are checked out here. - SOURCE_SUBDIR do_not_add_picolibc_subdir -) - -FetchContent_Declare(newlib - GIT_REPOSITORY https://sourceware.org/git/newlib-cygwin.git - GIT_TAG "${newlib_TAG}" - GIT_SHALLOW "${newlib_SHALLOW}" - GIT_PROGRESS TRUE - PATCH_COMMAND git reset --quiet --hard && git clean --quiet --force -dx && git apply ${CMAKE_CURRENT_SOURCE_DIR}/patches/newlib.patch - # Similarly to picolibc, we don't do the configuration here. - SOURCE_SUBDIR do_not_add_newlib_subdir -) - -FetchContent_MakeAvailable(llvmproject) -if(NOT (LLVM_TOOLCHAIN_C_LIBRARY STREQUAL llvmlibc)) # libc in a separate repo? - FetchContent_MakeAvailable(${LLVM_TOOLCHAIN_C_LIBRARY}) +if(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL newlib) + include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/fetch_newlib.cmake) endif() ################################################################################################## @@ -354,10 +295,6 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) endif() ################################################################################################## -# Whether to try to build C++ libraries. (We can't currently do this -# for all choices of C library.) -set(CXX_LIBS ON) - if(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL newlib) install( FILES @@ -389,8 +326,6 @@ if(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL llvmlibc) DESTINATION samples COMPONENT llvm-toolchain-llvmlibc-configs ) - # We aren't yet able to build C++ libraries to go with llvm-libc - set(CXX_LIBS OFF) # We need to build libc-hdrgen ExternalProject_Add( @@ -411,11 +346,6 @@ if(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL llvmlibc) ExternalProject_Get_property(libc_hdrgen BINARY_DIR) set(LIBC_HDRGEN ${BINARY_DIR}/bin/libc-hdrgen${CMAKE_EXECUTABLE_SUFFIX}) - # Add an empty check target, to simplify the logic below that expects to - # find one for every libc type. We have no current setup to run the LLVM - # libc test suite. - add_custom_target(check-llvmlibc) - # LLVM libc lacks a configuration for AArch64, but the AArch32 one works # fine. However, setting the configuration for both architectures to the # arm config directory means the baremetal config.json is never loaded, @@ -539,15 +469,6 @@ llvm_install_symlink(LLVM llvm-ranlib llvm-ar ALWAYS_GENERATE) llvm_install_symlink(LLVM llvm-readelf llvm-readobj ALWAYS_GENERATE) llvm_install_symlink(LLVM llvm-strip llvm-objcopy ALWAYS_GENERATE) -if(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL picolibc) - # For building picolibc use Meson. - # Although picolibc has support for building with CMake, the Meson code - # is more mature and works better with LLVM. - find_program(MESON_EXECUTABLE meson REQUIRED) -endif() - -include(cmake/to_meson_list.cmake) - # Generate VERSION.txt # Use add_custom_target instead of add_custom_command so that the target # is always considered out-of-date, ensuring that VERSION.txt will be @@ -582,20 +503,6 @@ add_custom_target(llvm-toolchain ALL) # Groups all the runtime targets add_custom_target(llvm-toolchain-runtimes) -# Groups all C++ runtime libraries tests -add_custom_target(check-llvm-toolchain-runtimes) -add_custom_target(check-compiler-rt) -add_custom_target(check-cxxabi) -add_custom_target(check-unwind) -add_custom_target(check-cxx) - -add_dependencies( - check-llvm-toolchain-runtimes - check-cxxabi - check-unwind - check-cxx -) - if(NOT LLVM_TOOLCHAIN_CROSS_BUILD_MINGW) add_dependencies( llvm-toolchain @@ -609,10 +516,6 @@ add_dependencies( version_txt ) -foreach(variant ${LLVM_TOOLCHAIN_LIBRARY_VARIANTS}) - set(enable_${variant} TRUE) -endforeach() - if(LIBS_DEPEND_ON_TOOLS) set(lib_tool_dependencies clang @@ -625,26 +528,20 @@ if(LIBS_DEPEND_ON_TOOLS) ) endif() -set(picolibc_specific_runtimes_options - -DLIBCXXABI_ENABLE_THREADS=OFF - -DLIBCXX_TEST_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/test-support/llvm-libc++-picolibc.cfg.in - -DLIBCXXABI_TEST_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/test-support/llvm-libc++abi-picolibc.cfg.in - -DLIBCXX_ENABLE_MONOTONIC_CLOCK=OFF - -DLIBCXX_ENABLE_RANDOM_DEVICE=OFF - -DLIBCXX_ENABLE_THREADS=OFF - -DLIBCXX_ENABLE_WIDE_CHARACTERS=OFF - -DLIBUNWIND_ENABLE_THREADS=OFF - -DLIBUNWIND_TEST_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/test-support/llvm-libunwind-picolibc.cfg.in -) +add_custom_target(check-llvm-toolchain-runtimes) +add_custom_target(check-${LLVM_TOOLCHAIN_C_LIBRARY}) +add_custom_target(check-compiler-rt) +add_custom_target(check-cxx) +add_custom_target(check-cxxabi) +add_custom_target(check-unwind) -set(newlib_specific_runtimes_options - -DLIBCXXABI_ENABLE_THREADS=OFF - -DLIBCXX_ENABLE_THREADS=OFF - -DLIBCXX_ENABLE_MONOTONIC_CLOCK=OFF - -DLIBCXX_ENABLE_RANDOM_DEVICE=OFF - -DLIBCXX_ENABLE_WIDE_CHARACTERS=ON - -DLIBCXX_ENABLE_LOCALIZATION=OFF - -DLIBUNWIND_ENABLE_THREADS=OFF +add_dependencies( + check-llvm-toolchain-runtimes + check-${LLVM_TOOLCHAIN_C_LIBRARY} + check-compiler-rt + check-cxx + check-cxxabi + check-unwind ) if(LLVM_TOOLCHAIN_LIBRARY_OVERLAY_INSTALL) @@ -659,1444 +556,99 @@ else() set(library_subdir "") endif() -add_custom_target(check-picolibc) -# Set LLVM_DEFAULT_EXTERNAL_LIT to the directory of clang -# which was build in previous step. This path is not exported -# by add_subdirectory of llvm project -set(LLVM_DEFAULT_EXTERNAL_LIT "${LLVM_BINARY_DIR}/bin/llvm-lit") - -add_custom_target(check-newlib) # FIXME: put things in this - -function(get_qemu_params target_triple qemu_machine qemu_cpu qemu_params) - if(target_triple MATCHES "^aarch64") - set(qemu_command "qemu-system-aarch64") - else() - set(qemu_command "qemu-system-arm") - endif() - - # Use colon as a separator because comma and semicolon are used for - # other purposes in CMake. - string(REPLACE " " ":" qemu_params_list "${qemu_params}") - - set( - test_executor_params - --qemu-command ${qemu_command} - --qemu-machine ${qemu_machine}) - if(qemu_cpu) - list(APPEND test_executor_params --qemu-cpu ${qemu_cpu}) - endif() - if(qemu_params_list) - list(APPEND test_executor_params "--qemu-params=${qemu_params_list}") - endif() - set(test_executor_params "${test_executor_params}" PARENT_SCOPE) -endfunction() - -function(get_fvp_params fvp_model fvp_config) - set( - test_executor_params - --fvp-install-dir ${FVP_INSTALL_DIR} - --fvp-config-dir ${FVP_CONFIG_DIR} - --fvp-model ${fvp_model} - ) - string(REPLACE " " ";" fvp_config_list ${fvp_config}) - foreach(cfg ${fvp_config_list}) - set( - test_executor_params - ${test_executor_params} - --fvp-config ${cfg} - ) - endforeach() - set(test_executor_params "${test_executor_params}" PARENT_SCOPE) -endfunction() - -function( - add_picolibc - directory - variant - target_triple - flags - build_type - test_executor_params - default_boot_flash_addr - default_boot_flash_size - default_flash_addr - default_flash_size - default_ram_addr - default_ram_size - default_stack_size - run_tests -) - if(CMAKE_INSTALL_MESSAGE STREQUAL NEVER) - set(MESON_INSTALL_QUIET "--quiet") - endif() - - if(target_triple MATCHES "^aarch64") - set(cpu_family aarch64) - set(enable_long_double_test false) - else() - set(cpu_family arm) - set(enable_long_double_test true) +if(LIBS_USE_COMPILER_LAUNCHER) + if(CMAKE_C_COMPILER_LAUNCHER) + list(APPEND compiler_launcher_cmake_args "-DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER}") endif() - - if(build_type MATCHES "minsize") - set(newlib_nano_malloc "true") - else() - set(newlib_nano_malloc "false") + if(CMAKE_CXX_COMPILER_LAUNCHER) + list(APPEND compiler_launcher_cmake_args "-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}") endif() +endif() - ExternalProject_Add( - picolibc_${variant} - SOURCE_DIR ${picolibc_SOURCE_DIR} - INSTALL_DIR "${LLVM_BINARY_DIR}/${directory}" - PREFIX picolibc/${variant} - DEPENDS ${lib_tool_dependencies} - CONFIGURE_COMMAND - ${MESON_EXECUTABLE} - setup - -Dincludedir=include - -Dlibdir=lib - -Dspecsdir=none - -Dmultilib=false - -Dtests-enable-stack-protector=false - -Dtest-long-double=${enable_long_double_test} - -Dnewlib-nano-malloc=${newlib_nano_malloc} - --prefix - --cross-file /meson-cross-build.txt - --buildtype=${build_type} - - BUILD_COMMAND ${MESON_EXECUTABLE} configure -Dtests=false - COMMAND ${MESON_EXECUTABLE} compile - INSTALL_COMMAND ${MESON_EXECUTABLE} install ${MESON_INSTALL_QUIET} - TEST_COMMAND - ${Python3_EXECUTABLE} - ${CMAKE_CURRENT_SOURCE_DIR}/test-support/run-picolibc-tests.py - --meson-command ${MESON_EXECUTABLE} - --picolibc-build-dir - --picolibc-source-dir - --variant ${variant} - USES_TERMINAL_CONFIGURE FALSE - USES_TERMINAL_BUILD TRUE - USES_TERMINAL_TEST TRUE - LIST_SEPARATOR , - # Always run the build command so that incremental builds are correct. - BUILD_ALWAYS TRUE - CONFIGURE_HANDLED_BY_BUILD TRUE - TEST_EXCLUDE_FROM_MAIN TRUE - STEP_TARGETS install test - ) - - # Set meson_c_args to a comma-separated list of the clang path - # and flags e.g. 'path/to/clang', '--target=armv6m-none-eabi', - # '-march=armv6m' - separate_arguments(flags) - list(PREPEND flags "${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX}") - list(APPEND flags --sysroot "${LLVM_BINARY_DIR}/${directory}") - to_meson_list("${flags}" meson_c_args) - - set(test_executor_bin ${CMAKE_CURRENT_SOURCE_DIR}/test-support/picolibc-test-wrapper.py) - to_meson_list("${test_executor_params}" test_executor_params) - - ExternalProject_Get_Property(picolibc_${variant} BINARY_DIR) - configure_file(${CMAKE_CURRENT_FUNCTION_LIST_DIR}/cmake/meson-cross-build.txt.in ${BINARY_DIR}/meson-cross-build.txt @ONLY) - - # Building picolibc tests requires compiler_rt to be installed. - # Building compiler_rt tests requires picolibc to be installed. - # To solve this compiler_rt relies on picolibc to be just installed, not on - # the full target, which would include tests. Picolibc tests, are enabled - # only in tests step, otherwise, they would be built before install. - ExternalProject_Add_StepDependencies(picolibc_${variant} test compiler_rt_${variant}-install) - - if(run_tests) - add_custom_target(check-picolibc-${variant}) - add_dependencies(check-picolibc-${variant} picolibc_${variant}-test) - # Do not add armv4 or armv5 tests to the check-all - # targets as they currently hang. - if(NOT variant MATCHES "armv4|5") - add_dependencies(check-picolibc check-picolibc-${variant}) - add_dependencies(llvm-toolchain-runtimes picolibc_${variant}) - endif() - endif() -endfunction() - -function( - add_newlib - directory - variant - target_triple - flags - test_executor_params - default_boot_flash_addr - default_boot_flash_size - default_flash_addr - default_flash_size - default_ram_addr - default_ram_size - default_stack_size -) - if(target_triple MATCHES "^aarch64") - set(cpu_family aarch64) - else() - set(cpu_family arm) - endif() - - set(sysroot "${LLVM_BINARY_DIR}/${directory}") - - set(build_env - "CC_FOR_TARGET=${LLVM_BINARY_DIR}/bin/clang -target ${target_triple} -ffreestanding" - "CXX_FOR_TARGET=${LLVM_BINARY_DIR}/bin/clang++ -target ${target_triple} -ffreestanding" - "AR_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-ar" - "AS_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-as" - "NM_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-nm" - "OBJDUMP_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-objdump" - "RANLIB_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-ranlib" - "READELF_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-readelf" - "STRIP_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-strip" - "CFLAGS_FOR_TARGET=${flags} -Wno-error=implicit-function-declaration -D__USES_INITFINI__ -UHAVE_INIT_FINI__ -U_HAVE_INIT_FINI__ -UHAVE_INIT_FINI --sysroot ${sysroot}" - "CCASFLAGS=${flags} -Wno-error=implicit-function-declaration -D__USES_INITFINI__ -UHAVE_INIT_FINI__ -U_HAVE_INIT_FINI__ -UHAVE_INIT_FINI --sysroot ${sysroot}" - ) - - set(make_flags) - ProcessorCount(nproc) - if(NOT nproc EQUAL 0) - set(make_flags -j${nproc}) - endif() - - ExternalProject_Add( - newlib_${variant} - SOURCE_DIR ${newlib_SOURCE_DIR} - INSTALL_DIR "${LLVM_BINARY_DIR}/${directory}" - PREFIX newlib/${variant} - DEPENDS ${lib_tool_dependencies} - CONFIGURE_COMMAND - ${CMAKE_COMMAND} -E env ${build_env} - /configure - --target=${target_triple} - --prefix "${sysroot}" - --exec_prefix /tmpinstall - --enable-newlib-io-long-long - --enable-newlib-register-fini - --disable-newlib-supplied-syscalls - --enable-newlib-io-c99-formats - --disable-nls - --enable-lite-exit - --disable-multilib - --enable-newlib-retargetable-locking - BUILD_COMMAND - ${CMAKE_COMMAND} -E env ${build_env} - make ${make_flags} - && - "${LLVM_BINARY_DIR}/bin/llvm-ar" rcs - /${target_triple}/libgloss/${cpu_family}/libcrt0-rdimon.a - /${target_triple}/libgloss/${cpu_family}/rdimon-crt0.o - && - "${LLVM_BINARY_DIR}/bin/llvm-ar" rcs - /${target_triple}/libgloss/${cpu_family}/libcrt0-nosys.a - /${target_triple}/libgloss/${cpu_family}/crt0.o - INSTALL_COMMAND - make install - && - ${CMAKE_COMMAND} -E copy_directory - /tmpinstall/${target_triple} - ${sysroot} - && - ${CMAKE_COMMAND} -E copy - /${target_triple}/libgloss/${cpu_family}/libcrt0-rdimon.a - ${sysroot}/lib - && - ${CMAKE_COMMAND} -E copy - /${target_triple}/libgloss/${cpu_family}/libcrt0-nosys.a - ${sysroot}/lib - # FIXME: TEST_COMMAND? - USES_TERMINAL_CONFIGURE FALSE - USES_TERMINAL_BUILD TRUE - # Always run the build command so that incremental builds are correct. - BUILD_ALWAYS TRUE - CONFIGURE_HANDLED_BY_BUILD TRUE - TEST_EXCLUDE_FROM_MAIN TRUE - STEP_TARGETS install # FIXME: test? - ) - - add_dependencies( - llvm-toolchain-runtimes - newlib_${variant} - ) -endfunction() - -function( - add_llvmlibc - directory - variant - target_triple - flags - test_executor_params - default_boot_flash_addr - default_boot_flash_size - default_flash_addr - default_flash_size - default_ram_addr - default_ram_size - default_stack_size -) - get_runtimes_flags("${directory}" "${flags}") - - set(runtimes_flags "${runtimes_flags} -Wno-error=atomic-alignment") - - set(common_cmake_args - -DCMAKE_AR=${LLVM_BINARY_DIR}/bin/llvm-ar${CMAKE_EXECUTABLE_SUFFIX} - -DCMAKE_ASM_COMPILER=${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX} - -DCMAKE_ASM_COMPILER_TARGET=${target_triple} - -DCMAKE_ASM_FLAGS=${runtimes_flags} - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_CXX_COMPILER=${LLVM_BINARY_DIR}/bin/clang++${CMAKE_EXECUTABLE_SUFFIX} - -DCMAKE_CXX_COMPILER_TARGET=${target_triple} - -DCMAKE_CXX_FLAGS=${runtimes_flags} - -DCMAKE_C_COMPILER=${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX} - -DCMAKE_C_COMPILER_TARGET=${target_triple} - -DCMAKE_C_FLAGS=${runtimes_flags} - -DCMAKE_INSTALL_MESSAGE=${CMAKE_INSTALL_MESSAGE} - -DCMAKE_INSTALL_PREFIX= - -DCMAKE_NM=${LLVM_BINARY_DIR}/bin/llvm-nm${CMAKE_EXECUTABLE_SUFFIX} - -DCMAKE_RANLIB=${LLVM_BINARY_DIR}/bin/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX} - # Let CMake know we're cross-compiling - -DCMAKE_SYSTEM_NAME=Generic - -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY - ) - - ExternalProject_Add( - llvmlibc_${variant} - SOURCE_DIR ${llvmproject_SOURCE_DIR}/runtimes - PREFIX llvmlibc/${variant} - INSTALL_DIR llvmlibc/${variant}/install - DEPENDS ${lib_tool_dependencies} ${libc_target} libc_hdrgen - CMAKE_ARGS - ${common_cmake_args} - -DLIBC_TARGET_TRIPLE=${target_triple} - -DLIBC_HDRGEN_EXE=${LIBC_HDRGEN} - -DLIBC_CONFIG_PATH=${LIBC_CFG_DIR} - -DLIBC_CONF_TIME_64BIT=ON - -DLLVM_CMAKE_DIR=${LLVM_BINARY_DIR}/lib/cmake/llvm - -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON - -DLLVM_ENABLE_RUNTIMES=libc - -DLLVM_INCLUDE_TESTS=OFF # llvmlibc's tests require C++, so can't be built until llvmlibc can support libc++ - -DLLVM_LIBC_FULL_BUILD=ON - STEP_TARGETS build install - USES_TERMINAL_CONFIGURE FALSE - USES_TERMINAL_BUILD TRUE - USES_TERMINAL_INSTALL TRUE - USES_TERMINAL_TEST TRUE - LIST_SEPARATOR , - # Always run the build command so that incremental builds are correct. - BUILD_ALWAYS TRUE - CONFIGURE_HANDLED_BY_BUILD TRUE - INSTALL_COMMAND ${CMAKE_COMMAND} --install . - # Copy llvm-libc lib directory, moving libraries out of their - # target-specific subdirectory. - COMMAND - ${CMAKE_COMMAND} - -E copy_directory - /lib/${target_triple} - "${LLVM_BINARY_DIR}/${directory}/lib" - # And copy the include directory, which is already arranged right. - COMMAND - ${CMAKE_COMMAND} - -E copy_directory - /include - "${LLVM_BINARY_DIR}/${directory}/include" - ) - - ExternalProject_Add( - llvmlibc-support_${variant} - SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/llvmlibc-support - PREFIX llvmlibc-support/${variant} - INSTALL_DIR "${LLVM_BINARY_DIR}/${directory}" - DEPENDS ${lib_tool_dependencies} llvmlibc_${variant}-install - CMAKE_ARGS ${common_cmake_args} - STEP_TARGETS build install - USES_TERMINAL_CONFIGURE FALSE - USES_TERMINAL_BUILD TRUE - USES_TERMINAL_INSTALL TRUE - USES_TERMINAL_TEST TRUE - LIST_SEPARATOR , - # Always run the build command so that incremental builds are correct. - BUILD_ALWAYS TRUE - CONFIGURE_HANDLED_BY_BUILD TRUE - ) - - add_dependencies( - llvm-toolchain-runtimes - llvmlibc_${variant} - llvmlibc-support_${variant} - ) -endfunction() - -macro( - add_libc - directory - variant - target_triple - flags - picolibc_build_type - test_executor_params - default_boot_flash_addr - default_boot_flash_size - default_flash_addr - default_flash_size - default_ram_addr - default_ram_size - default_stack_size - run_tests -) - # It would be nice to just pass ${ARGN} to both the underlying functions, - # but that has the side effect of expanding any list arguments (e.g. - # test_executor_params) into lots of separate words - the same bug that - # $* has in POSIX sh. We want the analogue of "$@" here, but I don't know - # of one for cmake. - if(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL picolibc) - add_picolibc( - "${directory}" - "${variant}" - "${target_triple}" - "${flags}" - "${picolibc_build_type}" - "${test_executor_params}" - "${default_boot_flash_addr}" - "${default_boot_flash_size}" - "${default_flash_addr}" - "${default_flash_size}" - "${default_ram_addr}" - "${default_ram_size}" - "${default_stack_size}" - "${run_tests}" - ) - elseif(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL newlib) - add_newlib( - "${directory}" - "${variant}" - "${target_triple}" - "${flags}" - "${test_executor_params}" - "${default_boot_flash_addr}" - "${default_boot_flash_size}" - "${default_flash_addr}" - "${default_flash_size}" - "${default_ram_addr}" - "${default_ram_size}" - "${default_stack_size}" - ) - elseif(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL llvmlibc) - add_llvmlibc( - "${directory}" - "${variant}" - "${target_triple}" - "${flags}" - "${test_executor_params}" - "${default_boot_flash_addr}" - "${default_boot_flash_size}" - "${default_flash_addr}" - "${default_flash_size}" - "${default_ram_addr}" - "${default_ram_size}" - "${default_stack_size}" - ) - endif() -endmacro() - -function(get_runtimes_flags directory flags) - set(runtimes_flags "${flags} -ffunction-sections -fdata-sections -fno-ident --sysroot ${LLVM_BINARY_DIR}/${directory}" PARENT_SCOPE) -endfunction() - -function( - add_compiler_rt - directory - variant - target_triple - flags - test_executor - libc_target +ExternalProject_Add( + multilib-${LLVM_TOOLCHAIN_C_LIBRARY} + PREFIX ${CMAKE_BINARY_DIR}/multilib-builds + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/arm-multilib + INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/llvm/${TARGET_LIBRARIES_DIR}${library_subdir} + DEPENDS ${lib_tool_dependencies} + CMAKE_ARGS + ${compiler_launcher_cmake_args} + -DC_LIBRARY=${LLVM_TOOLCHAIN_C_LIBRARY} + -DLLVM_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}/llvm + -DMULTILIB_JSON=${LLVM_TOOLCHAIN_MULTILIB_JSON} + -DENABLE_VARIANTS=${LLVM_TOOLCHAIN_LIBRARY_VARIANTS} + -DLIBC_HDRGEN=${LIBC_HDRGEN} + -DFVP_INSTALL_DIR=${FVP_INSTALL_DIR} + -DFVP_CONFIG_DIR=${CMAKE_CURRENT_SOURCE_DIR}/fvp/config + -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=${FETCHCONTENT_SOURCE_DIR_LLVMPROJECT} + -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=${FETCHCONTENT_SOURCE_DIR_PICOLIBC} + -DFETCHCONTENT_SOURCE_DIR_NEWLIB=${FETCHCONTENT_SOURCE_DIR_NEWLIB} + -DCMAKE_INSTALL_PREFIX= + USES_TERMINAL_CONFIGURE FALSE + USES_TERMINAL_BUILD TRUE + USES_TERMINAL_TEST TRUE + LIST_SEPARATOR , + CONFIGURE_HANDLED_BY_BUILD TRUE + TEST_EXCLUDE_FROM_MAIN TRUE + STEP_TARGETS build install ) - # We can't always put the exact target - # architecture in the triple, because compiler-rt's cmake - # system doesn't recognize every possible Arm architecture - # version. So mostly we just say 'arm' and control the arch - # version via -march=armv7m (or whatever). - # Exceptions are architectures pre-armv7, which compiler-rt expects to - # see in the triple because that's where it looks to decide whether to - # use specific assembly sources. - if(NOT target_triple MATCHES "^(aarch64-none-elf|arm-none-eabi|armv[4-6])") - message(FATAL_ERROR "\ -Target triple name \"${target_triple}\" not compatible with compiler-rt. -Use -march to specify the architecture.") - endif() - # Also, compiler-rt looks in the ABI component of the - # triple to decide whether to use the hard float ABI. - if(flags MATCHES "-mfloat-abi=hard" AND NOT target_triple MATCHES "-eabihf$") - message(FATAL_ERROR "\ -Hard-float library with target triple \"${target_triple}\" must end \"-eabihf\"") - endif() - string(REPLACE "-none-" "-unknown-none-" normalized_target_triple ${target_triple}) - - get_runtimes_flags("${directory}" "${flags}") - - set(compiler_rt_test_flags "${runtimes_flags} -fno-exceptions -fno-rtti -nostartfiles -lcrt0-semihost -lsemihost -T picolibcpp.ld") - if(variant STREQUAL "armv6m_soft_nofp") - set(compiler_rt_test_flags "${compiler_rt_test_flags} -fomit-frame-pointer") - endif() - ExternalProject_Add( - compiler_rt_${variant} - SOURCE_DIR ${llvmproject_SOURCE_DIR}/compiler-rt - PREFIX compiler-rt/${variant} - INSTALL_DIR compiler-rt/${variant}/install - DEPENDS ${lib_tool_dependencies} ${libc_target} - CMAKE_ARGS - -DCMAKE_AR=${LLVM_BINARY_DIR}/bin/llvm-ar${CMAKE_EXECUTABLE_SUFFIX} - -DCMAKE_ASM_COMPILER_TARGET=${target_triple} - -DCMAKE_ASM_FLAGS=${runtimes_flags} - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_CXX_COMPILER=${LLVM_BINARY_DIR}/bin/clang++${CMAKE_EXECUTABLE_SUFFIX} - -DCMAKE_CXX_COMPILER_TARGET=${target_triple} - -DCMAKE_CXX_FLAGS=${runtimes_flags} - -DCMAKE_C_COMPILER=${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX} - -DCMAKE_C_COMPILER_TARGET=${target_triple} - -DCMAKE_C_FLAGS=${runtimes_flags} - -DCMAKE_INSTALL_MESSAGE=${CMAKE_INSTALL_MESSAGE} - -DCMAKE_INSTALL_PREFIX= - -DCMAKE_NM=${LLVM_BINARY_DIR}/bin/llvm-nm${CMAKE_EXECUTABLE_SUFFIX} - -DCMAKE_RANLIB=${LLVM_BINARY_DIR}/bin/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX} - # Let CMake know we're cross-compiling - -DCMAKE_SYSTEM_NAME=Generic - -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY - -DCOMPILER_RT_BAREMETAL_BUILD=ON - -DCOMPILER_RT_BUILD_LIBFUZZER=OFF - -DCOMPILER_RT_BUILD_PROFILE=OFF - -DCOMPILER_RT_BUILD_SANITIZERS=OFF - -DCOMPILER_RT_BUILD_XRAY=OFF - -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON - -DCOMPILER_RT_INCLUDE_TESTS=ON - -DCOMPILER_RT_EMULATOR=${test_executor} - -DCOMPILER_RT_TEST_COMPILER=${LLVM_BINARY_DIR}/bin/clang - -DCOMPILER_RT_TEST_COMPILER_CFLAGS=${compiler_rt_test_flags} - -DLLVM_LIT_ARGS=${LLVM_LIT_ARGS} - -DLLVM_CMAKE_DIR=${LLVM_BINARY_DIR}/lib/cmake/llvm - -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON - STEP_TARGETS build install - USES_TERMINAL_CONFIGURE FALSE - USES_TERMINAL_BUILD TRUE - USES_TERMINAL_INSTALL TRUE - USES_TERMINAL_TEST TRUE - LIST_SEPARATOR , - # Always run the build command so that incremental builds are correct. - BUILD_ALWAYS TRUE - CONFIGURE_HANDLED_BY_BUILD TRUE - INSTALL_COMMAND ${CMAKE_COMMAND} --install . - # Copy compiler-rt lib directory, moving libraries out of their - # target-specific subdirectory. - COMMAND - ${CMAKE_COMMAND} - -E copy_directory - /lib/${normalized_target_triple} - "${LLVM_BINARY_DIR}/${directory}/lib" - ) - - add_dependencies( - llvm-toolchain-runtimes - compiler_rt_${variant} - ) -endfunction() - -function( - add_libcxx_libcxxabi_libunwind - directory - variant - target_triple - flags - test_executor - libc_target - extra_cmake_options - enable_exceptions - enable_rtti +add_dependencies( + llvm-toolchain-runtimes + multilib-${LLVM_TOOLCHAIN_C_LIBRARY}-install ) - get_runtimes_flags("${directory}" "${flags}") - set(target_name "libcxx_libcxxabi_libunwind_${variant}") - set(prefix "libcxx_libcxxabi_libunwind/${variant}") - set(instal_dir "${LLVM_BINARY_DIR}/${directory}") - if(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL picolibc) - list( - APPEND extra_cmake_options - -DLIBCXXABI_ENABLE_EXCEPTIONS=${enable_exceptions} - -DLIBCXXABI_ENABLE_STATIC_UNWINDER=${enable_exceptions} - -DLIBCXX_ENABLE_EXCEPTIONS=${enable_exceptions} - -DLIBCXX_ENABLE_RTTI=${enable_rtti} - ) - endif() - - ExternalProject_Add( - ${target_name} - SOURCE_DIR ${llvmproject_SOURCE_DIR}/runtimes - INSTALL_DIR ${instal_dir} - PREFIX ${prefix} - DEPENDS ${lib_tool_dependencies} compiler_rt_${variant} ${libc_target} - CMAKE_ARGS - -DCMAKE_AR=${LLVM_BINARY_DIR}/bin/llvm-ar${CMAKE_EXECUTABLE_SUFFIX} - -DCMAKE_ASM_FLAGS=${runtimes_flags} - -DCMAKE_BUILD_TYPE=MinSizeRel - -DCMAKE_CXX_COMPILER=${LLVM_BINARY_DIR}/bin/clang++${CMAKE_EXECUTABLE_SUFFIX} - -DCMAKE_CXX_COMPILER_TARGET=${target_triple} - -DCMAKE_CXX_FLAGS=${runtimes_flags} - -DCMAKE_C_COMPILER=${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX} - -DCMAKE_C_COMPILER_TARGET=${target_triple} - -DCMAKE_C_FLAGS=${runtimes_flags} - -DCMAKE_INSTALL_MESSAGE=${CMAKE_INSTALL_MESSAGE} - -DCMAKE_INSTALL_PREFIX=${instal_dir} - -DCMAKE_NM=${LLVM_BINARY_DIR}/bin/llvm-nm${CMAKE_EXECUTABLE_SUFFIX} - -DCMAKE_RANLIB=${LLVM_BINARY_DIR}/bin/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX} - # Let CMake know we're cross-compiling - -DCMAKE_SYSTEM_NAME=Generic - -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY - -DLIBC_LINKER_SCRIPT=picolibcpp.ld - -DLIBCXXABI_BAREMETAL=ON - -DLIBCXXABI_ENABLE_ASSERTIONS=OFF - -DLIBCXXABI_ENABLE_SHARED=OFF - -DLIBCXXABI_ENABLE_STATIC=ON - -DLIBCXXABI_LIBCXX_INCLUDES="${LLVM_BINARY_DIR}/${directory}/include/c++/v1" - -DLIBCXXABI_USE_COMPILER_RT=ON - -DLIBCXXABI_USE_LLVM_UNWINDER=ON - -DLIBCXXABI_TEST_PARAMS=executor=${test_executor} - -DLIBCXXABI_SHARED_OUTPUT_NAME="c++abi-shared" - -DLIBCXX_ABI_UNSTABLE=ON - -DLIBCXX_CXX_ABI=libcxxabi - -DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON - -DLIBCXX_ENABLE_FILESYSTEM=OFF - -DLIBCXX_ENABLE_SHARED=OFF - -DLIBCXX_ENABLE_STATIC=ON - -DLIBCXX_INCLUDE_BENCHMARKS=OFF - -DLIBCXX_TEST_PARAMS=executor=${test_executor} - -DLIBCXX_SHARED_OUTPUT_NAME="c++-shared" - -DLIBUNWIND_ENABLE_ASSERTIONS=OFF - -DLIBUNWIND_ENABLE_SHARED=OFF - -DLIBUNWIND_ENABLE_STATIC=ON - -DLIBUNWIND_IS_BAREMETAL=ON - -DLIBUNWIND_REMEMBER_HEAP_ALLOC=ON - -DLIBUNWIND_USE_COMPILER_RT=ON - -DLIBUNWIND_TEST_PARAMS=executor=${test_executor} - -DLIBUNWIND_SHARED_OUTPUT_NAME="unwind-shared" - -DLLVM_LIT_ARGS=${LLVM_LIT_ARGS} - -DLLVM_ENABLE_RUNTIMES=libcxxabi,libcxx,libunwind - -DRUNTIME_TEST_ARCH_FLAGS=${flags} - -DRUNTIME_VARIANT_NAME=${variant} - ${extra_cmake_options} - STEP_TARGETS build - USES_TERMINAL_CONFIGURE FALSE - USES_TERMINAL_BUILD TRUE - USES_TERMINAL_INSTALL TRUE - USES_TERMINAL_TEST TRUE - LIST_SEPARATOR , - # Always run the build command so that incremental builds are correct. - BUILD_ALWAYS TRUE - CONFIGURE_HANDLED_BY_BUILD TRUE - ) - add_dependencies( - llvm-toolchain-runtimes - ${target_name} - ) -endfunction() - -function(add_compiler_rt_tests variant) +foreach(check_target check-${LLVM_TOOLCHAIN_C_LIBRARY} check-compiler-rt check-cxx check-cxxabi check-unwind) ExternalProject_Add_Step( - compiler_rt_${variant} - check-compiler-rt - COMMAND "${CMAKE_COMMAND}" --build --target check-compiler-rt + multilib-${LLVM_TOOLCHAIN_C_LIBRARY} + ${check_target} + COMMAND "${CMAKE_COMMAND}" --build --target ${check_target} USES_TERMINAL TRUE EXCLUDE_FROM_MAIN TRUE ALWAYS TRUE ) - ExternalProject_Add_StepTargets(compiler_rt_${variant} check-compiler-rt) + ExternalProject_Add_StepTargets(multilib-${LLVM_TOOLCHAIN_C_LIBRARY} ${check_target}) ExternalProject_Add_StepDependencies( - compiler_rt_${variant} - check-compiler-rt - compiler_rt_${variant}-build + multilib-${LLVM_TOOLCHAIN_C_LIBRARY} + ${check_target} + multilib-${LLVM_TOOLCHAIN_C_LIBRARY}-install ) - add_custom_target(check-compiler-rt-${variant}) - add_dependencies(check-compiler-rt-${variant} compiler_rt_${variant}-check-compiler-rt) - # Do not add armv4 or armv5 tests to the check-all - # targets as they currently hang. - if(NOT variant MATCHES "armv4|5") - add_dependencies(check-compiler-rt check-compiler-rt-${variant}) - endif() - add_dependencies(check-llvm-toolchain-runtimes-${variant} check-compiler-rt-${variant}) -endfunction() + add_dependencies(${check_target} multilib-${LLVM_TOOLCHAIN_C_LIBRARY}-${check_target}) +endforeach() + +# Read the json to generate variant specific target names for convenience. +file(READ ${LLVM_TOOLCHAIN_MULTILIB_JSON} multilib_json_str) +string(JSON multilib_defs GET ${multilib_json_str} "libs") -function(add_libcxx_libcxxabi_libunwind_tests variant) - set(target_name "libcxx_libcxxabi_libunwind_${variant}") - set(variant_with_extensions "${variant}") - foreach(check_target check-cxxabi check-unwind check-cxx) +string(JSON lib_count LENGTH ${multilib_defs}) +math(EXPR lib_count_dec "${lib_count} - 1") + +foreach(lib_idx RANGE ${lib_count_dec}) + string(JSON lib_def GET ${multilib_defs} ${lib_idx}) + string(JSON variant GET ${lib_def} "variant") + foreach(check_target check-${LLVM_TOOLCHAIN_C_LIBRARY} check-compiler-rt check-cxx check-cxxabi check-unwind) ExternalProject_Add_Step( - ${target_name} - ${check_target} - COMMAND "${CMAKE_COMMAND}" --build --target ${check_target} + multilib-${LLVM_TOOLCHAIN_C_LIBRARY} + ${check_target}-${variant} + COMMAND "${CMAKE_COMMAND}" --build --target ${check_target}-${variant} USES_TERMINAL TRUE EXCLUDE_FROM_MAIN TRUE ALWAYS TRUE ) - ExternalProject_Add_StepTargets(${target_name} ${check_target}) + ExternalProject_Add_StepTargets(multilib-${LLVM_TOOLCHAIN_C_LIBRARY} ${check_target}-${variant}) ExternalProject_Add_StepDependencies( - ${target_name} - ${check_target} - ${target_name}-build - ) - add_custom_target(${check_target}-${variant_with_extensions}) - add_dependencies(${check_target}-${variant_with_extensions} ${target_name}-${check_target}) - # Do not add armv4 or armv5 tests to the check-all - # targets as they currently hang. - if(NOT variant MATCHES "armv4|5") - add_dependencies(${check_target} ${target_name}-${check_target}) - endif() - add_dependencies(check-llvm-toolchain-runtimes-${variant} ${check_target}-${variant_with_extensions}) - endforeach() -endfunction() - -function(get_compiler_rt_target_triple target_arch flags) - if(target_arch MATCHES "^aarch64") - set(target_triple "aarch64-none-elf") - else() - # Choose the target triple so that compiler-rt will do the - # right thing. We can't always put the exact target - # architecture in the triple, because compiler-rt's cmake - # system doesn't recognize every possible Arm architecture - # version. So mostly we just say 'arm' and control the arch - # version via -march=armv7m (or whatever). - # Exceptions are architectures pre-armv7, which compiler-rt expects to - # see in the triple because that's where it looks to decide whether to - # use specific assembly sources. - if(target_arch MATCHES "^armv[4-6]") - set(target_triple "${target_arch}-none-eabi") - else() - set(target_triple "arm-none-eabi") - endif() - if(flags MATCHES "-mfloat-abi=hard") - # Also, compiler-rt looks in the ABI component of the - # triple to decide whether to use the hard float ABI. - set(target_triple "${target_triple}hf") - endif() - endif() - set(target_triple "${target_triple}" PARENT_SCOPE) -endfunction() - -function(add_library_variant target_arch) - set( - one_value_args - SUFFIX - COMPILE_FLAGS - MULTILIB_FLAGS - PICOLIBC_BUILD_TYPE - EXECUTOR - QEMU_MACHINE - QEMU_CPU - QEMU_PARAMS - FVP_MODEL - FVP_CONFIG - BOOT_FLASH_ADDRESS - BOOT_FLASH_SIZE - FLASH_ADDRESS - FLASH_SIZE - RAM_ADDRESS - RAM_SIZE - STACK_SIZE - ENABLE_EXCEPTIONS - ENABLE_RTTI - ) - cmake_parse_arguments(VARIANT "" "${one_value_args}" "" ${ARGN}) - - if(VARIANT_SUFFIX) - set(variant "${target_arch}_${VARIANT_SUFFIX}") - else() - set(variant "${target_arch}") - endif() - - if(NOT VARIANT_ENABLE_EXCEPTIONS) - set(VARIANT_MULTILIB_FLAGS "${VARIANT_MULTILIB_FLAGS} -fno-exceptions") - endif() - - if(NOT VARIANT_ENABLE_RTTI) - set(VARIANT_MULTILIB_FLAGS "${VARIANT_MULTILIB_FLAGS} -fno-rtti") - endif() - - if(LLVM_TOOLCHAIN_LIBRARY_VARIANTS) - if(NOT enable_${variant}) - message("Disabling library variant ${variant}") - return() - else() - message("Enabling library variant ${variant}") - endif() - endif() - - if(target_arch MATCHES "^aarch64") - set(parent_dir_name aarch64-none-elf) - else() - set(parent_dir_name arm-none-eabi) - endif() - - get_compiler_rt_target_triple("${target_arch}" "${VARIANT_COMPILE_FLAGS}") - - set(directory "${TARGET_LIBRARIES_DIR}${library_subdir}/${parent_dir_name}/${variant}") - set(VARIANT_COMPILE_FLAGS "--target=${target_triple} ${VARIANT_COMPILE_FLAGS}") - - if(VARIANT_EXECUTOR STREQUAL "fvp") - if(EXISTS "${FVP_INSTALL_DIR}") - get_fvp_params( - "${VARIANT_FVP_MODEL}" - "${VARIANT_FVP_CONFIG}" - ) - set( - lit_test_executor - ${CMAKE_CURRENT_SOURCE_DIR}/test-support/lit-exec-fvp.py - ${test_executor_params} - ) - set(have_executor TRUE) - else() - set(have_executor FALSE) - endif() - else() - get_qemu_params( - "${target_triple}" - "${VARIANT_QEMU_MACHINE}" - "${VARIANT_QEMU_CPU}" - "${VARIANT_QEMU_PARAMS}" + multilib-${LLVM_TOOLCHAIN_C_LIBRARY} + ${check_target}-${variant} + multilib-${LLVM_TOOLCHAIN_C_LIBRARY}-install ) - set( - lit_test_executor - ${CMAKE_CURRENT_SOURCE_DIR}/test-support/lit-exec-qemu.py - ${test_executor_params} - ) - set(have_executor TRUE) - endif() - list(JOIN lit_test_executor " " lit_test_executor) - if(NOT PREBUILT_TARGET_LIBRARIES) - add_libc( - "${directory}" - "${variant}" - "${target_triple}" - "${VARIANT_COMPILE_FLAGS}" - "${VARIANT_PICOLIBC_BUILD_TYPE}" - "${test_executor_params}" - "${VARIANT_BOOT_FLASH_ADDRESS}" - "${VARIANT_BOOT_FLASH_SIZE}" - "${VARIANT_FLASH_ADDRESS}" - "${VARIANT_FLASH_SIZE}" - "${VARIANT_RAM_ADDRESS}" - "${VARIANT_RAM_SIZE}" - "${VARIANT_STACK_SIZE}" - "${have_executor}" - ) - add_compiler_rt( - "${directory}" - "${variant}" - "${target_triple}" - "${VARIANT_COMPILE_FLAGS}" - "${lit_test_executor}" - "${LLVM_TOOLCHAIN_C_LIBRARY}_${variant}-install" - ) - if(CXX_LIBS) - add_libcxx_libcxxabi_libunwind( - "${directory}" - "${variant}" - "${target_triple}" - "${VARIANT_COMPILE_FLAGS}" - "${lit_test_executor}" - "${LLVM_TOOLCHAIN_C_LIBRARY}_${variant}-install" - "${${LLVM_TOOLCHAIN_C_LIBRARY}_specific_runtimes_options}" - ${VARIANT_ENABLE_EXCEPTIONS} - ${VARIANT_ENABLE_RTTI} - ) - endif() - if(NOT have_executor) - message("All library tests disabled for ${variant}, due to missing executor") - elseif(VARIANT_COMPILE_FLAGS MATCHES "-march=armv8") - message("C++ runtime libraries tests disabled for ${variant}") - else() - add_custom_target(check-llvm-toolchain-runtimes-${variant}) - # Do not add armv4 or armv5 tests to the check-all - # targets as they currently hang. - if(NOT variant MATCHES "armv4|5") - add_dependencies(check-llvm-toolchain-runtimes check-llvm-toolchain-runtimes-${variant}) - endif() - add_compiler_rt_tests("${variant}") - if(CXX_LIBS) - add_libcxx_libcxxabi_libunwind_tests("${variant}") - endif() - endif() - endif() - - string(APPEND multilib_yaml_content "- Dir: ${parent_dir_name}/${variant}\n") - - string(APPEND multilib_yaml_content " Flags:\n") - string(REPLACE " " ";" multilib_flags_list ${VARIANT_MULTILIB_FLAGS}) - foreach(flag ${multilib_flags_list}) - string(APPEND multilib_yaml_content " - ${flag}\n") + add_custom_target(${check_target}-${variant}) + add_dependencies(${check_target}-${variant} multilib-${LLVM_TOOLCHAIN_C_LIBRARY}-${check_target}-${variant}) endforeach() - string(APPEND multilib_yaml_content " Group: stdlibs\n") - - install( - DIRECTORY "${LLVM_BINARY_DIR}/${directory}/" - DESTINATION "${directory}" - COMPONENT llvm-toolchain-libs - ) - set(multilib_yaml_content "${multilib_yaml_content}" PARENT_SCOPE) -endfunction() - -function(add_nonexistent_library_variant) - set( - one_value_args - MULTILIB_FLAGS - ERROR_MESSAGE - ) - cmake_parse_arguments(ERR "" "${one_value_args}" "" ${ARGN}) - - string(APPEND multilib_yaml_content "- Error: \"${ERR_ERROR_MESSAGE}\"\n") - - string(APPEND multilib_yaml_content " Flags:\n") - string(REPLACE " " ";" multilib_flags_list ${ERR_MULTILIB_FLAGS}) - foreach(flag ${multilib_flags_list}) - string(APPEND multilib_yaml_content " - ${flag}\n") - endforeach() - string(APPEND multilib_yaml_content " Group: stdlibs\n") - - set(multilib_yaml_content "${multilib_yaml_content}" PARENT_SCOPE) -endfunction() - -function(add_library_variants_for_cpu target_arch) - set( - one_value_args - SUFFIX - COMPILE_FLAGS - MULTILIB_FLAGS - PICOLIBC_BUILD_TYPE - EXECUTOR - QEMU_MACHINE - QEMU_CPU - QEMU_PARAMS - FVP_MODEL - FVP_CONFIG - BOOT_FLASH_ADDRESS - BOOT_FLASH_SIZE - FLASH_ADDRESS - FLASH_SIZE - RAM_ADDRESS - RAM_SIZE - STACK_SIZE - ) - cmake_parse_arguments(VARIANT "" "${one_value_args}" "" ${ARGN}) - - # Variant with no exceptions needs to come later in multilib.yaml to - # take priority. - foreach(enable_exceptions_and_rtti IN ITEMS ON OFF) - set(SUFFIXES) - if(VARIANT_SUFFIX) - list(APPEND SUFFIXES ${VARIANT_SUFFIX}) - endif() - if(enable_exceptions_and_rtti) - list(APPEND SUFFIXES "exn") - list(APPEND SUFFIXES "rtti") - endif() - list(JOIN SUFFIXES "_" COMBINED_SUFFIX) - - add_library_variant( - "${target_arch}" - SUFFIX "${COMBINED_SUFFIX}" - COMPILE_FLAGS "${VARIANT_COMPILE_FLAGS}" - MULTILIB_FLAGS "${VARIANT_MULTILIB_FLAGS}" - PICOLIBC_BUILD_TYPE "${VARIANT_PICOLIBC_BUILD_TYPE}" - EXECUTOR "${VARIANT_EXECUTOR}" - QEMU_MACHINE "${VARIANT_QEMU_MACHINE}" - QEMU_CPU "${VARIANT_QEMU_CPU}" - QEMU_PARAMS "${VARIANT_QEMU_PARAMS}" - FVP_MODEL "${VARIANT_FVP_MODEL}" - FVP_CONFIG "${VARIANT_FVP_CONFIG}" - BOOT_FLASH_ADDRESS "${VARIANT_BOOT_FLASH_ADDRESS}" - BOOT_FLASH_SIZE "${VARIANT_BOOT_FLASH_SIZE}" - FLASH_ADDRESS "${VARIANT_FLASH_ADDRESS}" - FLASH_SIZE "${VARIANT_FLASH_SIZE}" - RAM_ADDRESS "${VARIANT_RAM_ADDRESS}" - RAM_SIZE "${VARIANT_RAM_SIZE}" - STACK_SIZE "${VARIANT_STACK_SIZE}" - ENABLE_EXCEPTIONS "${enable_exceptions_and_rtti}" - ENABLE_RTTI "${enable_exceptions_and_rtti}" - ) - endforeach() - - set(multilib_yaml_content "${multilib_yaml_content}" PARENT_SCOPE) -endfunction() - -set(multilib_yaml_content "") - -# Define which library variants to build and which flags to use. -# For most variants, the "flash" memory is placed in address range, where -# simulated boards have RAM. This is because code for some tests does not fit -# the real flash. -add_library_variants_for_cpu( - aarch64a - COMPILE_FLAGS "-march=armv8-a" - MULTILIB_FLAGS "--target=aarch64-unknown-none-elf" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "virt" - QEMU_CPU "cortex-a57" - BOOT_FLASH_ADDRESS 0x40000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x40001000 - FLASH_SIZE 0xfff000 - RAM_ADDRESS 0x41000000 - RAM_SIZE 0x1000000 - STACK_SIZE 8K -) -# For AArch32, clang uses different defaults for FPU selection than GCC, both -# when "+fp" or "+fp.dp" are used and when no FPU specifier is provided in -# "-march=". Using "-mfpu=" explicitly. -add_library_variants_for_cpu( - armv4t - COMPILE_FLAGS "-march=armv4t -mfpu=none" - MULTILIB_FLAGS "--target=armv4t-unknown-none-eabi -mfpu=none" - PICOLIBC_BUILD_TYPE "minsize" - QEMU_MACHINE "none" - QEMU_CPU "ti925t" - QEMU_PARAMS "-m 1G" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x20000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x21000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv5te - COMPILE_FLAGS "-march=armv5te -mfpu=none" - MULTILIB_FLAGS "--target=armv5e-unknown-none-eabi -mfpu=none" - PICOLIBC_BUILD_TYPE "minsize" - QEMU_MACHINE "none" - QEMU_CPU "arm926" - QEMU_PARAMS "-m 1G" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x20000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x21000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv6m - SUFFIX soft_nofp - COMPILE_FLAGS "-mfloat-abi=soft -march=armv6m -mfpu=none" - MULTILIB_FLAGS "--target=thumbv6m-unknown-none-eabi -mfpu=none" - PICOLIBC_BUILD_TYPE "minsize" - QEMU_MACHINE "mps2-an385" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x21000000 - FLASH_SIZE 0x600000 - RAM_ADDRESS 0x21600000 - RAM_SIZE 0xa00000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv7a - SUFFIX soft_nofp - COMPILE_FLAGS "-mfloat-abi=soft -march=armv7a -mfpu=none" - MULTILIB_FLAGS "--target=armv7-unknown-none-eabi -mfpu=none" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "none" - QEMU_CPU "cortex-a7" - QEMU_PARAMS "-m 1G" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x20000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x21000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv7a - SUFFIX hard_vfpv3_d16 - COMPILE_FLAGS "-mfloat-abi=hard -march=armv7a -mfpu=vfpv3-d16" - MULTILIB_FLAGS "--target=armv7-unknown-none-eabihf -mfpu=vfpv3-d16" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "none" - QEMU_CPU "cortex-a8" - QEMU_PARAMS "-m 1G" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x20000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x21000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv7a - SUFFIX soft_vfpv3_d16 - COMPILE_FLAGS "-mfloat-abi=softfp -march=armv7a -mfpu=vfpv3-d16" - MULTILIB_FLAGS "--target=armv7-unknown-none-eabi -mfpu=vfpv3-d16" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "none" - QEMU_CPU "cortex-a8" - QEMU_PARAMS "-m 1G" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x20000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x21000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv7r - SUFFIX soft_nofp - COMPILE_FLAGS "-mfloat-abi=soft -march=armv7r -mfpu=none" - MULTILIB_FLAGS "--target=armv7r-unknown-none-eabi -mfpu=none" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "none" - QEMU_CPU "cortex-r5f" - QEMU_PARAMS "-m 1G" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x20000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x21000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv7r - SUFFIX hard_vfpv3xd - COMPILE_FLAGS "-mfloat-abi=hard -march=armv7r -mfpu=vfpv3xd" - MULTILIB_FLAGS "--target=armv7r-unknown-none-eabihf -mfpu=vfpv3xd" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "none" - QEMU_CPU "cortex-r5f" - QEMU_PARAMS "-m 1G" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x20000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x21000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv7r - SUFFIX hard_vfpv3_d16 - COMPILE_FLAGS "-mfloat-abi=hard -march=armv7r -mfpu=vfpv3-d16" - MULTILIB_FLAGS "--target=armv7r-unknown-none-eabihf -mfpu=vfpv3-d16" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "none" - QEMU_CPU "cortex-r5f" - QEMU_PARAMS "-m 1G" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x20000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x21000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv7r - SUFFIX soft_vfpv3xd - COMPILE_FLAGS "-mfloat-abi=softfp -march=armv7r -mfpu=vfpv3xd" - MULTILIB_FLAGS "--target=armv7r-unknown-none-eabi -mfpu=vfpv3xd" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "none" - QEMU_CPU "cortex-r5f" - QEMU_PARAMS "-m 1G" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x20000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x21000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv7m - SUFFIX soft_fpv4_sp_d16 - COMPILE_FLAGS "-mfloat-abi=softfp -march=armv7m -mfpu=fpv4-sp-d16" - MULTILIB_FLAGS "--target=thumbv7m-unknown-none-eabi -mfpu=fpv4-sp-d16" - PICOLIBC_BUILD_TYPE "minsize" - QEMU_MACHINE "mps2-an386" - QEMU_CPU "cortex-m4" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x21000000 - FLASH_SIZE 0x600000 - RAM_ADDRESS 0x21600000 - RAM_SIZE 0xa00000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv7m - SUFFIX hard_fpv4_sp_d16 - COMPILE_FLAGS "-mfloat-abi=hard -march=armv7m -mfpu=fpv4-sp-d16" - MULTILIB_FLAGS "--target=thumbv7m-unknown-none-eabihf -mfpu=fpv4-sp-d16" - PICOLIBC_BUILD_TYPE "minsize" - QEMU_MACHINE "mps2-an386" - QEMU_CPU "cortex-m4" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x21000000 - FLASH_SIZE 0x600000 - RAM_ADDRESS 0x21600000 - RAM_SIZE 0xa00000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv7m - SUFFIX hard_fpv5_d16 - COMPILE_FLAGS "-mfloat-abi=hard -march=armv7m -mfpu=fpv5-d16" - MULTILIB_FLAGS "--target=thumbv7m-unknown-none-eabihf -mfpu=fpv5-d16" - PICOLIBC_BUILD_TYPE "minsize" - QEMU_MACHINE "mps2-an500" - QEMU_CPU "cortex-m7" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x60000000 - FLASH_SIZE 0x600000 - RAM_ADDRESS 0x60600000 - RAM_SIZE 0xa00000 - STACK_SIZE 4K -) -# When no -mfpu=none is specified, the compiler internally adds all other -# possible fpu settings before searching for matching variants. So for the -# no-fpu variant to win, it has to be in multilab.yaml after all other -# fpu variants. The order of variants in multilab.yaml depends on the order -# of the add_library_variant calls. So the add_library_variant that adds -# the soft_nofp for armv7m is placed after all other armv7m variants. -add_library_variants_for_cpu( - armv7m - SUFFIX soft_nofp - COMPILE_FLAGS "-mfloat-abi=soft -march=armv7m -mfpu=none" - MULTILIB_FLAGS "--target=thumbv7m-unknown-none-eabi -mfpu=none" - PICOLIBC_BUILD_TYPE "minsize" - QEMU_MACHINE "mps2-an386" - QEMU_CPU "cortex-m4" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x21000000 - FLASH_SIZE 0x600000 - RAM_ADDRESS 0x21600000 - RAM_SIZE 0xa00000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv8m.main - SUFFIX soft_nofp - COMPILE_FLAGS "-mfloat-abi=soft -march=armv8m.main -mfpu=none" - MULTILIB_FLAGS "--target=thumbv8m.main-unknown-none-eabi -mfpu=none" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "mps2-an505" - QEMU_CPU "cortex-m33" - BOOT_FLASH_ADDRESS 0x10000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x80000000 - FLASH_SIZE 0x600000 - RAM_ADDRESS 0x80600000 - RAM_SIZE 0xa00000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv8m.main - SUFFIX hard_fp - COMPILE_FLAGS "-mfloat-abi=hard -march=armv8m.main -mfpu=fpv5-sp-d16" - MULTILIB_FLAGS "--target=thumbv8m.main-unknown-none-eabihf -mfpu=fpv5-sp-d16" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "mps2-an505" - QEMU_CPU "cortex-m33" - BOOT_FLASH_ADDRESS 0x10000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x80000000 - FLASH_SIZE 0x600000 - RAM_ADDRESS 0x80600000 - RAM_SIZE 0xa00000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv8.1m.main - SUFFIX soft_nofp_nomve - COMPILE_FLAGS "-mfloat-abi=soft -march=armv8.1m.main+nomve -mfpu=none" - MULTILIB_FLAGS "--target=thumbv8.1m.main-unknown-none-eabi -mfpu=none" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "mps3-an547" - QEMU_CPU "cortex-m55" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 512K - FLASH_ADDRESS 0x60000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x61000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv8.1m.main - SUFFIX hard_fp_nomve - COMPILE_FLAGS "-mfloat-abi=hard -march=armv8.1m.main+nomve -mfpu=fp-armv8-fullfp16-sp-d16" - MULTILIB_FLAGS "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-sp-d16" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "mps3-an547" - QEMU_CPU "cortex-m55" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 512K - FLASH_ADDRESS 0x60000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x61000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv8.1m.main - SUFFIX hard_fpdp_nomve - COMPILE_FLAGS "-mfloat-abi=hard -march=armv8.1m.main+nomve -mfpu=fp-armv8-fullfp16-d16" - MULTILIB_FLAGS "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-d16" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "mps3-an547" - QEMU_CPU "cortex-m55" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 512K - FLASH_ADDRESS 0x60000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x61000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv8.1m.main - SUFFIX hard_nofp_mve - COMPILE_FLAGS "-mfloat-abi=hard -march=armv8.1m.main+mve -mfpu=none" - MULTILIB_FLAGS "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+mve -mfpu=none" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "mps3-an547" - QEMU_CPU "cortex-m55" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 512K - FLASH_ADDRESS 0x60000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x61000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_nonexistent_library_variant( - # We don't build any MVE-capable libraries with the soft-float ABI. - # We do have Armv7-M soft-float libraries, but you can't fall back to - # using those, because MVE requires the FPSCR to be set up specially - # at startup time, and our v7-M soft-float libraries don't do that. - # - # So, rather than select one of those libraries and silently generate - # wrong MVE code, we force an error report instead. - MULTILIB_FLAGS "--target=thumbv8.1m.main-unknown-none-eabi -march=thumbv8.1m.main+mve" - ERROR_MESSAGE "No library available for MVE with soft-float ABI. Try -mfloat-abi=hard." -) -add_library_variants_for_cpu( - armv8.1m.main - SUFFIX soft_nofp_nomve_pacret_bti - COMPILE_FLAGS "-mfloat-abi=soft -march=armv8.1m.main+nomve+pacbti -mfpu=none -mbranch-protection=pac-ret+bti" - MULTILIB_FLAGS "--target=thumbv8.1m.main-unknown-none-eabi -mfpu=none -mbranch-protection=pac-ret+bti" - PICOLIBC_BUILD_TYPE "release" - EXECUTOR fvp - FVP_MODEL corstone-310 - FVP_CONFIG "cortex-m85 m-pacbti m-nofp mve-none" - BOOT_FLASH_ADDRESS 0x01000000 - BOOT_FLASH_SIZE 2M - FLASH_ADDRESS 0x60000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x61000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv8.1m.main - SUFFIX hard_fp_nomve_pacret_bti - COMPILE_FLAGS "-mfloat-abi=hard -march=armv8.1m.main+nomve+pacbti -mfpu=fp-armv8-fullfp16-sp-d16 -mbranch-protection=pac-ret+bti" - MULTILIB_FLAGS "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-sp-d16 -mbranch-protection=pac-ret+bti" - PICOLIBC_BUILD_TYPE "release" - EXECUTOR fvp - FVP_MODEL corstone-310 - FVP_CONFIG "cortex-m85 m-pacbti m-fp mve-none" - BOOT_FLASH_ADDRESS 0x01000000 - BOOT_FLASH_SIZE 2M - FLASH_ADDRESS 0x60000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x61000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv8.1m.main - SUFFIX hard_fpdp_nomve_pacret_bti - COMPILE_FLAGS "-mfloat-abi=hard -march=armv8.1m.main+nomve+pacbti -mfpu=fp-armv8-fullfp16-d16 -mbranch-protection=pac-ret+bti" - MULTILIB_FLAGS "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-d16 -mbranch-protection=pac-ret+bti" - PICOLIBC_BUILD_TYPE "release" - EXECUTOR fvp - FVP_MODEL corstone-310 - FVP_CONFIG "cortex-m85 m-pacbti m-fp mve-none" - BOOT_FLASH_ADDRESS 0x01000000 - BOOT_FLASH_SIZE 2M - FLASH_ADDRESS 0x60000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x61000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv8.1m.main - SUFFIX hard_nofp_mve_pacret_bti - COMPILE_FLAGS "-mfloat-abi=hard -march=armv8.1m.main+mve+pacbti -mfpu=none -mbranch-protection=pac-ret+bti" - MULTILIB_FLAGS "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+mve -mfpu=none -mbranch-protection=pac-ret+bti" - PICOLIBC_BUILD_TYPE "release" - EXECUTOR fvp - FVP_MODEL corstone-310 - FVP_CONFIG "cortex-m85 m-pacbti m-nofp mve-int" - BOOT_FLASH_ADDRESS 0x01000000 - BOOT_FLASH_SIZE 2M - FLASH_ADDRESS 0x60000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x61000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) - - -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/cmake/multilib.yaml.in - ${CMAKE_CURRENT_BINARY_DIR}/multilib-without-fpus.yaml - @ONLY -) - -set(multilib_yaml_depends - "${CMAKE_CURRENT_SOURCE_DIR}/multilib-generate.py" - "${CMAKE_CURRENT_BINARY_DIR}/multilib-without-fpus.yaml" -) -if(LIBS_DEPEND_ON_TOOLS) - list(APPEND multilib_yaml_depends clang) -endif() - -add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/llvm/${TARGET_LIBRARIES_DIR}${library_subdir}/multilib.yaml - COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_BINARY_DIR}/multilib-without-fpus.yaml - ${CMAKE_CURRENT_BINARY_DIR}/llvm/${TARGET_LIBRARIES_DIR}${library_subdir}/multilib.yaml - COMMAND ${Python3_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/multilib-generate.py" - "--clang=${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX}" - "--llvm-source=${llvmproject_SOURCE_DIR}" - >> "${CMAKE_CURRENT_BINARY_DIR}/llvm/${TARGET_LIBRARIES_DIR}${library_subdir}/multilib.yaml" - DEPENDS ${multilib_yaml_depends} -) -add_custom_target(multilib_yaml ALL DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/llvm/${TARGET_LIBRARIES_DIR}${library_subdir}/multilib.yaml) -add_dependencies(llvm-toolchain-runtimes multilib_yaml) +endforeach() install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/llvm/${TARGET_LIBRARIES_DIR}${library_subdir}/multilib.yaml - DESTINATION ${TARGET_LIBRARIES_DIR}${library_subdir} + DIRECTORY ${LLVM_BINARY_DIR}/${TARGET_LIBRARIES_DIR}/. + DESTINATION ${TARGET_LIBRARIES_DIR} COMPONENT llvm-toolchain-libs ) diff --git a/arm-multilib/CMakeLists.txt b/arm-multilib/CMakeLists.txt new file mode 100644 index 0000000..a27bf75 --- /dev/null +++ b/arm-multilib/CMakeLists.txt @@ -0,0 +1,282 @@ +# +# Copyright (c) 2024, Arm Limited and affiliates. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# CMake build for a multilib layout of library variants, with each +# variant in a subdirectory and a multilib.yaml file to map flags to +# a variant. + +cmake_minimum_required(VERSION 3.20) + +project(arm-multilib) + +# Root directory of the repo. +set(TOOLCHAIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..) + +# Cache variables to be set by user +set(MULTILIB_JSON "" CACHE STRING "JSON file to load library definitions from.") +set(ENABLE_VARIANTS "all" CACHE STRING "Semicolon separated list of variants to build, or \"all\". Must match entries in the json.") +set(C_LIBRARY "picolibc" CACHE STRING "Which C library to use.") +set_property(CACHE C_LIBRARY PROPERTY STRINGS picolibc newlib llvmlibc) +set(LLVM_BINARY_DIR "" CACHE PATH "Path to LLVM toolchain build or install root.") +set(LIBC_HDRGEN "" CACHE PATH "Path to prebuilt lbc-hdrgen if not included in LLVM binaries set by LLVM_BINARY_DIR") +set( + FVP_INSTALL_DIR + "" CACHE STRING + "The directory in which the FVP models are installed. These are not + included in this repository, but can be downloaded by the script + fvp/get_fvps.sh" +) +set(FVP_CONFIG_DIR "${TOOLCHAIN_SOURCE_DIR}/fvp/config" CACHE STRING "The directory in which the FVP models are installed.") + +# If a compiler launcher such as ccache has been set, it should be +# passed down to each subproject build. +set(compiler_launcher_cmake_args "") +if(CMAKE_C_COMPILER_LAUNCHER) + list(APPEND compiler_launcher_cmake_args "-DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER}") +endif() +if(CMAKE_CXX_COMPILER_LAUNCHER) + list(APPEND compiler_launcher_cmake_args "-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}") +endif() + +# Arguments to pass down to the library projects. +foreach(arg + LLVM_BINARY_DIR + LIBC_HDRGEN + FVP_INSTALL_DIR + FVP_CONFIG_DIR +) + if(${arg}) + list(APPEND passthrough_dirs "-D${arg}=${${arg}}") + endif() +endforeach() + +include(ExternalProject) +include(${TOOLCHAIN_SOURCE_DIR}/cmake/fetch_llvm.cmake) +list(APPEND passthrough_dirs "-DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=${FETCHCONTENT_SOURCE_DIR_LLVMPROJECT}") +if(C_LIBRARY STREQUAL picolibc) + include(${TOOLCHAIN_SOURCE_DIR}/cmake/fetch_picolibc.cmake) + list(APPEND passthrough_dirs "-DFETCHCONTENT_SOURCE_DIR_PICOLIBC=${FETCHCONTENT_SOURCE_DIR_PICOLIBC}") +elseif(C_LIBRARY STREQUAL newlib) + include(${TOOLCHAIN_SOURCE_DIR}/cmake/fetch_newlib.cmake) + list(APPEND passthrough_dirs "-DFETCHCONTENT_SOURCE_DIR_NEWLIB=${FETCHCONTENT_SOURCE_DIR_NEWLIB}") +endif() + +# Target for any dependencies to build the runtimes project. +add_custom_target(runtimes-depends) + +# If building llvm-libc, ensure libc-hdrgen is available. +if(C_LIBRARY STREQUAL llvmlibc) + if(NOT LIBC_HDRGEN) + if(EXISTS ${LLVM_BINARY_DIR}/bin/libc-hdrgen${CMAKE_EXECUTABLE_SUFFIX}) + set(LIBC_HDRGEN ${LLVM_BINARY_DIR}/bin/libc-hdrgen${CMAKE_EXECUTABLE_SUFFIX}) + else() + ExternalProject_Add( + libc_hdrgen + SOURCE_DIR ${llvmproject_SOURCE_DIR}/llvm + CMAKE_ARGS + -DLLVM_ENABLE_RUNTIMES=libc + -DLLVM_LIBC_FULL_BUILD=ON + -DCMAKE_BUILD_TYPE=Debug + BUILD_COMMAND ${CMAKE_COMMAND} --build . --target libc-hdrgen + INSTALL_COMMAND ${CMAKE_COMMAND} -E true + CONFIGURE_HANDLED_BY_BUILD TRUE + ) + ExternalProject_Get_property(libc_hdrgen BINARY_DIR) + set(LIBC_HDRGEN ${BINARY_DIR}/bin/libc-hdrgen${CMAKE_EXECUTABLE_SUFFIX}) + add_dependencies(runtimes-depends libc_hdrgen) + endif() + endif() + list(APPEND passthrough_dirs "-DLIBC_HDRGEN=${LIBC_HDRGEN}") +endif() + +# Create one target to run all the tests. +add_custom_target(check-${C_LIBRARY}) +add_custom_target(check-compiler-rt) +add_custom_target(check-cxx) +add_custom_target(check-cxxabi) +add_custom_target(check-unwind) + +add_custom_target(check-all) +add_dependencies( + check-all + check-${C_LIBRARY} + check-compiler-rt + check-cxx + check-cxxabi + check-unwind +) + +# Read the JSON file to load a multilib configuration. +file(READ ${MULTILIB_JSON} multilib_json_str) +string(JSON multilib_defs GET ${multilib_json_str} "libs") + +string(JSON lib_count LENGTH ${multilib_defs}) +math(EXPR lib_count_dec "${lib_count} - 1") + +foreach(lib_idx RANGE ${lib_count_dec}) + string(JSON lib_def GET ${multilib_defs} ${lib_idx}) + string(JSON variant GET ${lib_def} "variant") + + if(variant IN_LIST ENABLE_VARIANTS OR ENABLE_VARIANTS STREQUAL "all") + string(JSON variant_multilib_flags GET ${lib_def} "flags") + # Placeholder libraries won't have a json, so store the error in + # a variable so a fatal error isn't generated. + string(JSON variant_json ERROR_VARIABLE json_error GET ${lib_def} "json") + + if(NOT variant_json STREQUAL "json-NOTFOUND") + # Sort by target triple + if(variant MATCHES "^aarch64") + set(parent_dir_name aarch64-none-elf) + else() + set(parent_dir_name arm-none-eabi) + endif() + set(destination_directory "${CMAKE_CURRENT_BINARY_DIR}/multilib/${parent_dir_name}/${variant}") + install( + DIRECTORY ${destination_directory} + DESTINATION ${parent_dir_name} + ) + set(variant_json_file ${CMAKE_CURRENT_SOURCE_DIR}/json/variants/${variant_json}) + + ExternalProject_Add( + runtimes-${variant} + PREFIX ${CMAKE_BINARY_DIR}/lib-builds + SOURCE_DIR ${TOOLCHAIN_SOURCE_DIR}/arm-runtimes + INSTALL_DIR ${destination_directory} + DEPENDS runtimes-depends + CMAKE_ARGS + ${compiler_launcher_cmake_args} + ${passthrough_dirs} + -DVARIANT_JSON=${variant_json_file} + -DC_LIBRARY=${C_LIBRARY} + -DCMAKE_INSTALL_PREFIX= + STEP_TARGETS build install + USES_TERMINAL_CONFIGURE FALSE + USES_TERMINAL_BUILD TRUE + USES_TERMINAL_TEST TRUE + LIST_SEPARATOR , + CONFIGURE_HANDLED_BY_BUILD TRUE + TEST_EXCLUDE_FROM_MAIN TRUE + ) + + # Read info from the variant specific json. + # From the json, check which tests are enabled. + file(READ ${variant_json_file} variant_json_str) + foreach(test_enable_var + ENABLE_LIBC_TESTS + ENABLE_COMPILER_RT_TESTS + ENABLE_LIBCXX_TESTS + ) + string(JSON read_${test_enable_var} ERROR_VARIABLE json_error GET ${variant_json_str} "args" ${C_LIBRARY} ${test_enable_var}) + if(read_${test_enable_var} STREQUAL "json-NOTFOUND") + string(JSON read_${test_enable_var} ERROR_VARIABLE json_error GET ${variant_json_str} "args" "common" ${test_enable_var}) + if(read_${test_enable_var} STREQUAL "json-NOTFOUND") + set(read_${test_enable_var} "OFF") + endif() + endif() + endforeach() + set(check_targets "") + if(read_ENABLE_LIBC_TESTS) + list(APPEND check_targets check-${C_LIBRARY}) + endif() + if(read_ENABLE_COMPILER_RT_TESTS) + list(APPEND check_targets check-compiler-rt) + endif() + if(read_ENABLE_LIBCXX_TESTS) + list(APPEND check_targets check-cxx) + list(APPEND check_targets check-cxxabi) + list(APPEND check_targets check-unwind) + endif() + foreach(check_target ${check_targets}) + ExternalProject_Add_Step( + runtimes-${variant} + ${check_target} + COMMAND "${CMAKE_COMMAND}" --build --target ${check_target} + USES_TERMINAL TRUE + EXCLUDE_FROM_MAIN TRUE + ALWAYS TRUE + ) + ExternalProject_Add_StepTargets(runtimes-${variant} ${check_target}) + ExternalProject_Add_StepDependencies( + runtimes-${variant} + ${check_target} + runtimes-${variant}-build + ) + add_custom_target(${check_target}-${variant}) + add_dependencies(${check_target} runtimes-${variant}-${check_target}) + add_dependencies(${check_target}-${variant} runtimes-${variant}-${check_target}) + endforeach() + + # Add the variant to the multilib yaml + string(APPEND multilib_yaml_content "- Dir: ${parent_dir_name}/${variant}\n") + string(APPEND multilib_yaml_content " Flags:\n") + string(REPLACE " " ";" multilib_flags_list ${variant_multilib_flags}) + foreach(flag ${multilib_flags_list}) + string(APPEND multilib_yaml_content " - ${flag}\n") + endforeach() + string(APPEND multilib_yaml_content " Group: stdlibs\n") + else() + # In place of a json, an error message is expected. + string(JSON variant_error_msg GET ${lib_def} "error") + + string(APPEND multilib_yaml_content "- Error: \"${variant_error_msg}\"\n") + string(APPEND multilib_yaml_content " Flags:\n") + string(REPLACE " " ";" multilib_flags_list ${variant_multilib_flags}) + foreach(flag ${multilib_flags_list}) + string(APPEND multilib_yaml_content " - ${flag}\n") + endforeach() + string(APPEND multilib_yaml_content " Group: stdlibs\n") + endif() + endif() + +endforeach() + +# Multilib file is generated in two parts. +# 1. Template is filled with multilib flags from json +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/multilib.yaml.in + ${CMAKE_CURRENT_BINARY_DIR}/multilib-without-fpus.yaml + @ONLY +) + +# 2. multilib-generate.py maps compiler command line options to flags +add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/multilib-fpus.yaml + COMMAND ${Python3_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/multilib-generate.py" + "--clang=${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX}" + "--llvm-source=${FETCHCONTENT_SOURCE_DIR_LLVMPROJECT}" + >> ${CMAKE_CURRENT_BINARY_DIR}/multilib-fpus.yaml +) + +# Combine the two parts. +add_custom_command( + OUTPUT + ${CMAKE_CURRENT_BINARY_DIR}/multilib/multilib.yaml + COMMAND + ${CMAKE_COMMAND} -E cat + ${CMAKE_CURRENT_BINARY_DIR}/multilib-without-fpus.yaml + ${CMAKE_CURRENT_BINARY_DIR}/multilib-fpus.yaml + > ${CMAKE_CURRENT_BINARY_DIR}/multilib/multilib.yaml + DEPENDS + ${CMAKE_CURRENT_BINARY_DIR}/multilib-without-fpus.yaml + ${CMAKE_CURRENT_BINARY_DIR}/multilib-fpus.yaml +) + +add_custom_target(multilib-yaml ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/multilib/multilib.yaml) +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/multilib/multilib.yaml + DESTINATION . +) diff --git a/arm-multilib/json/multilib.json b/arm-multilib/json/multilib.json new file mode 100644 index 0000000..7f67531 --- /dev/null +++ b/arm-multilib/json/multilib.json @@ -0,0 +1,259 @@ +{ + "libs": [ + { + "variant": "aarch64a_exn_rtti", + "json": "aarch64a_exn_rtti.json", + "flags": "--target=aarch64-unknown-none-elf" + }, + { + "variant": "aarch64a", + "json": "aarch64a.json", + "flags": "--target=aarch64-unknown-none-elf -fno-exceptions -fno-rtti" + }, + { + "variant": "armv4t_exn_rtti", + "json": "armv4t_exn_rtti.json", + "flags": "--target=armv4t-unknown-none-eabi -mfpu=none" + }, + { + "variant": "armv4t", + "json": "armv4t.json", + "flags": "--target=armv4t-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti" + }, + { + "variant": "armv5te_exn_rtti", + "json": "armv5te_exn_rtti.json", + "flags": "--target=armv5e-unknown-none-eabi -mfpu=none" + }, + { + "variant": "armv5te", + "json": "armv5te.json", + "flags": "--target=armv5e-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti" + }, + { + "variant": "armv6m_soft_nofp_exn_rtti", + "json": "armv6m_soft_nofp_exn_rtti.json", + "flags": "--target=thumbv6m-unknown-none-eabi -mfpu=none" + }, + { + "variant": "armv6m_soft_nofp", + "json": "armv6m_soft_nofp.json", + "flags": "--target=thumbv6m-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7a_soft_nofp_exn_rtti", + "json": "armv7a_soft_nofp_exn_rtti.json", + "flags": "--target=armv7-unknown-none-eabi -mfpu=none" + }, + { + "variant": "armv7a_soft_nofp", + "json": "armv7a_soft_nofp.json", + "flags": "--target=armv7-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7a_hard_vfpv3_d16_exn_rtti", + "json": "armv7a_hard_vfpv3_d16_exn_rtti.json", + "flags": "--target=armv7-unknown-none-eabihf -mfpu=vfpv3-d16" + }, + { + "variant": "armv7a_hard_vfpv3_d16", + "json": "armv7a_hard_vfpv3_d16.json", + "flags": "--target=armv7-unknown-none-eabihf -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7a_soft_vfpv3_d16_exn_rtti", + "json": "armv7a_soft_vfpv3_d16_exn_rtti.json", + "flags": "--target=armv7-unknown-none-eabi -mfpu=vfpv3-d16" + }, + { + "variant": "armv7a_soft_vfpv3_d16", + "json": "armv7a_soft_vfpv3_d16.json", + "flags": "--target=armv7-unknown-none-eabi -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7r_soft_nofp_exn_rtti", + "json": "armv7r_soft_nofp_exn_rtti.json", + "flags": "--target=armv7r-unknown-none-eabi -mfpu=none" + }, + { + "variant": "armv7r_soft_nofp", + "json": "armv7r_soft_nofp.json", + "flags": "--target=armv7r-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7r_hard_vfpv3xd_exn_rtti", + "json": "armv7r_hard_vfpv3xd_exn_rtti.json", + "flags": "--target=armv7r-unknown-none-eabihf -mfpu=vfpv3xd" + }, + { + "variant": "armv7r_hard_vfpv3xd", + "json": "armv7r_hard_vfpv3xd.json", + "flags": "--target=armv7r-unknown-none-eabihf -mfpu=vfpv3xd -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7r_hard_vfpv3_d16_exn_rtti", + "json": "armv7r_hard_vfpv3_d16_exn_rtti.json", + "flags": "--target=armv7r-unknown-none-eabihf -mfpu=vfpv3-d16" + }, + { + "variant": "armv7r_hard_vfpv3_d16", + "json": "armv7r_hard_vfpv3_d16.json", + "flags": "--target=armv7r-unknown-none-eabihf -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7r_soft_vfpv3xd_exn_rtti", + "json": "armv7r_soft_vfpv3xd_exn_rtti.json", + "flags": "--target=armv7r-unknown-none-eabi -mfpu=vfpv3xd" + }, + { + "variant": "armv7r_soft_vfpv3xd", + "json": "armv7r_soft_vfpv3xd.json", + "flags": "--target=armv7r-unknown-none-eabi -mfpu=vfpv3xd -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7m_soft_fpv4_sp_d16_exn_rtti", + "json": "armv7m_soft_fpv4_sp_d16_exn_rtti.json", + "flags": "--target=thumbv7m-unknown-none-eabi -mfpu=fpv4-sp-d16" + }, + { + "variant": "armv7m_soft_fpv4_sp_d16", + "json": "armv7m_soft_fpv4_sp_d16.json", + "flags": "--target=thumbv7m-unknown-none-eabi -mfpu=fpv4-sp-d16 -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7m_hard_fpv4_sp_d16_exn_rtti", + "json": "armv7m_hard_fpv4_sp_d16_exn_rtti.json", + "flags": "--target=thumbv7m-unknown-none-eabihf -mfpu=fpv4-sp-d16" + }, + { + "variant": "armv7m_hard_fpv4_sp_d16", + "json": "armv7m_hard_fpv4_sp_d16.json", + "flags": "--target=thumbv7m-unknown-none-eabihf -mfpu=fpv4-sp-d16 -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7m_hard_fpv5_d16_exn_rtti", + "json": "armv7m_hard_fpv5_d16_exn_rtti.json", + "flags": "--target=thumbv7m-unknown-none-eabihf -mfpu=fpv5-d16" + }, + { + "variant": "armv7m_hard_fpv5_d16", + "json": "armv7m_hard_fpv5_d16.json", + "flags": "--target=thumbv7m-unknown-none-eabihf -mfpu=fpv5-d16 -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7m_soft_nofp_exn_rtti", + "json": "armv7m_soft_nofp_exn_rtti.json", + "flags": "--target=thumbv7m-unknown-none-eabi -mfpu=none" + }, + { + "variant": "armv7m_soft_nofp", + "json": "armv7m_soft_nofp.json", + "flags": "--target=thumbv7m-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti" + }, + { + "variant": "armv8m.main_soft_nofp_exn_rtti", + "json": "armv8m.main_soft_nofp_exn_rtti.json", + "flags": "--target=thumbv8m.main-unknown-none-eabi -mfpu=none" + }, + { + "variant": "armv8m.main_soft_nofp", + "json": "armv8m.main_soft_nofp.json", + "flags": "--target=thumbv8m.main-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti" + }, + { + "variant": "armv8m.main_hard_fp_exn_rtti", + "json": "armv8m.main_hard_fp_exn_rtti.json", + "flags": "--target=thumbv8m.main-unknown-none-eabihf -mfpu=fpv5-sp-d16" + }, + { + "variant": "armv8m.main_hard_fp", + "json": "armv8m.main_hard_fp.json", + "flags": "--target=thumbv8m.main-unknown-none-eabihf -mfpu=fpv5-sp-d16 -fno-exceptions -fno-rtti" + }, + { + "variant": "armv8.1m.main_soft_nofp_nomve_exn_rtti", + "json": "armv8.1m.main_soft_nofp_nomve_exn_rtti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabi -mfpu=none" + }, + { + "variant": "armv8.1m.main_soft_nofp_nomve", + "json": "armv8.1m.main_soft_nofp_nomve.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti" + }, + { + "variant": "armv8.1m.main_hard_fp_nomve_exn_rtti", + "json": "armv8.1m.main_hard_fp_nomve_exn_rtti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-sp-d16" + }, + { + "variant": "armv8.1m.main_hard_fp_nomve", + "json": "armv8.1m.main_hard_fp_nomve.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-sp-d16 -fno-exceptions -fno-rtti" + }, + { + "variant": "armv8.1m.main_hard_fpdp_nomve_exn_rtti", + "json": "armv8.1m.main_hard_fpdp_nomve_exn_rtti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-d16" + }, + { + "variant": "armv8.1m.main_hard_fpdp_nomve", + "json": "armv8.1m.main_hard_fpdp_nomve.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-d16 -fno-exceptions -fno-rtti" + }, + { + "variant": "armv8.1m.main_hard_nofp_mve_exn_rtti", + "json": "armv8.1m.main_hard_nofp_mve_exn_rtti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+mve -mfpu=none" + }, + { + "variant": "armv8.1m.main_hard_nofp_mve", + "json": "armv8.1m.main_hard_nofp_mve.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+mve -mfpu=none -fno-exceptions -fno-rtti" + }, + { + "variant": "armv8.1m.main_softfp_nomve", + "flags": "--target=thumbv8.1m.main-unknown-none-eabi -march=thumbv8.1m.main+mve", + "error": "No library available for MVE with soft-float ABI. Try -mfloat-abi=hard." + }, + { + "variant": "armv8.1m.main_soft_nofp_nomve_pacret_bti_exn_rtti", + "json": "armv8.1m.main_soft_nofp_nomve_pacret_bti_exn_rtti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabi -mfpu=none -mbranch-protection=pac-ret+bti" + }, + { + "variant": "armv8.1m.main_soft_nofp_nomve_pacret_bti", + "json": "armv8.1m.main_soft_nofp_nomve_pacret_bti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabi -mfpu=none -mbranch-protection=pac-ret+bti -fno-exceptions -fno-rtti" + }, + { + "variant": "armv8.1m.main_hard_fp_nomve_pacret_bti_exn_rtti", + "json": "armv8.1m.main_hard_fp_nomve_pacret_bti_exn_rtti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-sp-d16 -mbranch-protection=pac-ret+bti" + }, + { + "variant": "armv8.1m.main_hard_fp_nomve_pacret_bti", + "json": "armv8.1m.main_hard_fp_nomve_pacret_bti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-sp-d16 -mbranch-protection=pac-ret+bti -fno-exceptions -fno-rtti" + }, + { + "variant": "armv8.1m.main_hard_fpdp_nomve_pacret_bti_exn_rtti", + "json": "armv8.1m.main_hard_fpdp_nomve_pacret_bti_exn_rtti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-d16 -mbranch-protection=pac-ret+bti" + }, + { + "variant": "armv8.1m.main_hard_fpdp_nomve_pacret_bti", + "json": "armv8.1m.main_hard_fpdp_nomve_pacret_bti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-d16 -mbranch-protection=pac-ret+bti -fno-exceptions -fno-rtti" + }, + { + "variant": "armv8.1m.main_hard_nofp_mve_pacret_bti_exn_rtti", + "json": "armv8.1m.main_hard_nofp_mve_pacret_bti_exn_rtti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+mve -mfpu=none -mbranch-protection=pac-ret+bti" + }, + { + "variant": "armv8.1m.main_hard_nofp_mve_pacret_bti", + "json": "armv8.1m.main_hard_nofp_mve_pacret_bti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+mve -mfpu=none -mbranch-protection=pac-ret+bti -fno-exceptions -fno-rtti" + } + ] +} \ No newline at end of file diff --git a/arm-multilib/json/variants/aarch64a.json b/arm-multilib/json/variants/aarch64a.json new file mode 100644 index 0000000..0ab6219 --- /dev/null +++ b/arm-multilib/json/variants/aarch64a.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "aarch64a", + "VARIANT": "aarch64a", + "COMPILE_FLAGS": "-march=armv8-a", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "virt", + "QEMU_CPU": "cortex-a57", + "BOOT_FLASH_ADDRESS": "0x40000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x40001000", + "FLASH_SIZE": "0xfff000", + "RAM_ADDRESS": "0x41000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "8K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/aarch64a_exn_rtti.json b/arm-multilib/json/variants/aarch64a_exn_rtti.json new file mode 100644 index 0000000..c94e97c --- /dev/null +++ b/arm-multilib/json/variants/aarch64a_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "aarch64a", + "VARIANT": "aarch64a_exn_rtti", + "COMPILE_FLAGS": "-march=armv8-a", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "virt", + "QEMU_CPU": "cortex-a57", + "BOOT_FLASH_ADDRESS": "0x40000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x40001000", + "FLASH_SIZE": "0xfff000", + "RAM_ADDRESS": "0x41000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "8K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv4t.json b/arm-multilib/json/variants/armv4t.json new file mode 100644 index 0000000..63a0786 --- /dev/null +++ b/arm-multilib/json/variants/armv4t.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv4t", + "VARIANT": "armv4t", + "COMPILE_FLAGS": "-march=armv4t -mfpu=none", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "ti925t", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv4t_exn_rtti.json b/arm-multilib/json/variants/armv4t_exn_rtti.json new file mode 100644 index 0000000..a337803 --- /dev/null +++ b/arm-multilib/json/variants/armv4t_exn_rtti.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv4t", + "VARIANT": "armv4t_exn_rtti", + "COMPILE_FLAGS": "-march=armv4t -mfpu=none", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "ti925t", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv5te.json b/arm-multilib/json/variants/armv5te.json new file mode 100644 index 0000000..76f67f3 --- /dev/null +++ b/arm-multilib/json/variants/armv5te.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv5te", + "VARIANT": "armv5te", + "COMPILE_FLAGS": "-march=armv5te -mfpu=none", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "arm926", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv5te_exn_rtti.json b/arm-multilib/json/variants/armv5te_exn_rtti.json new file mode 100644 index 0000000..1585384 --- /dev/null +++ b/arm-multilib/json/variants/armv5te_exn_rtti.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv5te", + "VARIANT": "armv5te_exn_rtti", + "COMPILE_FLAGS": "-march=armv5te -mfpu=none", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "arm926", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv6m_soft_nofp.json b/arm-multilib/json/variants/armv6m_soft_nofp.json new file mode 100644 index 0000000..f1548a5 --- /dev/null +++ b/arm-multilib/json/variants/armv6m_soft_nofp.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv6m", + "VARIANT": "armv6m_soft_nofp", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv6m -mfpu=none", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an385", + "QEMU_CPU": "cortex-m3", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv6m_soft_nofp_exn_rtti.json b/arm-multilib/json/variants/armv6m_soft_nofp_exn_rtti.json new file mode 100644 index 0000000..0821eb1 --- /dev/null +++ b/arm-multilib/json/variants/armv6m_soft_nofp_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv6m", + "VARIANT": "armv6m_soft_nofp_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv6m -mfpu=none", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an385", + "QEMU_CPU": "cortex-m3", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7a_hard_vfpv3_d16.json b/arm-multilib/json/variants/armv7a_hard_vfpv3_d16.json new file mode 100644 index 0000000..0edc2b0 --- /dev/null +++ b/arm-multilib/json/variants/armv7a_hard_vfpv3_d16.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7a", + "VARIANT": "armv7a_hard_vfpv3_d16", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7a -mfpu=vfpv3-d16", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-a8", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7a_hard_vfpv3_d16_exn_rtti.json b/arm-multilib/json/variants/armv7a_hard_vfpv3_d16_exn_rtti.json new file mode 100644 index 0000000..f056361 --- /dev/null +++ b/arm-multilib/json/variants/armv7a_hard_vfpv3_d16_exn_rtti.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7a", + "VARIANT": "armv7a_hard_vfpv3_d16_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7a -mfpu=vfpv3-d16", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-a8", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7a_soft_nofp.json b/arm-multilib/json/variants/armv7a_soft_nofp.json new file mode 100644 index 0000000..3104e28 --- /dev/null +++ b/arm-multilib/json/variants/armv7a_soft_nofp.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7a", + "VARIANT": "armv7a_soft_nofp", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv7a -mfpu=none", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-a7", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7a_soft_nofp_exn_rtti.json b/arm-multilib/json/variants/armv7a_soft_nofp_exn_rtti.json new file mode 100644 index 0000000..8373df8 --- /dev/null +++ b/arm-multilib/json/variants/armv7a_soft_nofp_exn_rtti.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7a", + "VARIANT": "armv7a_soft_nofp_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv7a -mfpu=none", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-a7", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7a_soft_vfpv3_d16.json b/arm-multilib/json/variants/armv7a_soft_vfpv3_d16.json new file mode 100644 index 0000000..734945b --- /dev/null +++ b/arm-multilib/json/variants/armv7a_soft_vfpv3_d16.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7a", + "VARIANT": "armv7a_soft_vfpv3_d16", + "COMPILE_FLAGS": "-mfloat-abi=softfp -march=armv7a -mfpu=vfpv3-d16", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-a8", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7a_soft_vfpv3_d16_exn_rtti.json b/arm-multilib/json/variants/armv7a_soft_vfpv3_d16_exn_rtti.json new file mode 100644 index 0000000..471f934 --- /dev/null +++ b/arm-multilib/json/variants/armv7a_soft_vfpv3_d16_exn_rtti.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7a", + "VARIANT": "armv7a_soft_vfpv3_d16_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=softfp -march=armv7a -mfpu=vfpv3-d16", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-a8", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_hard_fpv4_sp_d16.json b/arm-multilib/json/variants/armv7m_hard_fpv4_sp_d16.json new file mode 100644 index 0000000..443d337 --- /dev/null +++ b/arm-multilib/json/variants/armv7m_hard_fpv4_sp_d16.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_hard_fpv4_sp_d16", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7m -mfpu=fpv4-sp-d16", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an386", + "QEMU_CPU": "cortex-m4", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_hard_fpv4_sp_d16_exn_rtti.json b/arm-multilib/json/variants/armv7m_hard_fpv4_sp_d16_exn_rtti.json new file mode 100644 index 0000000..8c0d32f --- /dev/null +++ b/arm-multilib/json/variants/armv7m_hard_fpv4_sp_d16_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_hard_fpv4_sp_d16_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7m -mfpu=fpv4-sp-d16", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an386", + "QEMU_CPU": "cortex-m4", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_hard_fpv5_d16.json b/arm-multilib/json/variants/armv7m_hard_fpv5_d16.json new file mode 100644 index 0000000..a2b708e --- /dev/null +++ b/arm-multilib/json/variants/armv7m_hard_fpv5_d16.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_hard_fpv5_d16", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7m -mfpu=fpv5-d16", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an500", + "QEMU_CPU": "cortex-m7", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x60600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_hard_fpv5_d16_exn_rtti.json b/arm-multilib/json/variants/armv7m_hard_fpv5_d16_exn_rtti.json new file mode 100644 index 0000000..81c246e --- /dev/null +++ b/arm-multilib/json/variants/armv7m_hard_fpv5_d16_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_hard_fpv5_d16_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7m -mfpu=fpv5-d16", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an500", + "QEMU_CPU": "cortex-m7", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x60600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_soft_fpv4_sp_d16.json b/arm-multilib/json/variants/armv7m_soft_fpv4_sp_d16.json new file mode 100644 index 0000000..014a5c3 --- /dev/null +++ b/arm-multilib/json/variants/armv7m_soft_fpv4_sp_d16.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_soft_fpv4_sp_d16", + "COMPILE_FLAGS": "-mfloat-abi=softfp -march=armv7m -mfpu=fpv4-sp-d16", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an386", + "QEMU_CPU": "cortex-m4", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_soft_fpv4_sp_d16_exn_rtti.json b/arm-multilib/json/variants/armv7m_soft_fpv4_sp_d16_exn_rtti.json new file mode 100644 index 0000000..a28dece --- /dev/null +++ b/arm-multilib/json/variants/armv7m_soft_fpv4_sp_d16_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_soft_fpv4_sp_d16_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=softfp -march=armv7m -mfpu=fpv4-sp-d16", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an386", + "QEMU_CPU": "cortex-m4", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_soft_nofp.json b/arm-multilib/json/variants/armv7m_soft_nofp.json new file mode 100644 index 0000000..0d2033a --- /dev/null +++ b/arm-multilib/json/variants/armv7m_soft_nofp.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_soft_nofp", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv7m -mfpu=none", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an386", + "QEMU_CPU": "cortex-m4", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_soft_nofp_exn_rtti.json b/arm-multilib/json/variants/armv7m_soft_nofp_exn_rtti.json new file mode 100644 index 0000000..f024ba5 --- /dev/null +++ b/arm-multilib/json/variants/armv7m_soft_nofp_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_soft_nofp_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv7m -mfpu=none", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an386", + "QEMU_CPU": "cortex-m4", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7r_hard_vfpv3_d16.json b/arm-multilib/json/variants/armv7r_hard_vfpv3_d16.json new file mode 100644 index 0000000..a3d4fc7 --- /dev/null +++ b/arm-multilib/json/variants/armv7r_hard_vfpv3_d16.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_hard_vfpv3_d16", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7r -mfpu=vfpv3-d16", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7r_hard_vfpv3_d16_exn_rtti.json b/arm-multilib/json/variants/armv7r_hard_vfpv3_d16_exn_rtti.json new file mode 100644 index 0000000..148424b --- /dev/null +++ b/arm-multilib/json/variants/armv7r_hard_vfpv3_d16_exn_rtti.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_hard_vfpv3_d16_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7r -mfpu=vfpv3-d16", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7r_hard_vfpv3xd.json b/arm-multilib/json/variants/armv7r_hard_vfpv3xd.json new file mode 100644 index 0000000..3eeb40e --- /dev/null +++ b/arm-multilib/json/variants/armv7r_hard_vfpv3xd.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_hard_vfpv3xd", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7r -mfpu=vfpv3xd", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7r_hard_vfpv3xd_exn_rtti.json b/arm-multilib/json/variants/armv7r_hard_vfpv3xd_exn_rtti.json new file mode 100644 index 0000000..6b06f62 --- /dev/null +++ b/arm-multilib/json/variants/armv7r_hard_vfpv3xd_exn_rtti.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_hard_vfpv3xd_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7r -mfpu=vfpv3xd", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7r_soft_nofp.json b/arm-multilib/json/variants/armv7r_soft_nofp.json new file mode 100644 index 0000000..b641d7b --- /dev/null +++ b/arm-multilib/json/variants/armv7r_soft_nofp.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_soft_nofp", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv7r -mfpu=none", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7r_soft_nofp_exn_rtti.json b/arm-multilib/json/variants/armv7r_soft_nofp_exn_rtti.json new file mode 100644 index 0000000..af4c221 --- /dev/null +++ b/arm-multilib/json/variants/armv7r_soft_nofp_exn_rtti.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_soft_nofp_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv7r -mfpu=none", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7r_soft_vfpv3xd.json b/arm-multilib/json/variants/armv7r_soft_vfpv3xd.json new file mode 100644 index 0000000..6940c0d --- /dev/null +++ b/arm-multilib/json/variants/armv7r_soft_vfpv3xd.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_soft_vfpv3xd", + "COMPILE_FLAGS": "-mfloat-abi=softfp -march=armv7r -mfpu=vfpv3xd", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7r_soft_vfpv3xd_exn_rtti.json b/arm-multilib/json/variants/armv7r_soft_vfpv3xd_exn_rtti.json new file mode 100644 index 0000000..cbdf392 --- /dev/null +++ b/arm-multilib/json/variants/armv7r_soft_vfpv3xd_exn_rtti.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_soft_vfpv3xd_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=softfp -march=armv7r -mfpu=vfpv3xd", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve.json b/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve.json new file mode 100644 index 0000000..ddbe52d --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_fp_nomve", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+nomve -mfpu=fp-armv8-fullfp16-sp-d16", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps3-an547", + "QEMU_CPU": "cortex-m55", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "512K", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_exn_rtti.json b/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_exn_rtti.json new file mode 100644 index 0000000..6d02e76 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_fp_nomve_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+nomve -mfpu=fp-armv8-fullfp16-sp-d16", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps3-an547", + "QEMU_CPU": "cortex-m55", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "512K", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti.json b/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti.json new file mode 100644 index 0000000..38310c4 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_fp_nomve_pacret_bti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+nomve+pacbti -mfpu=fp-armv8-fullfp16-sp-d16 -mbranch-protection=pac-ret+bti", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "corstone-310", + "FVP_CONFIG": "cortex-m85 m-pacbti m-fp mve-none", + "BOOT_FLASH_ADDRESS": "0x01000000", + "BOOT_FLASH_SIZE": "2M", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti_exn_rtti.json b/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti_exn_rtti.json new file mode 100644 index 0000000..c0f3677 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_fp_nomve_pacret_bti_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+nomve+pacbti -mfpu=fp-armv8-fullfp16-sp-d16 -mbranch-protection=pac-ret+bti", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "corstone-310", + "FVP_CONFIG": "cortex-m85 m-pacbti m-fp mve-none", + "BOOT_FLASH_ADDRESS": "0x01000000", + "BOOT_FLASH_SIZE": "2M", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve.json b/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve.json new file mode 100644 index 0000000..fb28a2a --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_fpdp_nomve", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+nomve -mfpu=fp-armv8-fullfp16-d16", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps3-an547", + "QEMU_CPU": "cortex-m55", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "512K", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_exn_rtti.json b/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_exn_rtti.json new file mode 100644 index 0000000..b81fd00 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_fpdp_nomve_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+nomve -mfpu=fp-armv8-fullfp16-d16", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps3-an547", + "QEMU_CPU": "cortex-m55", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "512K", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti.json b/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti.json new file mode 100644 index 0000000..d51f220 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_fpdp_nomve_pacret_bti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+nomve+pacbti -mfpu=fp-armv8-fullfp16-d16 -mbranch-protection=pac-ret+bti", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "corstone-310", + "FVP_CONFIG": "cortex-m85 m-pacbti m-fp mve-none", + "BOOT_FLASH_ADDRESS": "0x01000000", + "BOOT_FLASH_SIZE": "2M", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti_exn_rtti.json b/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti_exn_rtti.json new file mode 100644 index 0000000..0b221cd --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_fpdp_nomve_pacret_bti_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+nomve+pacbti -mfpu=fp-armv8-fullfp16-d16 -mbranch-protection=pac-ret+bti", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "corstone-310", + "FVP_CONFIG": "cortex-m85 m-pacbti m-fp mve-none", + "BOOT_FLASH_ADDRESS": "0x01000000", + "BOOT_FLASH_SIZE": "2M", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve.json b/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve.json new file mode 100644 index 0000000..0313325 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_nofp_mve", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+mve -mfpu=none", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps3-an547", + "QEMU_CPU": "cortex-m55", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "512K", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_exn_rtti.json b/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_exn_rtti.json new file mode 100644 index 0000000..f4c7df9 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_nofp_mve_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+mve -mfpu=none", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps3-an547", + "QEMU_CPU": "cortex-m55", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "512K", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti.json b/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti.json new file mode 100644 index 0000000..58c219b --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_nofp_mve_pacret_bti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+mve+pacbti -mfpu=none -mbranch-protection=pac-ret+bti", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "corstone-310", + "FVP_CONFIG": "cortex-m85 m-pacbti m-nofp mve-int", + "BOOT_FLASH_ADDRESS": "0x01000000", + "BOOT_FLASH_SIZE": "2M", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti_exn_rtti.json b/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti_exn_rtti.json new file mode 100644 index 0000000..34ea6ac --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_nofp_mve_pacret_bti_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+mve+pacbti -mfpu=none -mbranch-protection=pac-ret+bti", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "corstone-310", + "FVP_CONFIG": "cortex-m85 m-pacbti m-nofp mve-int", + "BOOT_FLASH_ADDRESS": "0x01000000", + "BOOT_FLASH_SIZE": "2M", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve.json b/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve.json new file mode 100644 index 0000000..b9a7b0a --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_soft_nofp_nomve", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv8.1m.main+nomve -mfpu=none", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps3-an547", + "QEMU_CPU": "cortex-m55", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "512K", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_exn_rtti.json b/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_exn_rtti.json new file mode 100644 index 0000000..0b89818 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_soft_nofp_nomve_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv8.1m.main+nomve -mfpu=none", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps3-an547", + "QEMU_CPU": "cortex-m55", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "512K", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti.json b/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti.json new file mode 100644 index 0000000..599df22 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_soft_nofp_nomve_pacret_bti", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv8.1m.main+nomve+pacbti -mfpu=none -mbranch-protection=pac-ret+bti", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "corstone-310", + "FVP_CONFIG": "cortex-m85 m-pacbti m-nofp mve-none", + "BOOT_FLASH_ADDRESS": "0x01000000", + "BOOT_FLASH_SIZE": "2M", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti_exn_rtti.json b/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti_exn_rtti.json new file mode 100644 index 0000000..e7bddab --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_soft_nofp_nomve_pacret_bti_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv8.1m.main+nomve+pacbti -mfpu=none -mbranch-protection=pac-ret+bti", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "corstone-310", + "FVP_CONFIG": "cortex-m85 m-pacbti m-nofp mve-none", + "BOOT_FLASH_ADDRESS": "0x01000000", + "BOOT_FLASH_SIZE": "2M", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8m.main_hard_fp.json b/arm-multilib/json/variants/armv8m.main_hard_fp.json new file mode 100644 index 0000000..53f90ba --- /dev/null +++ b/arm-multilib/json/variants/armv8m.main_hard_fp.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8m.main", + "VARIANT": "armv8m.main_hard_fp", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8m.main -mfpu=fpv5-sp-d16", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an505", + "QEMU_CPU": "cortex-m33", + "BOOT_FLASH_ADDRESS": "0x10000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x80000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x80600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8m.main_hard_fp_exn_rtti.json b/arm-multilib/json/variants/armv8m.main_hard_fp_exn_rtti.json new file mode 100644 index 0000000..da48ef1 --- /dev/null +++ b/arm-multilib/json/variants/armv8m.main_hard_fp_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8m.main", + "VARIANT": "armv8m.main_hard_fp_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8m.main -mfpu=fpv5-sp-d16", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an505", + "QEMU_CPU": "cortex-m33", + "BOOT_FLASH_ADDRESS": "0x10000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x80000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x80600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8m.main_soft_nofp.json b/arm-multilib/json/variants/armv8m.main_soft_nofp.json new file mode 100644 index 0000000..28f2572 --- /dev/null +++ b/arm-multilib/json/variants/armv8m.main_soft_nofp.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8m.main", + "VARIANT": "armv8m.main_soft_nofp", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv8m.main -mfpu=none", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an505", + "QEMU_CPU": "cortex-m33", + "BOOT_FLASH_ADDRESS": "0x10000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x80000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x80600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8m.main_soft_nofp_exn_rtti.json b/arm-multilib/json/variants/armv8m.main_soft_nofp_exn_rtti.json new file mode 100644 index 0000000..66b6970 --- /dev/null +++ b/arm-multilib/json/variants/armv8m.main_soft_nofp_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8m.main", + "VARIANT": "armv8m.main_soft_nofp_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv8m.main -mfpu=none", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an505", + "QEMU_CPU": "cortex-m33", + "BOOT_FLASH_ADDRESS": "0x10000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x80000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x80600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/multilib-generate.py b/arm-multilib/multilib-generate.py similarity index 97% rename from multilib-generate.py rename to arm-multilib/multilib-generate.py index e0e0570..c7ea84c 100755 --- a/multilib-generate.py +++ b/arm-multilib/multilib-generate.py @@ -238,7 +238,11 @@ def get_extension_list(clang, triple): def generate_extensions(args): aarch64_features = get_extension_list(args.clang, "aarch64-none-eabi") aarch32_features = get_extension_list(args.clang, "arm-none-eabi") - all_features = set(aarch64_features) | set(aarch32_features) + all_features = list(aarch64_features) + # Combine the aarch64 and aarch32 lists without duplication. + # Casting to sets and merging would be simpler, but creates + # non-deterministic output. + all_features.extend(feat for feat in list(aarch32_features) if feat not in all_features) print("# Expand -march=...+[no]feature... into individual options we can match") print("# on. We use 'armvX' to represent a feature applied to any architecture, so") diff --git a/cmake/multilib.yaml.in b/arm-multilib/multilib.yaml.in similarity index 100% rename from cmake/multilib.yaml.in rename to arm-multilib/multilib.yaml.in diff --git a/arm-runtimes/CMakeLists.txt b/arm-runtimes/CMakeLists.txt new file mode 100644 index 0000000..1d7e98a --- /dev/null +++ b/arm-runtimes/CMakeLists.txt @@ -0,0 +1,800 @@ +# +# Copyright (c) 2024, Arm Limited and affiliates. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# CMake build for a library variant, combining a chosen C library +# with builtins from compiler-rt and libcx/libcxxabi/libunwind + +cmake_minimum_required(VERSION 3.20) + +project(arm-runtimes) + +# Root directory of the repo. +set(TOOLCHAIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..) + +# CMake arguments are loaded from the JSON file depending on which C +# library is used, so this must be set before the JSON is processed. +set(C_LIBRARY "picolibc" CACHE STRING "Which C library to use.") +set_property(CACHE C_LIBRARY PROPERTY STRINGS picolibc newlib llvmlibc) + +set(VARIANT_JSON "" CACHE STRING "JSON file to load args from.") +if(VARIANT_JSON) + file(READ ${VARIANT_JSON} variant_json_read) + # Load arguments common to all libraries. + string(JSON json_args GET ${variant_json_read} "args" "common") + string(JSON json_args_len LENGTH ${json_args}) + math(EXPR json_args_len_dec "${json_args_len} - 1") + foreach(json_idx RANGE ${json_args_len_dec}) + string(JSON json_param MEMBER ${json_args} ${json_idx}) + string(JSON json_val GET ${json_args} ${json_param}) + string(JSON json_val_type TYPE ${json_args} ${json_param}) + set(${json_param}_def ${json_val}) + endforeach() + # Load arguments specific to the chosen library, overwriting any existing values. + string(JSON json_args GET ${variant_json_read} "args" ${C_LIBRARY}) + string(JSON json_args_len LENGTH ${json_args}) + math(EXPR json_args_len_dec "${json_args_len} - 1") + foreach(json_idx RANGE ${json_args_len_dec}) + string(JSON json_param MEMBER ${json_args} ${json_idx}) + string(JSON json_val GET ${json_args} ${json_param}) + string(JSON json_val_type TYPE ${json_args} ${json_param}) + set(${json_param}_def ${json_val}) + endforeach() +endif() + +# Default values will be populated by the json above. +# Any user specified options will override the default. +set(TARGET_ARCH ${TARGET_ARCH_def} CACHE STRING "Architecture being targetted.") +set(VARIANT ${VARIANT_def} CACHE STRING "Name for the variant, usually architecture + suffix.") +set(COMPILE_FLAGS ${COMPILE_FLAGS_def} CACHE STRING "Flags required to build the variant.") +set(TEST_EXECUTOR ${TEST_EXECUTOR_def} CACHE STRING "Program used to run tests.") +set_property(CACHE TEST_EXECUTOR PROPERTY STRINGS fvp qemu) +set(FVP_MODEL ${FVP_MODEL_def} CACHE STRING "FVP model to use, if FVP is the test executor.") +set(FVP_CONFIG ${FVP_CONFIG_def} CACHE STRING "FVP config to use, if FVP is the test executor.") +set( + FVP_INSTALL_DIR + "" CACHE STRING + "The directory in which the FVP models are installed. These are not + included in this repository, but can be downloaded by the script + fvp/get_fvps.sh" +) +set(FVP_CONFIG_DIR "${TOOLCHAIN_SOURCE_DIR}/fvp/config" CACHE STRING "The directory in which the FVP models are installed.") + +set(QEMU_MACHINE ${QEMU_MACHINE_def} CACHE STRING "Machine for QEMU to emulate.") +set(QEMU_CPU ${QEMU_CPU_def} CACHE STRING "CPU for QEMU to emulate.") +set(QEMU_PARAMS ${QEMU_PARAMS_def} CACHE STRING "Any additional parameters to pass to QEMU.") + +set(BOOT_FLASH_ADDRESS ${BOOT_FLASH_ADDRESS_def} CACHE STRING "") +set(BOOT_FLASH_SIZE ${BOOT_FLASH_SIZE_def} CACHE STRING "") +set(FLASH_ADDRESS ${FLASH_ADDRESS_def} CACHE STRING "") +set(FLASH_SIZE ${FLASH_SIZE_def} CACHE STRING "") +set(RAM_ADDRESS ${RAM_ADDRESS_def} CACHE STRING "") +set(RAM_SIZE ${RAM_SIZE_def} CACHE STRING "") +set(STACK_SIZE ${STACK_SIZE_def} CACHE STRING "") + +set(ENABLE_EXCEPTIONS ${ENABLE_EXCEPTIONS_def} CACHE BOOL "Enable C++ exceptions.") +set(ENABLE_RTTI ${ENABLE_RTTI_def} CACHE BOOL "Enable C++ exceptions.") + +set(PICOLIBC_BUILD_TYPE ${PICOLIBC_BUILD_TYPE_def} CACHE STRING "Picolibc configuration to use.") +set_property(CACHE PICOLIBC_BUILD_TYPE PROPERTY STRINGS minsize release) + +set(ENABLE_CXX_LIBS ${ENABLE_CXX_LIBS_def} CACHE BOOL "Build CXX libs") +set(ENABLE_LIBC_TESTS ${ENABLE_LIBC_TESTS_def} CACHE BOOL "Enable libc tests (picolibc, newlib or llvm-libc).") +set(ENABLE_COMPILER_RT_TESTS ${ENABLE_COMPILER_RT_TESTS_def} CACHE BOOL "Enable compiler-rt tests.") +set(ENABLE_LIBCXX_TESTS ${ENABLE_LIBCXX_TESTS_def} CACHE BOOL "Enable libcxx tests.") +set(LLVM_BINARY_DIR "" CACHE PATH "Path to LLVM toolchain root to build libraries with") +set(LIBC_HDRGEN "" CACHE PATH "Path to prebuilt lbc-hdrgen if not included in LLVM binaries set by LLVM_BINARY_DIR") + +# Temporary location to collect the libraries as they are built. +set(TEMP_LIB_DIR "${CMAKE_CURRENT_BINARY_DIR}/tmp_install") + +include(ExternalProject) +include(${TOOLCHAIN_SOURCE_DIR}/cmake/fetch_llvm.cmake) + +find_package(Python3 REQUIRED COMPONENTS Interpreter) + +# If a compiler launcher such as ccache has been set, it should be +# passed down to each subproject build. +set(compiler_launcher_cmake_args "") +if(CMAKE_C_COMPILER_LAUNCHER) + list(APPEND compiler_launcher_cmake_args "-DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER}") +endif() +if(CMAKE_CXX_COMPILER_LAUNCHER) + list(APPEND compiler_launcher_cmake_args "-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}") +endif() + +if(TARGET_ARCH MATCHES "^aarch64") + set(target_triple "aarch64-none-elf") + set(cpu_family aarch64) +else() + # Choose the target triple so that compiler-rt will do the + # right thing. We can't always put the exact target + # architecture in the triple, because compiler-rt's cmake + # system doesn't recognize every possible Arm architecture + # version. So mostly we just say 'arm' and control the arch + # version via -march=armv7m (or whatever). + # Exceptions are architectures pre-armv7, which compiler-rt expects to + # see in the triple because that's where it looks to decide whether to + # use specific assembly sources. + if(TARGET_ARCH MATCHES "^armv[4-6]") + set(target_triple "${TARGET_ARCH}-none-eabi") + else() + set(target_triple "arm-none-eabi") + endif() + if(COMPILE_FLAGS MATCHES "-mfloat-abi=hard") + # Also, compiler-rt looks in the ABI component of the + # triple to decide whether to use the hard float ABI. + set(target_triple "${target_triple}hf") + endif() + set(cpu_family arm) +endif() + +# Create a single target for all testing. If no testing is enabled, this +# will simply do nothing. +add_custom_target(check-all) + +# If any testing is enabled, prepare test executor settings. +if(ENABLE_LIBC_TESTS OR ENABLE_COMPILER_RT_TESTS OR ENABLE_LIBCXX_TESTS) + # Flags required to link tests. + if(C_LIBRARY STREQUAL picolibc) + set(test_link_flags "-nostartfiles -lcrt0-semihost -lsemihost -T picolibcpp.ld") + else() + message(FATAL_ERROR "Tests can only be enabled using picolibc.") + endif() + + if(TEST_EXECUTOR STREQUAL qemu) + if(TARGET_ARCH MATCHES "^aarch64") + find_program(QEMU_EXECUTABLE qemu-system-aarch64) + else() + find_program(QEMU_EXECUTABLE qemu-system-arm) + endif() + + # Use colon as a separator because comma and semicolon are used for + # other purposes in CMake. + string(REPLACE " " ":" qemu_params_list "${QEMU_PARAMS}") + + set(test_executor_params --qemu-command ${QEMU_EXECUTABLE} --qemu-machine ${QEMU_MACHINE}) + if(QEMU_CPU) + list(APPEND test_executor_params --qemu-cpu ${QEMU_CPU}) + endif() + if(qemu_params_list) + list(APPEND test_executor_params "--qemu-params=${qemu_params_list}") + endif() + set( + lit_test_executor + ${CMAKE_CURRENT_SOURCE_DIR}/test-support/lit-exec-qemu.py + ${test_executor_params} + ) + elseif(TEST_EXECUTOR STREQUAL fvp) + if(NOT EXISTS "${FVP_INSTALL_DIR}") + message(FATAL_ERROR "FVPs must be installed to run tests using FVPs.") + endif() + set( + test_executor_params + --fvp-install-dir ${FVP_INSTALL_DIR} + --fvp-config-dir ${FVP_CONFIG_DIR} + --fvp-model ${FVP_MODEL} + ) + string(REPLACE " " ";" fvp_config_list ${FVP_CONFIG}) + foreach(cfg ${fvp_config_list}) + set( + test_executor_params + ${test_executor_params} + --fvp-config ${cfg} + ) + endforeach() + set( + lit_test_executor + ${CMAKE_CURRENT_SOURCE_DIR}/test-support/lit-exec-fvp.py + ${test_executor_params} + ) + endif() + list(JOIN lit_test_executor " " lit_test_executor) +endif() + +set(compile_arch_flags "--target=${target_triple} ${COMPILE_FLAGS}") +# Compiling the libraries benefits from some extra optimization +# flags, and requires a sysroot. +set(lib_compile_flags "${compile_arch_flags} -ffunction-sections -fdata-sections -fno-ident --sysroot ${TEMP_LIB_DIR}") + +# Declare this target now, since compiler-rt requires the dependency. +add_custom_target(clib-install) + +############################################################################### +# compiler-rt +############################################################################### + +# We can't always put the exact target +# architecture in the triple, because compiler-rt's cmake +# system doesn't recognize every possible Arm architecture +# version. So mostly we just say 'arm' and control the arch +# version via -march=armv7m (or whatever). +# Exceptions are architectures pre-armv7, which compiler-rt expects to +# see in the triple because that's where it looks to decide whether to +# use specific assembly sources. +if(NOT target_triple MATCHES "^(aarch64-none-elf|arm-none-eabi|armv[4-6])") + message(FATAL_ERROR "\ +Target triple name \"${target_triple}\" not compatible with compiler-rt. +Use -march to specify the architecture.") +endif() +# Also, compiler-rt looks in the ABI component of the +# triple to decide whether to use the hard float ABI. +if(flags MATCHES "-mfloat-abi=hard" AND NOT target_triple MATCHES "-eabihf$") + message(FATAL_ERROR "\ +Hard-float library with target triple \"${target_triple}\" must end \"-eabihf\"") +endif() +string(REPLACE "-none-" "-unknown-none-" normalized_target_triple ${target_triple}) + +# This prevents a test failure due to insufficient available registers. +# TODO: Which test, can this be fixed upstream? +if(VARIANT STREQUAL "armv6m_soft_nofp") + set(compiler_rt_test_flags "${compiler_rt_test_flags} -fomit-frame-pointer") +endif() + +if(ENABLE_COMPILER_RT_TESTS) + set(compiler_rt_test_flags "${lib_compile_flags} ${test_link_flags}") + set(compiler_rt_lit_args "${LLVM_LIT_ARGS} --xunit-xml-output=results.junit.xml") + set( + compiler_rt_test_cmake_args + -DCOMPILER_RT_INCLUDE_TESTS=ON + -DCOMPILER_RT_EMULATOR=${lit_test_executor} + -DCOMPILER_RT_TEST_COMPILER=${LLVM_BINARY_DIR}/bin/clang + -DCOMPILER_RT_TEST_COMPILER_CFLAGS=${compiler_rt_test_flags} + -DLLVM_LIT_ARGS=${compiler_rt_lit_args} + ) +endif() + +ExternalProject_Add( + compiler_rt + SOURCE_DIR ${llvmproject_SOURCE_DIR}/compiler-rt + INSTALL_DIR compiler-rt/install + CMAKE_ARGS + ${compiler_launcher_cmake_args} + -DCMAKE_AR=${LLVM_BINARY_DIR}/bin/llvm-ar${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_ASM_COMPILER_TARGET=${target_triple} + -DCMAKE_ASM_FLAGS=${lib_compile_flags} + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_CXX_COMPILER=${LLVM_BINARY_DIR}/bin/clang++${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_CXX_COMPILER_TARGET=${target_triple} + -DCMAKE_CXX_FLAGS=${lib_compile_flags} + -DCMAKE_C_COMPILER=${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_C_COMPILER_TARGET=${target_triple} + -DCMAKE_C_FLAGS=${lib_compile_flags} + -DCMAKE_INSTALL_MESSAGE=${CMAKE_INSTALL_MESSAGE} + -DCMAKE_INSTALL_PREFIX= + -DCMAKE_NM=${LLVM_BINARY_DIR}/bin/llvm-nm${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_RANLIB=${LLVM_BINARY_DIR}/bin/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_SYSTEM_NAME=Generic + -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY + -DCOMPILER_RT_BAREMETAL_BUILD=ON + -DCOMPILER_RT_BUILD_LIBFUZZER=OFF + -DCOMPILER_RT_BUILD_PROFILE=OFF + -DCOMPILER_RT_BUILD_SANITIZERS=OFF + -DCOMPILER_RT_BUILD_XRAY=OFF + -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON + -DLLVM_CMAKE_DIR=${LLVM_BINARY_DIR} + -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON + ${compiler_rt_test_cmake_args} + STEP_TARGETS build install + USES_TERMINAL_CONFIGURE FALSE + USES_TERMINAL_BUILD TRUE + USES_TERMINAL_INSTALL TRUE + LIST_SEPARATOR , + CONFIGURE_HANDLED_BY_BUILD TRUE + INSTALL_COMMAND ${CMAKE_COMMAND} --install . + # Copy compiler-rt lib directory, moving libraries out of their + # target-specific subdirectory. + COMMAND + ${CMAKE_COMMAND} + -E copy_directory + /lib/${normalized_target_triple} + "${TEMP_LIB_DIR}/lib" +) + +add_custom_target(check-compiler-rt) +add_dependencies(check-all check-compiler-rt) +if(ENABLE_COMPILER_RT_TESTS) + ExternalProject_Add_Step( + compiler_rt + check-compiler-rt + COMMAND "${CMAKE_COMMAND}" --build --target check-compiler-rt + COMMAND ${Python3_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR}/test-support/modify-compiler-rt-xml.py + --compiler-rt-build-dir + --variant ${VARIANT} + USES_TERMINAL TRUE + EXCLUDE_FROM_MAIN TRUE + ALWAYS TRUE + ) + ExternalProject_Add_StepTargets(compiler_rt check-compiler-rt) + ExternalProject_Add_StepDependencies( + compiler_rt + check-compiler-rt + compiler_rt-build + clib-install + ) + add_dependencies(check-compiler-rt compiler_rt-check-compiler-rt) +endif() + +############################################################################### +# picolibc +############################################################################### + +if(C_LIBRARY STREQUAL picolibc) + include(${TOOLCHAIN_SOURCE_DIR}/cmake/fetch_picolibc.cmake) + include(${CMAKE_CURRENT_SOURCE_DIR}/to_meson_list.cmake) + + # For building picolibc use Meson. + # Although picolibc has support for building with CMake, the Meson code + # is more mature and works better with LLVM. + find_program(MESON_EXECUTABLE meson REQUIRED) + + if(CMAKE_INSTALL_MESSAGE STREQUAL NEVER) + set(MESON_INSTALL_QUIET "--quiet") + endif() + + if(PICOLIBC_BUILD_TYPE MATCHES "minsize") + set(newlib_nano_malloc "true") + else() + set(newlib_nano_malloc "false") + endif() + + # TODO: xfail these tests instead of disabling. + if(target_triple MATCHES "^aarch64") + set(enable_picolibc_long_double_test false) + else() + set(enable_picolibc_long_double_test true) + endif() + + # Set meson_c_args to a comma-separated list of the clang path + # and flags e.g. 'path/to/clang', '--target=armv6m-none-eabi', + # '-march=armv6m' + set(picolibc_flags "${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX} ${lib_compile_flags}") + if(CMAKE_C_COMPILER_LAUNCHER) + set(picolibc_flags "${CMAKE_C_COMPILER_LAUNCHER} ${picolibc_flags}") + endif() + separate_arguments(picolibc_flags) + to_meson_list("${picolibc_flags}" picolibc_meson_flags) + + if(ENABLE_LIBC_TESTS) + set(picolibc_test_executor_bin ${CMAKE_CURRENT_SOURCE_DIR}/test-support/picolibc-test-wrapper.py) + to_meson_list("${test_executor_params}" meson_test_executor_params) + endif() + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meson-cross-build.txt.in ${CMAKE_CURRENT_BINARY_DIR}/meson-cross-build.txt @ONLY) + + ExternalProject_Add( + picolibc + SOURCE_DIR ${picolibc_SOURCE_DIR} + INSTALL_DIR ${TEMP_LIB_DIR} + DEPENDS compiler_rt-install + CONFIGURE_COMMAND + ${MESON_EXECUTABLE} + setup + -Dincludedir=include + -Dlibdir=lib + -Dspecsdir=none + -Dmultilib=false + -Dtests-enable-stack-protector=false + -Dtest-long-double=${enable_picolibc_long_double_test} + -Dnewlib-nano-malloc=${newlib_nano_malloc} + -Dtests=false + --prefix + --cross-file ${CMAKE_CURRENT_BINARY_DIR}/meson-cross-build.txt + --buildtype=${PICOLIBC_BUILD_TYPE} + + BUILD_COMMAND ${MESON_EXECUTABLE} compile + INSTALL_COMMAND ${MESON_EXECUTABLE} install ${MESON_INSTALL_QUIET} + USES_TERMINAL_CONFIGURE FALSE + USES_TERMINAL_BUILD TRUE + LIST_SEPARATOR , + CONFIGURE_HANDLED_BY_BUILD TRUE + TEST_EXCLUDE_FROM_MAIN TRUE + STEP_TARGETS build install + ) + + add_custom_target(check-picolibc) + add_dependencies(check-all check-picolibc) + if(ENABLE_LIBC_TESTS) + # meson builds the tests at the same time as the library. + # So reconfigure to enable tests at a later point. + ExternalProject_Add_Step( + picolibc + enable-tests + COMMAND ${MESON_EXECUTABLE} setup -Dtests=true --reconfigure + USES_TERMINAL TRUE + EXCLUDE_FROM_MAIN TRUE + ) + ExternalProject_Add_StepTargets(picolibc enable-tests) + ExternalProject_Add_StepDependencies( + picolibc + enable-tests + picolibc-build + compiler_rt-install + ) + ExternalProject_Add_Step( + picolibc + check + COMMAND ${MESON_EXECUTABLE} test -C + COMMAND ${Python3_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR}/test-support/modify-picolibc-xml.py + --picolibc-build-dir + --variant ${VARIANT} + USES_TERMINAL TRUE + EXCLUDE_FROM_MAIN TRUE + ALWAYS TRUE + ) + ExternalProject_Add_StepTargets(picolibc check) + ExternalProject_Add_StepDependencies( + picolibc + check + picolibc-enable-tests + ) + add_dependencies(check-picolibc picolibc-check) + endif() + +endif() + +############################################################################### +# newlib +############################################################################### + +if(C_LIBRARY STREQUAL newlib) + if(ENABLE_LIBC_TESTS) + message(FATAL_ERROR "Tests cannot yet be enabled using newlib libc.") + endif() + + include(${TOOLCHAIN_SOURCE_DIR}/cmake/fetch_newlib.cmake) + set(build_env + "CC_FOR_TARGET=${LLVM_BINARY_DIR}/bin/clang -target ${target_triple} -ffreestanding" + "CXX_FOR_TARGET=${LLVM_BINARY_DIR}/bin/clang++ -target ${target_triple} -ffreestanding" + "AR_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-ar" + "AS_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-as" + "NM_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-nm" + "OBJDUMP_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-objdump" + "RANLIB_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-ranlib" + "READELF_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-readelf" + "STRIP_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-strip" + "CFLAGS_FOR_TARGET=${flags} -Wno-error=implicit-function-declaration -D__USES_INITFINI__ -UHAVE_INIT_FINI__ -U_HAVE_INIT_FINI__ -UHAVE_INIT_FINI --sysroot ${TEMP_LIB_DIR}" + "CCASFLAGS=${flags} -Wno-error=implicit-function-declaration -D__USES_INITFINI__ -UHAVE_INIT_FINI__ -U_HAVE_INIT_FINI__ -UHAVE_INIT_FINI --sysroot ${TEMP_LIB_DIR}" + ) + + include(ProcessorCount) + set(make_flags) + ProcessorCount(nproc) + if(NOT nproc EQUAL 0) + set(make_flags -j${nproc}) + endif() + + ExternalProject_Add( + newlib + SOURCE_DIR ${newlib_SOURCE_DIR} + INSTALL_DIR ${TEMP_LIB_DIR} + CONFIGURE_COMMAND + ${CMAKE_COMMAND} -E env ${build_env} + /configure + --target=${target_triple} + --prefix "${TEMP_LIB_DIR}" + --exec_prefix /tmpinstall + --enable-newlib-io-long-long + --enable-newlib-register-fini + --disable-newlib-supplied-syscalls + --enable-newlib-io-c99-formats + --disable-nls + --enable-lite-exit + --disable-multilib + --enable-newlib-retargetable-locking + BUILD_COMMAND + ${CMAKE_COMMAND} -E env ${build_env} + make ${make_flags} + && + "${LLVM_BINARY_DIR}/bin/llvm-ar" rcs + /${target_triple}/libgloss/${cpu_family}/libcrt0-rdimon.a + /${target_triple}/libgloss/${cpu_family}/rdimon-crt0.o + && + "${LLVM_BINARY_DIR}/bin/llvm-ar" rcs + /${target_triple}/libgloss/${cpu_family}/libcrt0-nosys.a + /${target_triple}/libgloss/${cpu_family}/crt0.o + INSTALL_COMMAND + make install + && + ${CMAKE_COMMAND} -E copy_directory + /tmpinstall/${target_triple} + ${TEMP_LIB_DIR} + && + ${CMAKE_COMMAND} -E copy + /${target_triple}/libgloss/${cpu_family}/libcrt0-rdimon.a + ${TEMP_LIB_DIR}/lib + && + ${CMAKE_COMMAND} -E copy + /${target_triple}/libgloss/${cpu_family}/libcrt0-nosys.a + ${TEMP_LIB_DIR}/lib + # FIXME: TEST_COMMAND? + USES_TERMINAL_CONFIGURE FALSE + USES_TERMINAL_BUILD TRUE + # Always run the build command so that incremental builds are correct. + CONFIGURE_HANDLED_BY_BUILD TRUE + TEST_EXCLUDE_FROM_MAIN TRUE + STEP_TARGETS install # FIXME: test? + ) +endif() + +############################################################################### +# llvmlibc +############################################################################### + +if(C_LIBRARY STREQUAL llvmlibc) + if(ENABLE_LIBC_TESTS) + message(FATAL_ERROR "Tests cannot yet be enabled using llvm libc.") + endif() + if(ENABLE_CXX_LIBS) + message(FATAL_ERROR "We aren't yet able to build C++ libraries to go with llvm-libc.") + endif() + + # LLVM libc lacks a configuration for AArch64, but the AArch32 one works + # fine. However, setting the configuration for both architectures to the + # arm config directory means the baremetal config.json is never loaded, + # as it resides in the directory above. To ensure both are used, copy + # them to the same location and point libc to that. + set(LIBC_CFG_DIR ${CMAKE_BINARY_DIR}/llvmlibc-config) + file(COPY + ${llvmproject_SOURCE_DIR}/libc/config/baremetal/config.json + ${llvmproject_SOURCE_DIR}/libc/config/baremetal/arm/. + DESTINATION + ${LIBC_CFG_DIR} + ) + + set(lib_compile_flags "${lib_compile_flags} -Wno-error=atomic-alignment") + + set(common_llvmlibc_cmake_args + -DCMAKE_AR=${LLVM_BINARY_DIR}/bin/llvm-ar${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_ASM_COMPILER=${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_ASM_COMPILER_TARGET=${target_triple} + -DCMAKE_ASM_FLAGS=${lib_compile_flags} + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_CXX_COMPILER=${LLVM_BINARY_DIR}/bin/clang++${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_CXX_COMPILER_TARGET=${target_triple} + -DCMAKE_CXX_FLAGS=${lib_compile_flags} + -DCMAKE_C_COMPILER=${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_C_COMPILER_TARGET=${target_triple} + -DCMAKE_C_FLAGS=${lib_compile_flags} + -DCMAKE_INSTALL_MESSAGE=${CMAKE_INSTALL_MESSAGE} + -DCMAKE_INSTALL_PREFIX= + -DCMAKE_NM=${LLVM_BINARY_DIR}/bin/llvm-nm${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_RANLIB=${LLVM_BINARY_DIR}/bin/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX} + # Let CMake know we're cross-compiling + -DCMAKE_SYSTEM_NAME=Generic + -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY + ) + + if(LIBC_HDRGEN) + # If libc-hdrgen is provided, there is no need to build it, + # but a target is still needed to satisfy the dependency. + add_custom_target(libc_hdrgen) + elseif(EXISTS ${LLVM_BINARY_DIR}/bin/libc-hdrgen${CMAKE_EXECUTABLE_SUFFIX}) + set(LIBC_HDRGEN ${LLVM_BINARY_DIR}/bin/libc-hdrgen${CMAKE_EXECUTABLE_SUFFIX}) + add_custom_target(libc_hdrgen) + else() + ExternalProject_Add( + libc_hdrgen + SOURCE_DIR ${llvmproject_SOURCE_DIR}/llvm + CMAKE_ARGS + -DLLVM_ENABLE_RUNTIMES=libc + -DLLVM_LIBC_FULL_BUILD=ON + -DCMAKE_BUILD_TYPE=Debug + BUILD_COMMAND ${CMAKE_COMMAND} --build . --target libc-hdrgen + INSTALL_COMMAND ${CMAKE_COMMAND} -E true + CONFIGURE_HANDLED_BY_BUILD TRUE + ) + ExternalProject_Get_property(libc_hdrgen BINARY_DIR) + set(LIBC_HDRGEN ${BINARY_DIR}/bin/libc-hdrgen${CMAKE_EXECUTABLE_SUFFIX}) + endif() + + ExternalProject_Add( + llvmlibc + SOURCE_DIR ${llvmproject_SOURCE_DIR}/runtimes + INSTALL_DIR llvmlibc/install + DEPENDS libc_hdrgen + CMAKE_ARGS + ${compiler_launcher_cmake_args} + ${common_llvmlibc_cmake_args} + -DLIBC_TARGET_TRIPLE=${target_triple} + -DLIBC_HDRGEN_EXE=${LIBC_HDRGEN} + -DLIBC_CONFIG_PATH=${LIBC_CFG_DIR} + -DLIBC_CONF_TIME_64BIT=ON + -DLLVM_CMAKE_DIR=${LLVM_BINARY_DIR}/lib/cmake/llvm + -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON + -DLLVM_ENABLE_RUNTIMES=libc + -DLLVM_INCLUDE_TESTS=OFF # llvmlibc's tests require C++, so can't be built until llvmlibc can support libc++ + -DLLVM_LIBC_FULL_BUILD=ON + STEP_TARGETS build install + USES_TERMINAL_CONFIGURE FALSE + USES_TERMINAL_BUILD TRUE + USES_TERMINAL_INSTALL TRUE + USES_TERMINAL_TEST TRUE + LIST_SEPARATOR , + CONFIGURE_HANDLED_BY_BUILD TRUE + INSTALL_COMMAND ${CMAKE_COMMAND} --install . + # Copy llvm-libc lib directory, moving libraries out of their + # target-specific subdirectory. + COMMAND + ${CMAKE_COMMAND} + -E copy_directory + /lib/${target_triple} + "${TEMP_LIB_DIR}/lib" + # And copy the include directory, which is already arranged right. + COMMAND + ${CMAKE_COMMAND} + -E copy_directory + /include + "${TEMP_LIB_DIR}/include" + ) + + ExternalProject_Add( + llvmlibc-support + SOURCE_DIR ${TOOLCHAIN_SOURCE_DIR}/llvmlibc-support + INSTALL_DIR ${TEMP_LIB_DIR} + DEPENDS ${lib_tool_dependencies} llvmlibc-install + CMAKE_ARGS + ${compiler_launcher_cmake_args} + ${common_llvmlibc_cmake_args} + STEP_TARGETS build install + USES_TERMINAL_CONFIGURE FALSE + USES_TERMINAL_BUILD TRUE + USES_TERMINAL_INSTALL TRUE + USES_TERMINAL_TEST TRUE + LIST_SEPARATOR , + CONFIGURE_HANDLED_BY_BUILD TRUE + ) +endif() + +add_dependencies(clib-install ${C_LIBRARY}-install) + +############################################################################### +# runtimes (libcxx, libcxxabi, libunwind) +############################################################################### + +if(ENABLE_CXX_LIBS) + if(C_LIBRARY STREQUAL picolibc) + set(cxxlibs_extra_cmake_options + -DLIBCXXABI_ENABLE_THREADS=OFF + -DLIBCXX_ENABLE_MONOTONIC_CLOCK=OFF + -DLIBCXX_ENABLE_RANDOM_DEVICE=OFF + -DLIBCXX_ENABLE_THREADS=OFF + -DLIBCXX_ENABLE_WIDE_CHARACTERS=OFF + -DLIBUNWIND_ENABLE_THREADS=OFF + -DLIBCXXABI_ENABLE_EXCEPTIONS=${enable_exceptions} + -DLIBCXXABI_ENABLE_STATIC_UNWINDER=${enable_exceptions} + -DLIBCXX_ENABLE_EXCEPTIONS=${enable_exceptions} + -DLIBCXX_ENABLE_RTTI=${enable_rtti} + ) + if(ENABLE_LIBCXX_TESTS) + set(cxxlibs_lit_args "${LLVM_LIT_ARGS} --xunit-xml-output=results.junit.xml") + set(cxxlibs_test_cmake_options + -DLIBCXX_TEST_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/test-support/llvm-libc++-picolibc.cfg.in + -DLIBCXX_TEST_PARAMS=executor=${lit_test_executor} + -DLIBCXXABI_TEST_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/test-support/llvm-libc++abi-picolibc.cfg.in + -DLIBCXXABI_TEST_PARAMS=executor=${lit_test_executor} + -DLIBUNWIND_TEST_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/test-support/llvm-libunwind-picolibc.cfg.in + -DLIBUNWIND_TEST_PARAMS=executor=${lit_test_executor} + -DRUNTIME_TEST_ARCH_FLAGS=${compile_arch_flags} + -DRUNTIME_TEST_LINK_FLAGS=${test_link_flags} + -DLLVM_LIT_ARGS=${cxxlibs_lit_args} + ) + endif() + elseif(C_LIBRARY STREQUAL newlib) + set(cxxlibs_extra_cmake_options + -DLIBCXXABI_ENABLE_THREADS=OFF + -DLIBCXX_ENABLE_THREADS=OFF + -DLIBCXX_ENABLE_MONOTONIC_CLOCK=OFF + -DLIBCXX_ENABLE_RANDOM_DEVICE=OFF + -DLIBCXX_ENABLE_WIDE_CHARACTERS=ON + -DLIBCXX_ENABLE_LOCALIZATION=OFF + -DLIBUNWIND_ENABLE_THREADS=OFF + ) + endif() + + ExternalProject_Add( + cxxlibs + SOURCE_DIR ${llvmproject_SOURCE_DIR}/runtimes + INSTALL_DIR ${TEMP_LIB_DIR} + DEPENDS compiler_rt-install clib-install + CMAKE_ARGS + ${compiler_launcher_cmake_args} + -DCMAKE_AR=${LLVM_BINARY_DIR}/bin/llvm-ar${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_ASM_FLAGS=${lib_compile_flags} + -DCMAKE_BUILD_TYPE=MinSizeRel + -DCMAKE_CXX_COMPILER=${LLVM_BINARY_DIR}/bin/clang++${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_CXX_COMPILER_TARGET=${target_triple} + -DCMAKE_CXX_FLAGS=${lib_compile_flags} + -DCMAKE_C_COMPILER=${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_C_COMPILER_TARGET=${target_triple} + -DCMAKE_C_FLAGS=${lib_compile_flags} + -DCMAKE_INSTALL_MESSAGE=${CMAKE_INSTALL_MESSAGE} + -DCMAKE_INSTALL_PREFIX=${TEMP_LIB_DIR} + -DCMAKE_NM=${LLVM_BINARY_DIR}/bin/llvm-nm${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_RANLIB=${LLVM_BINARY_DIR}/bin/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX} + # Let CMake know we're cross-compiling + -DCMAKE_SYSTEM_NAME=Generic + -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY + -DLIBCXXABI_BAREMETAL=ON + -DLIBCXXABI_ENABLE_ASSERTIONS=OFF + -DLIBCXXABI_ENABLE_SHARED=OFF + -DLIBCXXABI_ENABLE_STATIC=ON + -DLIBCXXABI_LIBCXX_INCLUDES="${TEMP_LIB_DIR}/include/c++/v1" + -DLIBCXXABI_USE_COMPILER_RT=ON + -DLIBCXXABI_USE_LLVM_UNWINDER=ON + -DLIBCXXABI_SHARED_OUTPUT_NAME="c++abi-shared" + -DLIBCXX_ABI_UNSTABLE=ON + -DLIBCXX_CXX_ABI=libcxxabi + -DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON + -DLIBCXX_ENABLE_FILESYSTEM=OFF + -DLIBCXX_ENABLE_SHARED=OFF + -DLIBCXX_ENABLE_STATIC=ON + -DLIBCXX_INCLUDE_BENCHMARKS=OFF + -DLIBCXX_SHARED_OUTPUT_NAME="c++-shared" + -DLIBUNWIND_ENABLE_ASSERTIONS=OFF + -DLIBUNWIND_ENABLE_SHARED=OFF + -DLIBUNWIND_ENABLE_STATIC=ON + -DLIBUNWIND_IS_BAREMETAL=ON + -DLIBUNWIND_REMEMBER_HEAP_ALLOC=ON + -DLIBUNWIND_USE_COMPILER_RT=ON + -DLIBUNWIND_SHARED_OUTPUT_NAME="unwind-shared" + -DLLVM_LIT_ARGS=${LLVM_LIT_ARGS} + -DLLVM_ENABLE_RUNTIMES=libcxxabi,libcxx,libunwind + -DRUNTIME_VARIANT_NAME=${VARIANT} + ${cxxlibs_extra_cmake_options} + ${cxxlibs_test_cmake_options} + STEP_TARGETS build install + USES_TERMINAL_CONFIGURE FALSE + USES_TERMINAL_BUILD TRUE + USES_TERMINAL_INSTALL TRUE + USES_TERMINAL_TEST TRUE + LIST_SEPARATOR , + CONFIGURE_HANDLED_BY_BUILD TRUE + ) + add_custom_target(check-cxx) + add_dependencies(check-all check-cxx) + add_custom_target(check-cxxabi) + add_dependencies(check-all check-cxxabi) + add_custom_target(check-unwind) + add_dependencies(check-all check-unwind) + if(ENABLE_LIBCXX_TESTS) + foreach(check_target check-cxx check-cxxabi check-unwind) + ExternalProject_Add_Step( + cxxlibs + ${check_target} + COMMAND "${CMAKE_COMMAND}" --build --target ${check_target} + USES_TERMINAL TRUE + EXCLUDE_FROM_MAIN TRUE + ALWAYS TRUE + ) + ExternalProject_Add_StepTargets(cxxlibs ${check_target}) + ExternalProject_Add_StepDependencies( + cxxlibs + ${check_target} + cxxlibs-install + ) + add_dependencies(${check_target} cxxlibs-${check_target}) + endforeach() + endif() + +endif() + +install( + DIRECTORY ${TEMP_LIB_DIR}/ + DESTINATION . +) diff --git a/arm-runtimes/meson-cross-build.txt.in b/arm-runtimes/meson-cross-build.txt.in new file mode 100644 index 0000000..90df44d --- /dev/null +++ b/arm-runtimes/meson-cross-build.txt.in @@ -0,0 +1,31 @@ +[binaries] +c = [@picolibc_meson_flags@, '-nostdlib'] +ar = '@LLVM_BINARY_DIR@/bin/llvm-ar@CMAKE_EXECUTABLE_SUFFIX@' +strip = '@LLVM_BINARY_DIR@/bin/llvm-strip@CMAKE_EXECUTABLE_SUFFIX@' +# only needed to run tests +# setting stdin to /dev/null prevents qemu from fiddling with the echo bit of +# the parent terminal +exe_wrapper = [ + 'sh', + '-c', + 'test -z "$PICOLIBC_TEST" || @picolibc_test_executor_bin@ "$@" < /dev/null', + '@picolibc_test_executor_bin@', + @meson_test_executor_params@] + +[host_machine] +system = 'none' +cpu_family = '@cpu_family@' +cpu = '@cpu_family@' +endian = 'little' + +[properties] +skip_sanity_check = true +libgcc ='-lclang_rt.builtins' +separate_boot_flash = true +default_boot_flash_addr = '@BOOT_FLASH_ADDRESS@' +default_boot_flash_size = '@BOOT_FLASH_SIZE@' +default_flash_addr = '@FLASH_ADDRESS@' +default_flash_size = '@FLASH_SIZE@' +default_ram_addr = '@RAM_ADDRESS@' +default_ram_size = '@RAM_SIZE@' +default_stack_size = '@STACK_SIZE@' diff --git a/test-support/lit-exec-fvp.py b/arm-runtimes/test-support/lit-exec-fvp.py similarity index 100% rename from test-support/lit-exec-fvp.py rename to arm-runtimes/test-support/lit-exec-fvp.py diff --git a/test-support/lit-exec-qemu.py b/arm-runtimes/test-support/lit-exec-qemu.py similarity index 100% rename from test-support/lit-exec-qemu.py rename to arm-runtimes/test-support/lit-exec-qemu.py diff --git a/test-support/llvm-libc++-picolibc.cfg.in b/arm-runtimes/test-support/llvm-libc++-picolibc.cfg.in similarity index 89% rename from test-support/llvm-libc++-picolibc.cfg.in rename to arm-runtimes/test-support/llvm-libc++-picolibc.cfg.in index 1041aa5..674fc84 100644 --- a/test-support/llvm-libc++-picolibc.cfg.in +++ b/arm-runtimes/test-support/llvm-libc++-picolibc.cfg.in @@ -7,7 +7,7 @@ config.name = 'libc++-@RUNTIME_VARIANT_NAME@' config.substitutions.append(('%{libc-include}', '@CMAKE_INSTALL_PREFIX@/include')) config.substitutions.append(('%{libc-lib}', '@CMAKE_INSTALL_PREFIX@/lib')) -config.substitutions.append(('%{libc-linker-script}', '@LIBC_LINKER_SCRIPT@')) +config.substitutions.append(('%{libc-extra-link-flags}', '@RUNTIME_TEST_LINK_FLAGS@')) config.substitutions.append(('%{flags}', '@RUNTIME_TEST_ARCH_FLAGS@')) config.substitutions.append(('%{compile_flags}', @@ -27,8 +27,8 @@ config.substitutions.append(('%{link_flags}', ' -nostdlib++ -L %{lib-dir}' ' -lc++ -lc++abi' ' -nostdlib -L %{libc-lib}' - ' -lc -lm -lclang_rt.builtins -lsemihost -nostartfiles -lcrt0-semihost' - ' -T %{libc-linker-script}' + ' -lc -lm -lclang_rt.builtins' + ' %{libc-extra-link-flags}' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T -- ' diff --git a/test-support/llvm-libc++abi-picolibc.cfg.in b/arm-runtimes/test-support/llvm-libc++abi-picolibc.cfg.in similarity index 86% rename from test-support/llvm-libc++abi-picolibc.cfg.in rename to arm-runtimes/test-support/llvm-libc++abi-picolibc.cfg.in index 96b3206..5d7f8ae 100644 --- a/test-support/llvm-libc++abi-picolibc.cfg.in +++ b/arm-runtimes/test-support/llvm-libc++abi-picolibc.cfg.in @@ -7,7 +7,7 @@ config.name = 'libc++abi-@RUNTIME_VARIANT_NAME@' config.substitutions.append(('%{libc-include}', '@CMAKE_INSTALL_PREFIX@/include')) config.substitutions.append(('%{libc-lib}', '@CMAKE_INSTALL_PREFIX@/lib')) -config.substitutions.append(('%{libc-linker-script}', '@LIBC_LINKER_SCRIPT@')) +config.substitutions.append(('%{libc-extra-link-flags}', '@RUNTIME_TEST_LINK_FLAGS@')) config.substitutions.append(('%{flags}', '@RUNTIME_TEST_ARCH_FLAGS@')) config.substitutions.append(('%{compile_flags}', @@ -19,8 +19,8 @@ config.substitutions.append(('%{link_flags}', ' -nostdlib++ -L %{lib}' ' -lc++ -lc++abi' ' -nostdlib -L %{libc-lib}' - ' -lc -lm -lclang_rt.builtins -lsemihost -nostartfiles -lcrt0-semihost' - ' -T %{libc-linker-script}' + ' -lc -lm -lclang_rt.builtins' + ' %{libc-extra-link-flags}' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T -- ' diff --git a/test-support/llvm-libunwind-picolibc.cfg.in b/arm-runtimes/test-support/llvm-libunwind-picolibc.cfg.in similarity index 88% rename from test-support/llvm-libunwind-picolibc.cfg.in rename to arm-runtimes/test-support/llvm-libunwind-picolibc.cfg.in index 948b214..d7942c1 100644 --- a/test-support/llvm-libunwind-picolibc.cfg.in +++ b/arm-runtimes/test-support/llvm-libunwind-picolibc.cfg.in @@ -8,7 +8,7 @@ config.name = 'libunwind-@RUNTIME_VARIANT_NAME@' config.substitutions.append(('%{libc-include}', '@CMAKE_INSTALL_PREFIX@/include')) config.substitutions.append(('%{libc-lib}', '@CMAKE_INSTALL_PREFIX@/lib')) -config.substitutions.append(('%{libc-linker-script}', '@LIBC_LINKER_SCRIPT@')) +config.substitutions.append(('%{libc-extra-link-flags}', '@RUNTIME_TEST_LINK_FLAGS@')) compile_flags = [] @@ -32,8 +32,8 @@ config.substitutions.append(('%{link_flags}', ' -nostdlib++ -L %{lib}' ' -lc++ -lc++abi -lunwind' ' -nostdlib -L %{libc-lib}' - ' -lc -lm -lclang_rt.builtins -lsemihost -nostartfiles -lcrt0-semihost' - ' -T %{libc-linker-script}' + ' -lc -lm -lclang_rt.builtins' + ' %{libc-extra-link-flags}' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T -- ' diff --git a/arm-runtimes/test-support/modify-compiler-rt-xml.py b/arm-runtimes/test-support/modify-compiler-rt-xml.py new file mode 100644 index 0000000..bc7c538 --- /dev/null +++ b/arm-runtimes/test-support/modify-compiler-rt-xml.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python3 + +# Helper script to modify the xml results from compiler-rt. + +# compiler-rt always puts all the test results into the "compiler-rt" +# testsuite in the junit xml file. We have multiple variants of +# compiler-rt, so the xml is modified to group the tests by variant. + +import argparse +import os +from xml.etree import ElementTree + + +def main(): + parser = argparse.ArgumentParser(description="Reformat compiler-rt xml results") + parser.add_argument( + "--dir", + required=True, + help="Path to compiler-rt build directory", + ) + parser.add_argument( + "--variant", + required=True, + help="Name of the variant under test", + ) + args = parser.parse_args() + + # A '.' character is used in junit xml to split classes/groups. + # Variants such as armv8m.main need to be renamed. + variant_name = args.variant.replace(".", "_") + + xml_file = os.path.join(args.dir, "test", "results.junit.xml") + + tree = ElementTree.parse(xml_file) + root = tree.getroot() + + # The compiler-rt Builtins tests runs two testsuites: TestCases and Unit + # TestCases are recorded in the "Builtins" suite. + # But the Unit tests are recorded in "Builtins-arm-generic" or similar. + # For readability, combine them all under compiler-rt-{variant}-Builtins + for testsuite in root.iter("testsuite"): + old_suitename = testsuite.get("name") + new_suitename = f"compiler-rt-{variant_name}-Builtins" + testsuite.set("name", new_suitename) + for testcase in testsuite.iter("testcase"): + old_classname = testcase.get("classname") + new_classname = old_classname.replace(old_suitename, new_suitename) + testcase.set("classname", new_classname) + + tree.write(xml_file) + print(f"Results written to {xml_file}") + +if __name__ == "__main__": + main() diff --git a/arm-runtimes/test-support/modify-picolibc-xml.py b/arm-runtimes/test-support/modify-picolibc-xml.py new file mode 100644 index 0000000..f194b6d --- /dev/null +++ b/arm-runtimes/test-support/modify-picolibc-xml.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 + +# Helper script to modify the xml results from picolibc. + +# Picolibc always puts all the test results into the "picolibc" +# testsuite in the junit xml file. We have multiple variants of +# picolibc, so the xml is modified to group the tests by variant. + +import argparse +import os +from xml.etree import ElementTree + + +def main(): + parser = argparse.ArgumentParser(description="Reformat picolibc xml results") + parser.add_argument( + "--dir", + required=True, + help="Path to picolibc build directory", + ) + parser.add_argument( + "--variant", + required=True, + help="Name of the variant under test", + ) + args = parser.parse_args() + + # A '.' character is used in junit xml to split classes/groups. + # Variants such as armv8m.main need to be renamed. + variant_name = args.variant.replace(".", "_") + + xml_file = os.path.join(args.dir, "meson-logs", "testlog.junit.xml") + + tree = ElementTree.parse(xml_file) + root = tree.getroot() + for testsuite in root.iter("testsuite"): + testsuite.set("name", f"picolibc-{variant_name}") + for testcase in root.iter("testcase"): + testcase.set("classname", f"picolibc-{variant_name}.picolibc-{variant_name}") + tree.write(xml_file) + print(f"Results written to {xml_file}") + + +if __name__ == "__main__": + main() diff --git a/test-support/picolibc-test-wrapper.py b/arm-runtimes/test-support/picolibc-test-wrapper.py similarity index 100% rename from test-support/picolibc-test-wrapper.py rename to arm-runtimes/test-support/picolibc-test-wrapper.py diff --git a/test-support/run_fvp.py b/arm-runtimes/test-support/run_fvp.py similarity index 100% rename from test-support/run_fvp.py rename to arm-runtimes/test-support/run_fvp.py diff --git a/test-support/run_qemu.py b/arm-runtimes/test-support/run_qemu.py similarity index 100% rename from test-support/run_qemu.py rename to arm-runtimes/test-support/run_qemu.py diff --git a/arm-runtimes/to_meson_list.cmake b/arm-runtimes/to_meson_list.cmake new file mode 100644 index 0000000..8a42db8 --- /dev/null +++ b/arm-runtimes/to_meson_list.cmake @@ -0,0 +1,9 @@ +# Converts a cmake list to a string, which can be interpreted as list content in +# meson configuration file. +# The delimiting brackets are not included. +# Example output: "'foo', 'bar', 'baz'" + +function(to_meson_list input_list out_var) + list(JOIN input_list "', '" input_list) + set(${out_var} "'${input_list}'" PARENT_SCOPE) +endfunction() diff --git a/cmake/fetch_llvm.cmake b/cmake/fetch_llvm.cmake new file mode 100644 index 0000000..2268819 --- /dev/null +++ b/cmake/fetch_llvm.cmake @@ -0,0 +1,33 @@ +# To avoid duplicating the FetchContent code, this file can be +# included by either the top-level toolchain cmake, or the +# arm-runtimes sub-project. +# FETCHCONTENT_SOURCE_DIR_LLVMPROJECT should be passed down from the +# top level to any library builds to prevent repeated checkouts. + +include(FetchContent) + +if(NOT VERSIONS_JSON) + include(${CMAKE_CURRENT_LIST_DIR}/read_versions.cmake) +endif() +read_repo_version(llvmproject llvm-project) + +set(llvm_patch_script ${CMAKE_CURRENT_LIST_DIR}/patch_llvm.py) +set(patch_dir ${CMAKE_CURRENT_LIST_DIR}/../patches) +set(LLVM_PATCH_COMMAND ${Python3_EXECUTABLE} ${llvm_patch_script} ${patch_dir}/llvm-project) +if(APPLY_LLVM_PERFORMANCE_PATCHES) + set(LLVM_PATCH_COMMAND ${LLVM_PATCH_COMMAND} && ${Python3_EXECUTABLE} ${llvm_patch_script} ${patch_dir}/llvm-project-perf) +endif() + +FetchContent_Declare(llvmproject + GIT_REPOSITORY https://github.com/llvm/llvm-project.git + GIT_TAG "${llvmproject_TAG}" + GIT_SHALLOW "${llvmproject_SHALLOW}" + GIT_PROGRESS TRUE + PATCH_COMMAND ${LLVM_PATCH_COMMAND} + # Add the llvm subdirectory later to ensure that + # LLVMEmbeddedToolchainForArm is the first project declared. + # Otherwise CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT + # can't be used. + SOURCE_SUBDIR do_not_add_llvm_subdir_yet +) +FetchContent_MakeAvailable(llvmproject) diff --git a/cmake/fetch_newlib.cmake b/cmake/fetch_newlib.cmake new file mode 100644 index 0000000..1413145 --- /dev/null +++ b/cmake/fetch_newlib.cmake @@ -0,0 +1,25 @@ +# To avoid duplicating the FetchContent code, this file can be +# included by either the top-level toolchain cmake, or the +# arm-runtimes sub-project. +# FETCHCONTENT_SOURCE_DIR_NEWLIB should be passed down from the +# top level to any library builss to prevent repeated checkouts. + +include(FetchContent) + +if(NOT VERSIONS_JSON) + include(${CMAKE_CURRENT_LIST_DIR}/read_versions.cmake) +endif() +read_repo_version(newlib newlib) + +set(newlib_patch ${CMAKE_CURRENT_LIST_DIR}/../patches/newlib.patch) + +FetchContent_Declare(newlib + GIT_REPOSITORY https://sourceware.org/git/newlib-cygwin.git + GIT_TAG "${newlib_TAG}" + GIT_SHALLOW "${newlib_SHALLOW}" + GIT_PROGRESS TRUE + PATCH_COMMAND git reset --quiet --hard && git clean --quiet --force -dx && git apply ${newlib_patch} + # Similarly to picolibc, we don't do the configuration here. + SOURCE_SUBDIR do_not_add_newlib_subdir +) +FetchContent_MakeAvailable(newlib) diff --git a/cmake/fetch_picolibc.cmake b/cmake/fetch_picolibc.cmake new file mode 100644 index 0000000..3f4f858 --- /dev/null +++ b/cmake/fetch_picolibc.cmake @@ -0,0 +1,31 @@ +# To avoid duplicating the FetchContent code, this file can be +# included by either the top-level toolchain cmake, or the +# arm-runtimes sub-project. +# FETCHCONTENT_SOURCE_DIR_PICOLIBC should be passed down from the +# top level to any library builss to prevent repeated checkouts. + +include(FetchContent) + +if(NOT VERSIONS_JSON) + include(${CMAKE_CURRENT_LIST_DIR}/read_versions.cmake) +endif() +read_repo_version(picolibc picolibc) + +set( + picolibc_patches + ${CMAKE_CURRENT_SOURCE_DIR}/patches/picolibc/0001-Enable-libcxx-builds.patch + ${CMAKE_CURRENT_SOURCE_DIR}/patches/picolibc/0002-Add-bootcode-for-AArch64-FVPs.patch +) + +FetchContent_Declare(picolibc + GIT_REPOSITORY https://github.com/picolibc/picolibc.git + GIT_TAG "${picolibc_TAG}" + GIT_SHALLOW "${picolibc_SHALLOW}" + GIT_PROGRESS TRUE + PATCH_COMMAND git reset --quiet --hard && git clean --quiet --force -dx && git apply ${picolibc_patches} + # We only want to download the content, not configure it at this + # stage. picolibc will be built in many configurations using + # ExternalProject_Add using the sources that are checked out here. + SOURCE_SUBDIR do_not_add_picolibc_subdir +) +FetchContent_MakeAvailable(picolibc) diff --git a/cmake/read_versions.cmake b/cmake/read_versions.cmake new file mode 100644 index 0000000..194e58e --- /dev/null +++ b/cmake/read_versions.cmake @@ -0,0 +1,22 @@ +# Read which revisions of the repos to use. +file(READ ${CMAKE_CURRENT_LIST_DIR}/../versions.json VERSIONS_JSON) +function(read_repo_version output_variable_prefix repo) + string(JSON tag GET ${VERSIONS_JSON} "repos" "${repo}" "tag") + string(JSON tagType GET ${VERSIONS_JSON} "repos" "${repo}" "tagType") + if(tagType STREQUAL "commithash") + # GIT_SHALLOW doesn't work with commit hashes. + set(shallow OFF) + elseif(tagType STREQUAL "branch") + set(shallow ON) + # CMake docs recommend that "branch names and tags should + # generally be specified as remote names" + set(tag "origin/${tag}") + elseif(tagType STREQUAL "tag") + set(shallow ON) + else() + message(FATAL_ERROR "Unrecognised tagType ${tagType}") + endif() + + set(${output_variable_prefix}_TAG "${tag}" PARENT_SCOPE) + set(${output_variable_prefix}_SHALLOW "${shallow}" PARENT_SCOPE) +endfunction() diff --git a/docs/building-from-source.md b/docs/building-from-source.md index 80c3366..8bf5cd5 100644 --- a/docs/building-from-source.md +++ b/docs/building-from-source.md @@ -157,3 +157,83 @@ and designed to improve performance in certain circumstances. To reduce divergence from upstream and potential patch conflicts, the performance patches are not applied by default, but can be enabled for an automatic checkout with the APPLY_LLVM_PERFORMANCE_PATCHES option. + +## Building individual library variants + +When working on library code, it may be useful to build a library variant +without having to rebuild the entire toolchain. + +Each variant is built using the `arm-runtimes` sub-project, and can be +configured and built directly if you provide a path to a LLVM build or install. + +The default CMake arguments to build a particular variant are stored in a JSON +format in the arm-multilib/json/variants folder, which can be loaded at +configuration with the `-DVARIANT_JSON` setting. Any additional options +provided on the command line will override values from he JSON. `-DC_LIBRARY` +will be required to set which library to build, and `-DLLVM_BINARY_DIR` should +point to a build or install of LLVM. + +For example, to build the `armv7a_soft_nofp` variant using `picolibc`, using +an existing LLVM build and source checkouts: + +``` +cd LLVM-embedded-toolchain-for-Arm +mkdir build-lib +cmake ../arm-runtimes -G Ninja \ + -DVARIANT_JSON=../arm-multilib/json/variants/armv7a_soft_nofp.json \ + -DC_LIBRARY=picolibc \ + -DLLVM_BINARY_DIR=/path/to/llvm \ + -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=/path/to/llvm-project \ + -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=/path/to/picolibc +ninja +``` + +If enabled and the required test executor available, tests can be run with +using specific test targets: +`ninja check-picolibc` +`ninja check-compiler-rt` +`ninja check-cxx` +`ninja check-cxxabi` +`ninja check-unwind` + +Alternatively, `ninja check-all` runs all enabled tests. + +## Building sets of libraries + +As well as individual libraries, it is also possible to build a set of +libraries without rebuilding the entire toolchain. The `arm-multilib` +sub-project builds and collects multiple libraries, and generates a +`multilib.yaml` file to map compile flags to variants. + +The `arm-multilib/multilib.json` file defines which variants are built and +their order in the mapping. This can be used to configure the project directly + +For example, building the picolibc variants using an existing LLVM build and +source checkouts: +``` +cd LLVM-embedded-toolchain-for-Arm +mkdir build-multilib +cmake ../arm-multilib -G Ninja \ + -DMULTILIB_JSON=../arm-multilib/json/multilib.json \ + -DC_LIBRARY=picolibc \ + -DLLVM_BINARY_DIR=/path/to/llvm \ + -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=/path/to/llvm-project \ + -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=/path/to/picolibc +ninja +``` +To only build a subset of the variants defined in the JSON file, +the `-DENABLE_VARIANTS` option controls which variants to build. +E.g, `-DENABLE_VARIANTS="aarch64a;armv7a_soft_nofp"` only builds the two +variants of `aarch64a` and `armv7a_soft_nofp`. + +If enabled and the required test executor available, tests can be run with +using specific test targets: + +`ninja check-picolibc` +`ninja check-compiler-rt` +`ninja check-cxx` +`ninja check-cxxabi` +`ninja check-unwind` + +Alternatively, `ninja check-all` runs all enabled tests. +`ninja check-` runs all the tests for that specific variant. diff --git a/test-support/run-picolibc-tests.py b/test-support/run-picolibc-tests.py deleted file mode 100755 index 8aa3b24..0000000 --- a/test-support/run-picolibc-tests.py +++ /dev/null @@ -1,116 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (c) 2024, Arm Limited and affiliates. - -# This is a helper script to run the picolibc tests. -# -# This is just a glue code for cmake the script, not intended to be run -# manually. If you want to run the tests manually, using meson directly will -# provide you more options and is better documented: -# cd PICOLIBC_BUILD_DIR -# meson setup . PICOLIBC_SOURCE_DIR -Dtests=true --reconfigure -# meson test -# -# The tests for picolibc cannot be enabled at first invocation of meson, -# because compiler_rt is built after picolibc is built. If picolibc would be -# configured with tests enabled at before compiler_rt is built, the -# picolibc build would fail. This is why this script enables the tests just -# before picolibc is tested. -# -# Picolibc always puts all the test results into "picolibc" testsuite in the -# junit xml file. We have multiple variants of picolibc and so we add a -# classname to every test the tests are run. This has to be done even when the -# tests fail, while still returnning non-zero exit value, so that cmake detects -# failure. This would be hard to do from within the cmake script. - -import argparse -import sys -import re -import os.path -import subprocess - -help = "usage: run-picolibc-tests.py PICOLIBC_SOURCE_DIR PICOLIBC_BUILD_DIR" - - -def replace_classname(build_dir, classname): - xml_file_name = os.path.join(build_dir, "meson-logs", "testlog.junit.xml") - - with open(xml_file_name, "r") as f: - xml_file_data = f.read() - - xml_file_data = re.sub( - 'classname="picolibc"', - f'classname="picolibc.{classname}"', - xml_file_data, - ) - - with open(xml_file_name, "w") as f: - f.write(xml_file_data) - - -def run_tests(meson_command, source_dir, build_dir, variant): - - # meson<0.64.0 does not properly apply new configuration after - # "meson configure -Dtests=false" - # use "meson setup --reconfigure" as a workaround - subprocess.run( - [ - meson_command, - "setup", - ".", - source_dir, - "-Dtests=true", - "--reconfigure", - ], - cwd=build_dir, - check=True, - ) - - returncode = subprocess.run( - [meson_command, "test"], - cwd=build_dir, - ).returncode - - subprocess.run( - [meson_command, "configure", "-Dtests=false"], - cwd=build_dir, - check=True, - ) - - replace_classname(build_dir, variant) - - return returncode - - -def main(): - parser = argparse.ArgumentParser(description="Run picolibc tests") - parser.add_argument( - "--meson-command", required=True, default="meson", help="meson path" - ) - parser.add_argument( - "--picolibc-source-dir", - required=True, - help="path to picolibc sources", - ) - parser.add_argument( - "--picolibc-build-dir", - required=True, - help="path to picolibc build", - ) - parser.add_argument( - "--variant", - required=True, - help="name of the variant to be appended to the testsuite name", - ) - args = parser.parse_args() - ret_code = run_tests( - args.meson_command, - args.picolibc_source_dir, - args.picolibc_build_dir, - args.variant, - ) - sys.exit(ret_code) - - -if __name__ == "__main__": - main() From dca45e71b700fc7c337b888c5d1bacfa7fbb1f36 Mon Sep 17 00:00:00 2001 From: dcandler Date: Wed, 20 Nov 2024 14:14:55 +0000 Subject: [PATCH 13/16] Corrections to CMake changes to enable library sub-builds (#571) A number of corrections to the recent CMake changes: * Two scripts arguments were renamed during review, but the cmake steps calling the script weren't updated. * Our downstream test targets such as check-package-llvm-toolchain target require the path to an external llvm-lit in order to run the tests. * The variables to enable exceptions and RTTI are now cached and the names are capitalized, but CMake arguments needed updating to reflect this. * The PREBUILT_TARGET_LIBRARIES option is meant to disable the building of all libraries, on the assumption that pre-built libraries will be copied from another location. The functionality was accidentally removed, but has now been returned. * CMake automatically expands a string containing semi-colons to a list, but the ExternalProject argument must also be a semi-colon separated list. To get around this, convert the LLVM_TOOLCHAIN_LIBRARY_VARIANTS string to a comma separated list, since the LIST_SEPARATOR option will reinterpret this as a semi-colon list. * Previously, FVP testing was skipped if a FVP install was not available. However, this now throws a configuration error if testing relies on FVPs. But if you specifically want to test with FVPs, it is desirable to have the configuration error warn you with an if the install cannot be found. To resolve this, an additional option has been added to explicitly enable FVP testing, defaulting to OFF. This will override any settings from the variant JSON, so that the default case remains skipping FVP testing. --- CMakeLists.txt | 215 ++++++++++-------- arm-multilib/CMakeLists.txt | 50 ++-- ...rmv8.1m.main_hard_fp_nomve_pacret_bti.json | 2 +- ...ain_hard_fp_nomve_pacret_bti_exn_rtti.json | 2 +- ...v8.1m.main_hard_fpdp_nomve_pacret_bti.json | 2 +- ...n_hard_fpdp_nomve_pacret_bti_exn_rtti.json | 2 +- ...rmv8.1m.main_hard_nofp_mve_pacret_bti.json | 2 +- ...ain_hard_nofp_mve_pacret_bti_exn_rtti.json | 2 +- ...v8.1m.main_soft_nofp_nomve_pacret_bti.json | 2 +- ...n_soft_nofp_nomve_pacret_bti_exn_rtti.json | 2 +- arm-runtimes/CMakeLists.txt | 12 +- 11 files changed, 164 insertions(+), 129 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f32aa7..b24a36b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,6 +150,10 @@ option( "During checkout, apply optional downstream patches to llvm-project to improve performance." ) +option( + ENABLE_FVP_TESTING + "Tests using FVP need to be explictly enabled." +) set( FVP_INSTALL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/fvp/install" CACHE STRING @@ -516,17 +520,10 @@ add_dependencies( version_txt ) -if(LIBS_DEPEND_ON_TOOLS) - set(lib_tool_dependencies - clang - lld - llvm-ar - llvm-config - llvm-nm - llvm-ranlib - llvm-strip - ) -endif() +# Set LLVM_DEFAULT_EXTERNAL_LIT to the directory of clang +# which was build in previous step. This path is not exported +# by add_subdirectory of llvm project +set(LLVM_DEFAULT_EXTERNAL_LIT "${LLVM_BINARY_DIR}/bin/llvm-lit") add_custom_target(check-llvm-toolchain-runtimes) add_custom_target(check-${LLVM_TOOLCHAIN_C_LIBRARY}) @@ -535,116 +532,138 @@ add_custom_target(check-cxx) add_custom_target(check-cxxabi) add_custom_target(check-unwind) -add_dependencies( - check-llvm-toolchain-runtimes - check-${LLVM_TOOLCHAIN_C_LIBRARY} - check-compiler-rt - check-cxx - check-cxxabi - check-unwind -) +if(NOT PREBUILT_TARGET_LIBRARIES) + if(LIBS_DEPEND_ON_TOOLS) + set(lib_tool_dependencies + clang + lld + llvm-ar + llvm-config + llvm-nm + llvm-ranlib + llvm-strip + ) + endif() -if(LLVM_TOOLCHAIN_LIBRARY_OVERLAY_INSTALL) - # If we're building a non-default libc with the intention of - # installing it as an overlay on the main package archive, then - # all of its includes, libraries and multilib.yaml go in a - # subdirectory of lib/clang-runtimes. Configuration files in the - # bin directory will make it easy to reset the sysroot to point at - # that subdir. - set(library_subdir "/${LLVM_TOOLCHAIN_C_LIBRARY}") -else() - set(library_subdir "") -endif() -if(LIBS_USE_COMPILER_LAUNCHER) - if(CMAKE_C_COMPILER_LAUNCHER) - list(APPEND compiler_launcher_cmake_args "-DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER}") + add_dependencies( + check-llvm-toolchain-runtimes + check-${LLVM_TOOLCHAIN_C_LIBRARY} + check-compiler-rt + check-cxx + check-cxxabi + check-unwind + ) + + if(LLVM_TOOLCHAIN_LIBRARY_OVERLAY_INSTALL) + # If we're building a non-default libc with the intention of + # installing it as an overlay on the main package archive, then + # all of its includes, libraries and multilib.yaml go in a + # subdirectory of lib/clang-runtimes. Configuration files in the + # bin directory will make it easy to reset the sysroot to point at + # that subdir. + set(library_subdir "/${LLVM_TOOLCHAIN_C_LIBRARY}") + else() + set(library_subdir "") endif() - if(CMAKE_CXX_COMPILER_LAUNCHER) - list(APPEND compiler_launcher_cmake_args "-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}") + + if(LIBS_USE_COMPILER_LAUNCHER) + if(CMAKE_C_COMPILER_LAUNCHER) + list(APPEND compiler_launcher_cmake_args "-DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER}") + endif() + if(CMAKE_CXX_COMPILER_LAUNCHER) + list(APPEND compiler_launcher_cmake_args "-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}") + endif() endif() -endif() -ExternalProject_Add( - multilib-${LLVM_TOOLCHAIN_C_LIBRARY} - PREFIX ${CMAKE_BINARY_DIR}/multilib-builds - SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/arm-multilib - INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/llvm/${TARGET_LIBRARIES_DIR}${library_subdir} - DEPENDS ${lib_tool_dependencies} - CMAKE_ARGS - ${compiler_launcher_cmake_args} - -DC_LIBRARY=${LLVM_TOOLCHAIN_C_LIBRARY} - -DLLVM_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}/llvm - -DMULTILIB_JSON=${LLVM_TOOLCHAIN_MULTILIB_JSON} - -DENABLE_VARIANTS=${LLVM_TOOLCHAIN_LIBRARY_VARIANTS} - -DLIBC_HDRGEN=${LIBC_HDRGEN} - -DFVP_INSTALL_DIR=${FVP_INSTALL_DIR} - -DFVP_CONFIG_DIR=${CMAKE_CURRENT_SOURCE_DIR}/fvp/config - -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=${FETCHCONTENT_SOURCE_DIR_LLVMPROJECT} - -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=${FETCHCONTENT_SOURCE_DIR_PICOLIBC} - -DFETCHCONTENT_SOURCE_DIR_NEWLIB=${FETCHCONTENT_SOURCE_DIR_NEWLIB} - -DCMAKE_INSTALL_PREFIX= - USES_TERMINAL_CONFIGURE FALSE - USES_TERMINAL_BUILD TRUE - USES_TERMINAL_TEST TRUE - LIST_SEPARATOR , - CONFIGURE_HANDLED_BY_BUILD TRUE - TEST_EXCLUDE_FROM_MAIN TRUE - STEP_TARGETS build install -) + # ENABLE_VARIANTS expects a semi-colon separated list. + # To prevent CMake expanding it automatically while passing it + # down, switch to comma separated. Enabling the ExternalProject + # LIST_SEPARATOR option will handle switching it back. + string(REPLACE ";" "," ENABLE_VARIANTS_PASSTHROUGH "${LLVM_TOOLCHAIN_LIBRARY_VARIANTS}") -add_dependencies( - llvm-toolchain-runtimes - multilib-${LLVM_TOOLCHAIN_C_LIBRARY}-install -) - -foreach(check_target check-${LLVM_TOOLCHAIN_C_LIBRARY} check-compiler-rt check-cxx check-cxxabi check-unwind) - ExternalProject_Add_Step( + ExternalProject_Add( multilib-${LLVM_TOOLCHAIN_C_LIBRARY} - ${check_target} - COMMAND "${CMAKE_COMMAND}" --build --target ${check_target} - USES_TERMINAL TRUE - EXCLUDE_FROM_MAIN TRUE - ALWAYS TRUE + PREFIX ${CMAKE_BINARY_DIR}/multilib-builds + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/arm-multilib + INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/llvm/${TARGET_LIBRARIES_DIR}${library_subdir} + DEPENDS ${lib_tool_dependencies} + CMAKE_ARGS + ${compiler_launcher_cmake_args} + -DC_LIBRARY=${LLVM_TOOLCHAIN_C_LIBRARY} + -DLLVM_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}/llvm + -DMULTILIB_JSON=${LLVM_TOOLCHAIN_MULTILIB_JSON} + -DENABLE_VARIANTS=${ENABLE_VARIANTS_PASSTHROUGH} + -DLIBC_HDRGEN=${LIBC_HDRGEN} + -DFVP_INSTALL_DIR=${FVP_INSTALL_DIR} + -DENABLE_FVP_TESTING=${ENABLE_FVP_TESTING} + -DFVP_CONFIG_DIR=${CMAKE_CURRENT_SOURCE_DIR}/fvp/config + -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=${FETCHCONTENT_SOURCE_DIR_LLVMPROJECT} + -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=${FETCHCONTENT_SOURCE_DIR_PICOLIBC} + -DFETCHCONTENT_SOURCE_DIR_NEWLIB=${FETCHCONTENT_SOURCE_DIR_NEWLIB} + -DCMAKE_INSTALL_PREFIX= + USES_TERMINAL_CONFIGURE FALSE + USES_TERMINAL_BUILD TRUE + USES_TERMINAL_TEST TRUE + LIST_SEPARATOR , + CONFIGURE_HANDLED_BY_BUILD TRUE + TEST_EXCLUDE_FROM_MAIN TRUE + STEP_TARGETS build install ) - ExternalProject_Add_StepTargets(multilib-${LLVM_TOOLCHAIN_C_LIBRARY} ${check_target}) - ExternalProject_Add_StepDependencies( - multilib-${LLVM_TOOLCHAIN_C_LIBRARY} - ${check_target} + + add_dependencies( + llvm-toolchain-runtimes multilib-${LLVM_TOOLCHAIN_C_LIBRARY}-install ) - add_dependencies(${check_target} multilib-${LLVM_TOOLCHAIN_C_LIBRARY}-${check_target}) -endforeach() - -# Read the json to generate variant specific target names for convenience. -file(READ ${LLVM_TOOLCHAIN_MULTILIB_JSON} multilib_json_str) -string(JSON multilib_defs GET ${multilib_json_str} "libs") -string(JSON lib_count LENGTH ${multilib_defs}) -math(EXPR lib_count_dec "${lib_count} - 1") - -foreach(lib_idx RANGE ${lib_count_dec}) - string(JSON lib_def GET ${multilib_defs} ${lib_idx}) - string(JSON variant GET ${lib_def} "variant") foreach(check_target check-${LLVM_TOOLCHAIN_C_LIBRARY} check-compiler-rt check-cxx check-cxxabi check-unwind) ExternalProject_Add_Step( multilib-${LLVM_TOOLCHAIN_C_LIBRARY} - ${check_target}-${variant} - COMMAND "${CMAKE_COMMAND}" --build --target ${check_target}-${variant} + ${check_target} + COMMAND "${CMAKE_COMMAND}" --build --target ${check_target} USES_TERMINAL TRUE EXCLUDE_FROM_MAIN TRUE ALWAYS TRUE ) - ExternalProject_Add_StepTargets(multilib-${LLVM_TOOLCHAIN_C_LIBRARY} ${check_target}-${variant}) + ExternalProject_Add_StepTargets(multilib-${LLVM_TOOLCHAIN_C_LIBRARY} ${check_target}) ExternalProject_Add_StepDependencies( multilib-${LLVM_TOOLCHAIN_C_LIBRARY} - ${check_target}-${variant} + ${check_target} multilib-${LLVM_TOOLCHAIN_C_LIBRARY}-install ) - add_custom_target(${check_target}-${variant}) - add_dependencies(${check_target}-${variant} multilib-${LLVM_TOOLCHAIN_C_LIBRARY}-${check_target}-${variant}) + add_dependencies(${check_target} multilib-${LLVM_TOOLCHAIN_C_LIBRARY}-${check_target}) endforeach() -endforeach() + + # Read the json to generate variant specific target names for convenience. + file(READ ${LLVM_TOOLCHAIN_MULTILIB_JSON} multilib_json_str) + string(JSON multilib_defs GET ${multilib_json_str} "libs") + + string(JSON lib_count LENGTH ${multilib_defs}) + math(EXPR lib_count_dec "${lib_count} - 1") + + foreach(lib_idx RANGE ${lib_count_dec}) + string(JSON lib_def GET ${multilib_defs} ${lib_idx}) + string(JSON variant GET ${lib_def} "variant") + foreach(check_target check-${LLVM_TOOLCHAIN_C_LIBRARY} check-compiler-rt check-cxx check-cxxabi check-unwind) + ExternalProject_Add_Step( + multilib-${LLVM_TOOLCHAIN_C_LIBRARY} + ${check_target}-${variant} + COMMAND "${CMAKE_COMMAND}" --build --target ${check_target}-${variant} + USES_TERMINAL TRUE + EXCLUDE_FROM_MAIN TRUE + ALWAYS TRUE + ) + ExternalProject_Add_StepTargets(multilib-${LLVM_TOOLCHAIN_C_LIBRARY} ${check_target}-${variant}) + ExternalProject_Add_StepDependencies( + multilib-${LLVM_TOOLCHAIN_C_LIBRARY} + ${check_target}-${variant} + multilib-${LLVM_TOOLCHAIN_C_LIBRARY}-install + ) + add_custom_target(${check_target}-${variant}) + add_dependencies(${check_target}-${variant} multilib-${LLVM_TOOLCHAIN_C_LIBRARY}-${check_target}-${variant}) + endforeach() + endforeach() +endif() install( DIRECTORY ${LLVM_BINARY_DIR}/${TARGET_LIBRARIES_DIR}/. diff --git a/arm-multilib/CMakeLists.txt b/arm-multilib/CMakeLists.txt index a27bf75..62a3513 100644 --- a/arm-multilib/CMakeLists.txt +++ b/arm-multilib/CMakeLists.txt @@ -33,6 +33,10 @@ set(C_LIBRARY "picolibc" CACHE STRING "Which C library to use.") set_property(CACHE C_LIBRARY PROPERTY STRINGS picolibc newlib llvmlibc) set(LLVM_BINARY_DIR "" CACHE PATH "Path to LLVM toolchain build or install root.") set(LIBC_HDRGEN "" CACHE PATH "Path to prebuilt lbc-hdrgen if not included in LLVM binaries set by LLVM_BINARY_DIR") +option( + ENABLE_FVP_TESTING + "Tests using FVP need to be explictly enabled." +) set( FVP_INSTALL_DIR "" CACHE STRING @@ -151,6 +155,34 @@ foreach(lib_idx RANGE ${lib_count_dec}) ) set(variant_json_file ${CMAKE_CURRENT_SOURCE_DIR}/json/variants/${variant_json}) + # Read info from the variant specific json. + file(READ ${variant_json_file} variant_json_str) + string(JSON test_executor GET ${variant_json_str} "args" "common" "TEST_EXECUTOR") + + # FVP testing should default to off, so override any + # settings from the JSON. + if(test_executor STREQUAL "fvp" AND NOT ${ENABLE_FVP_TESTING}) + set(additional_cmake_args "-DENABLE_LIBC_TESTS=OFF" "-DENABLE_COMPILER_RT_TESTS=OFF" "-DENABLE_LIBCXX_TESTS=OFF") + set(read_ENABLE_LIBC_TESTS "OFF") + set(read_ENABLE_COMPILER_RT_TESTS "OFF") + set(read_ENABLE_LIBCXX_TESTS "OFF") + else() + # From the json, check which tests are enabled. + foreach(test_enable_var + ENABLE_LIBC_TESTS + ENABLE_COMPILER_RT_TESTS + ENABLE_LIBCXX_TESTS + ) + string(JSON read_${test_enable_var} ERROR_VARIABLE json_error GET ${variant_json_str} "args" ${C_LIBRARY} ${test_enable_var}) + if(read_${test_enable_var} STREQUAL "json-NOTFOUND") + string(JSON read_${test_enable_var} ERROR_VARIABLE json_error GET ${variant_json_str} "args" "common" ${test_enable_var}) + if(read_${test_enable_var} STREQUAL "json-NOTFOUND") + set(read_${test_enable_var} "OFF") + endif() + endif() + endforeach() + endif() + ExternalProject_Add( runtimes-${variant} PREFIX ${CMAKE_BINARY_DIR}/lib-builds @@ -160,6 +192,7 @@ foreach(lib_idx RANGE ${lib_count_dec}) CMAKE_ARGS ${compiler_launcher_cmake_args} ${passthrough_dirs} + ${additional_cmake_args} -DVARIANT_JSON=${variant_json_file} -DC_LIBRARY=${C_LIBRARY} -DCMAKE_INSTALL_PREFIX= @@ -171,23 +204,6 @@ foreach(lib_idx RANGE ${lib_count_dec}) CONFIGURE_HANDLED_BY_BUILD TRUE TEST_EXCLUDE_FROM_MAIN TRUE ) - - # Read info from the variant specific json. - # From the json, check which tests are enabled. - file(READ ${variant_json_file} variant_json_str) - foreach(test_enable_var - ENABLE_LIBC_TESTS - ENABLE_COMPILER_RT_TESTS - ENABLE_LIBCXX_TESTS - ) - string(JSON read_${test_enable_var} ERROR_VARIABLE json_error GET ${variant_json_str} "args" ${C_LIBRARY} ${test_enable_var}) - if(read_${test_enable_var} STREQUAL "json-NOTFOUND") - string(JSON read_${test_enable_var} ERROR_VARIABLE json_error GET ${variant_json_str} "args" "common" ${test_enable_var}) - if(read_${test_enable_var} STREQUAL "json-NOTFOUND") - set(read_${test_enable_var} "OFF") - endif() - endif() - endforeach() set(check_targets "") if(read_ENABLE_LIBC_TESTS) list(APPEND check_targets check-${C_LIBRARY}) diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti.json b/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti.json index 38310c4..8e9e8f7 100644 --- a/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti.json +++ b/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti.json @@ -20,7 +20,7 @@ "picolibc": { "PICOLIBC_BUILD_TYPE": "release", "ENABLE_CXX_LIBS": "ON", - "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_LIBC_TESTS": "ON", "ENABLE_COMPILER_RT_TESTS": "OFF", "ENABLE_LIBCXX_TESTS": "OFF" }, diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti_exn_rtti.json b/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti_exn_rtti.json index c0f3677..ec4110e 100644 --- a/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti_exn_rtti.json +++ b/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti_exn_rtti.json @@ -20,7 +20,7 @@ "picolibc": { "PICOLIBC_BUILD_TYPE": "release", "ENABLE_CXX_LIBS": "ON", - "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_LIBC_TESTS": "ON", "ENABLE_COMPILER_RT_TESTS": "OFF", "ENABLE_LIBCXX_TESTS": "OFF" }, diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti.json b/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti.json index d51f220..24fd0d0 100644 --- a/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti.json +++ b/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti.json @@ -20,7 +20,7 @@ "picolibc": { "PICOLIBC_BUILD_TYPE": "release", "ENABLE_CXX_LIBS": "ON", - "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_LIBC_TESTS": "ON", "ENABLE_COMPILER_RT_TESTS": "OFF", "ENABLE_LIBCXX_TESTS": "OFF" }, diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti_exn_rtti.json b/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti_exn_rtti.json index 0b221cd..cef3207 100644 --- a/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti_exn_rtti.json +++ b/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti_exn_rtti.json @@ -20,7 +20,7 @@ "picolibc": { "PICOLIBC_BUILD_TYPE": "release", "ENABLE_CXX_LIBS": "ON", - "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_LIBC_TESTS": "ON", "ENABLE_COMPILER_RT_TESTS": "OFF", "ENABLE_LIBCXX_TESTS": "OFF" }, diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti.json b/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti.json index 58c219b..3ac88c1 100644 --- a/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti.json +++ b/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti.json @@ -20,7 +20,7 @@ "picolibc": { "PICOLIBC_BUILD_TYPE": "release", "ENABLE_CXX_LIBS": "ON", - "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_LIBC_TESTS": "ON", "ENABLE_COMPILER_RT_TESTS": "OFF", "ENABLE_LIBCXX_TESTS": "OFF" }, diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti_exn_rtti.json b/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti_exn_rtti.json index 34ea6ac..40b8811 100644 --- a/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti_exn_rtti.json +++ b/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti_exn_rtti.json @@ -20,7 +20,7 @@ "picolibc": { "PICOLIBC_BUILD_TYPE": "release", "ENABLE_CXX_LIBS": "ON", - "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_LIBC_TESTS": "ON", "ENABLE_COMPILER_RT_TESTS": "OFF", "ENABLE_LIBCXX_TESTS": "OFF" }, diff --git a/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti.json b/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti.json index 599df22..711e65f 100644 --- a/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti.json +++ b/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti.json @@ -20,7 +20,7 @@ "picolibc": { "PICOLIBC_BUILD_TYPE": "release", "ENABLE_CXX_LIBS": "ON", - "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_LIBC_TESTS": "ON", "ENABLE_COMPILER_RT_TESTS": "OFF", "ENABLE_LIBCXX_TESTS": "OFF" }, diff --git a/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti_exn_rtti.json b/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti_exn_rtti.json index e7bddab..451889a 100644 --- a/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti_exn_rtti.json +++ b/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti_exn_rtti.json @@ -20,7 +20,7 @@ "picolibc": { "PICOLIBC_BUILD_TYPE": "release", "ENABLE_CXX_LIBS": "ON", - "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_LIBC_TESTS": "ON", "ENABLE_COMPILER_RT_TESTS": "OFF", "ENABLE_LIBCXX_TESTS": "OFF" }, diff --git a/arm-runtimes/CMakeLists.txt b/arm-runtimes/CMakeLists.txt index 1d7e98a..3208fd1 100644 --- a/arm-runtimes/CMakeLists.txt +++ b/arm-runtimes/CMakeLists.txt @@ -313,7 +313,7 @@ if(ENABLE_COMPILER_RT_TESTS) COMMAND "${CMAKE_COMMAND}" --build --target check-compiler-rt COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-support/modify-compiler-rt-xml.py - --compiler-rt-build-dir + --dir --variant ${VARIANT} USES_TERMINAL TRUE EXCLUDE_FROM_MAIN TRUE @@ -431,7 +431,7 @@ if(C_LIBRARY STREQUAL picolibc) COMMAND ${MESON_EXECUTABLE} test -C COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test-support/modify-picolibc-xml.py - --picolibc-build-dir + --dir --variant ${VARIANT} USES_TERMINAL TRUE EXCLUDE_FROM_MAIN TRUE @@ -676,10 +676,10 @@ if(ENABLE_CXX_LIBS) -DLIBCXX_ENABLE_THREADS=OFF -DLIBCXX_ENABLE_WIDE_CHARACTERS=OFF -DLIBUNWIND_ENABLE_THREADS=OFF - -DLIBCXXABI_ENABLE_EXCEPTIONS=${enable_exceptions} - -DLIBCXXABI_ENABLE_STATIC_UNWINDER=${enable_exceptions} - -DLIBCXX_ENABLE_EXCEPTIONS=${enable_exceptions} - -DLIBCXX_ENABLE_RTTI=${enable_rtti} + -DLIBCXXABI_ENABLE_EXCEPTIONS=${ENABLE_EXCEPTIONS} + -DLIBCXXABI_ENABLE_STATIC_UNWINDER=${ENABLE_EXCEPTIONS} + -DLIBCXX_ENABLE_EXCEPTIONS=${ENABLE_EXCEPTIONS} + -DLIBCXX_ENABLE_RTTI=${ENABLE_RTTI} ) if(ENABLE_LIBCXX_TESTS) set(cxxlibs_lit_args "${LLVM_LIT_ARGS} --xunit-xml-output=results.junit.xml") From 6209eba84a777c8f7049a807967d037d867fc57a Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 21 Nov 2024 11:04:10 +0000 Subject: [PATCH 14/16] CMakeLists.txt: tiny fix to instructions comment. (#573) Now that our downstream picolibc changes are in the form of multiple patches in a subdirectory, it's better to apply them with 'git am' so they turn into separate commits, instead of 'git apply', the same way we do it for llvm-project. --- CMakeLists.txt | 2 +- docs/building-from-source.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b24a36b..b894284 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,7 +47,7 @@ # git -C repos clone https://github.com/llvm/llvm-project.git # git -C repos/llvm-project am -k $PWD/patches/llvm-project/*.patch # git -C repos clone https://github.com/picolibc/picolibc.git -# git -C repos/picolibc apply $PWD/patches/picolibc/*.patch +# git -C repos/picolibc am -k $PWD/patches/picolibc/*.patch # mkdir build # cd build # cmake .. -GNinja -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=../repos/llvm-project -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=../repos/picolibc diff --git a/docs/building-from-source.md b/docs/building-from-source.md index 8bf5cd5..9dcf602 100644 --- a/docs/building-from-source.md +++ b/docs/building-from-source.md @@ -89,7 +89,7 @@ mkdir repos git -C repos clone https://github.com/llvm/llvm-project.git git -C repos/llvm-project am -k "$PWD"/patches/llvm-project/*.patch git -C repos clone https://github.com/picolibc/picolibc.git -git -C repos/picolibc apply "$PWD"/patches/picolibc/*.patch +git -C repos/picolibc am -k "$PWD"/patches/picolibc/*.patch mkdir build cd build cmake .. -GNinja -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=../repos/llvm-project -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=../repos/picolibc From d0b2af2736afdf3b001bc5a2bd27dc5e83db14a1 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 21 Nov 2024 17:08:42 +0000 Subject: [PATCH 15/16] Docs fixes for arm-runtimes and arm-multilib sub-builds. (#575) The suggested build commands left out the usual `cd` after `mkdir`, so that if you followed them literally, you'd create an `arm-runtimes` or `arm-multilib` directory and then ignore it completely and put all your build debris at the level above it. Also, trying to follow the instructions, I was confused by the semantics of `LLVM_BINARY_DIR`: given the name, I instinctively pointed it at the actual `bin` directory, but it turned out I should have aimed one level up. Added some clarifying text, with particular reference to using a full build of this toolchain for a standalone build of one library. While I'm here, removed some apparently accidental physical tabs, so that all the continuation lines in the long cmake commands line up. --- docs/building-from-source.md | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/docs/building-from-source.md b/docs/building-from-source.md index 9dcf602..c5baad8 100644 --- a/docs/building-from-source.md +++ b/docs/building-from-source.md @@ -171,7 +171,13 @@ format in the arm-multilib/json/variants folder, which can be loaded at configuration with the `-DVARIANT_JSON` setting. Any additional options provided on the command line will override values from he JSON. `-DC_LIBRARY` will be required to set which library to build, and `-DLLVM_BINARY_DIR` should -point to a build or install of LLVM. +point to the top-level directory of a build or install of LLVM. + +(The actual binaries, such as `clang`, are expected to be in +`$LLVM_BINARY_DIR/bin`, not `$LLVM_BINARY_DIR` itself. For example, if you're +using the results of a full build of this toolchain itself in another +directory, then you should set `LLVM_BINARY_DIR` to point at the `llvm` +subdirectory of the previous build tree, not the `llvm/bin` subdirectory.) For example, to build the `armv7a_soft_nofp` variant using `picolibc`, using an existing LLVM build and source checkouts: @@ -179,12 +185,13 @@ an existing LLVM build and source checkouts: ``` cd LLVM-embedded-toolchain-for-Arm mkdir build-lib +cd build-lib cmake ../arm-runtimes -G Ninja \ -DVARIANT_JSON=../arm-multilib/json/variants/armv7a_soft_nofp.json \ - -DC_LIBRARY=picolibc \ - -DLLVM_BINARY_DIR=/path/to/llvm \ - -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=/path/to/llvm-project \ - -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=/path/to/picolibc + -DC_LIBRARY=picolibc \ + -DLLVM_BINARY_DIR=/path/to/llvm \ + -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=/path/to/llvm-project \ + -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=/path/to/picolibc ninja ``` @@ -213,12 +220,13 @@ source checkouts: ``` cd LLVM-embedded-toolchain-for-Arm mkdir build-multilib +cd build-multilib cmake ../arm-multilib -G Ninja \ -DMULTILIB_JSON=../arm-multilib/json/multilib.json \ - -DC_LIBRARY=picolibc \ - -DLLVM_BINARY_DIR=/path/to/llvm \ - -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=/path/to/llvm-project \ - -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=/path/to/picolibc + -DC_LIBRARY=picolibc \ + -DLLVM_BINARY_DIR=/path/to/llvm \ + -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=/path/to/llvm-project \ + -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=/path/to/picolibc ninja ``` To only build a subset of the variants defined in the JSON file, From 327f60ce3132799455b492cdfa8c8cca8fc447f5 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Mon, 25 Nov 2024 13:28:39 +0000 Subject: [PATCH 16/16] Permit FVP tests to return a useful exit status. (#576) This allows picolibc tests to mark themselves as "skipped" by returning the special exit code 77. Previously that didn't work in an FVP test run, so those tests are marked as failed rather than skipped. In particular, test-sprintf-percent-n was affected, because we build picolibc in a mode that doesn't support printf("%n"), and that test knew it and was trying to return "skipped". Background: Fast Models does support the SYS_EXIT_EXTENDED semihosting request, which allows specifying an exit status. But it doesn't support the ":semihosting-features" pseudo-file that advertises support for non-default semihosting features including that one. So picolibc wrongly believes that SYS_EXIT_EXTENDED doesn't work, and doesn't try it. This commit works around that lack of support by simply creating a _real_ file called ":semihosting-features" in the directory where the model will run. Then picolibc does find it, and learns from it that it's allowed to SYS_EXIT_EXTENDED. This makes test-sprintf-percent-n stop failing. It also means we can remove the semihost-exit-extended test from the list of tests specially disabled on FVP runs, because now it works. --- arm-runtimes/test-support/picolibc-test-wrapper.py | 2 -- arm-runtimes/test-support/run_fvp.py | 12 ++++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/arm-runtimes/test-support/picolibc-test-wrapper.py b/arm-runtimes/test-support/picolibc-test-wrapper.py index 2451599..e391e69 100755 --- a/arm-runtimes/test-support/picolibc-test-wrapper.py +++ b/arm-runtimes/test-support/picolibc-test-wrapper.py @@ -40,8 +40,6 @@ ] disabled_tests_fvp = [ - # SDDKW-53824: ":semihosting-features" pseudo-file not implemented. - "test/semihost/semihost-exit-extended", # SDDKW-25808: SYS_SEEK returns wrong value. "test/semihost/semihost-seek", "test/test-fread-fwrite", diff --git a/arm-runtimes/test-support/run_fvp.py b/arm-runtimes/test-support/run_fvp.py index 1a882d2..2822f0b 100755 --- a/arm-runtimes/test-support/run_fvp.py +++ b/arm-runtimes/test-support/run_fvp.py @@ -67,6 +67,18 @@ def run_fvp( if verbose: print("running: {}".format(shlex.join(command))) + # SDDKW-53824: the ":semihosting-features" pseudo-file isn't simulated + # by these models. To work around that, we create one ourselves in the + # test process's working directory, containing the single feature flag + # SH_EXT_EXIT_EXTENDED, meaning that the SYS_EXIT_EXTENDED semihosting + # request will work. This permits the test program's exit status to be + # propagated to the exit status of the FVP, so that tests returning 77 + # for "test skipped" can be automatically detected. + with open( + path.join(working_directory, ":semihosting-features"), "wb" + ) as fh: + fh.write(b"SHFB\x01") + result = subprocess.run( command, stdout=subprocess.PIPE,