diff --git a/arm-software/embedded/arm-multilib/multilib.yaml.in b/arm-software/embedded/arm-multilib/multilib.yaml.in index 0ee3da373185..72104c628da7 100644 --- a/arm-software/embedded/arm-multilib/multilib.yaml.in +++ b/arm-software/embedded/arm-multilib/multilib.yaml.in @@ -42,6 +42,15 @@ Groups: Variants: @multilib_yaml_content@ +# Append an error case to the Variants list, matching anything that +# enables the RWPI option. We don't build any library variants using +# the RWPI style of access to writable static data, so if a user +# compiles with -frwpi, we don't have any compatible library. +- Error: Arm Toolchain for Embedded does not provide RWPI library variants + Flags: + - -frwpi + Group: stdlibs + Mappings: # Map higher architecture versions to subsets of them, so that a diff --git a/arm-software/embedded/test/multilib/rwpi.test b/arm-software/embedded/test/multilib/rwpi.test new file mode 100644 index 000000000000..3c8650abc673 --- /dev/null +++ b/arm-software/embedded/test/multilib/rwpi.test @@ -0,0 +1,8 @@ +# RUN: %clang -print-multi-directory --target=arm-none-eabi -march=armv7a 2>%t | FileCheck --check-prefix=NORWPI --allow-empty %s +# NORWPI: arm-none-eabi/armv7a_soft_vfpv3_d16_exn_rtti_unaligned{{$}} + +# RUN: not %clang -print-multi-directory --target=arm-none-eabi -march=armv7a -frwpi 2>%t | FileCheck --check-prefix=RWPI --allow-empty %s +# RUN: FileCheck --check-prefix=RWPI_ERR %s < %t +# RWPI-NOT: arm-none-eabi +# RWPI_ERR: clang: error: multilib configuration error: Arm Toolchain for Embedded does not provide RWPI library variants +