https://github.com/vhscampos created https://github.com/llvm/llvm-project/pull/123577
The test was failing in the case where a `multilib.yaml` file was present in the installation. This is because the presence of a multilib YAML file leads to the diagnosing of validity of the multilib custom flags. This patch fixes the test by creating a new YAML file with multilib custom flags to be used by the test. >From 51819f2931c1495d6fc0085a041b27810120df7c Mon Sep 17 00:00:00 2001 From: Victor Campos <victor.cam...@arm.com> Date: Fri, 17 Jan 2025 17:01:14 +0000 Subject: [PATCH] Fix test of `-print-multi-flags-experimental` in case of multilib custom flags The test was failing in the case where a `multilib.yaml` file was present in the installation. This is because the presence of a multilib YAML file leads to the diagnosing of validity of the multilib custom flags. This patch fixes the test by creating a new YAML file with multilib custom flags to be used by the test. --- .../Inputs/multilib/multilib-custom-flags.yaml | 13 +++++++++++++ clang/test/Driver/print-multi-selection-flags.c | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 clang/test/Driver/Inputs/multilib/multilib-custom-flags.yaml diff --git a/clang/test/Driver/Inputs/multilib/multilib-custom-flags.yaml b/clang/test/Driver/Inputs/multilib/multilib-custom-flags.yaml new file mode 100644 index 00000000000000..153680bce7b866 --- /dev/null +++ b/clang/test/Driver/Inputs/multilib/multilib-custom-flags.yaml @@ -0,0 +1,13 @@ +MultilibVersion: 1.0 + +Variants: + +Mappings: + +Flags: +- Name: flag + Values: + - Name: foo + - Name: bar + Default: foo +... diff --git a/clang/test/Driver/print-multi-selection-flags.c b/clang/test/Driver/print-multi-selection-flags.c index cf9522aa068524..5a35ae374f0113 100644 --- a/clang/test/Driver/print-multi-selection-flags.c +++ b/clang/test/Driver/print-multi-selection-flags.c @@ -91,8 +91,8 @@ // CHECK-RV32E-ORDER: -mabi=ilp32e // CHECK-RV32E-ORDER: -march=rv32e{{[0-9]+p[0-9]+}}_c{{[0-9]+p[0-9]+}}_zicsr{{[0-9]+p[0-9]+}} -// RUN: %clang -print-multi-flags-experimental --target=armv8m.main-none-eabi -fmultilib-flag=foo -fmultilib-flag=bar | FileCheck --check-prefixes=CHECK-MULTILIB-CUSTOM-FLAG,CHECK-ARM-MULTILIB-CUSTOM-FLAG %s -// RUN: %clang -print-multi-flags-experimental --target=aarch64-none-eabi -fmultilib-flag=foo -fmultilib-flag=bar | FileCheck --check-prefixes=CHECK-MULTILIB-CUSTOM-FLAG,CHECK-AARCH64-MULTILIB-CUSTOM-FLAG %s +// RUN: %clang -multi-lib-config=%S/Inputs/multilib/multilib-custom-flags.yaml -print-multi-flags-experimental --target=armv8m.main-none-eabi -fmultilib-flag=foo -fmultilib-flag=bar | FileCheck --check-prefixes=CHECK-MULTILIB-CUSTOM-FLAG,CHECK-ARM-MULTILIB-CUSTOM-FLAG %s +// RUN: %clang -multi-lib-config=%S/Inputs/multilib/multilib-custom-flags.yaml -print-multi-flags-experimental --target=aarch64-none-eabi -fmultilib-flag=foo -fmultilib-flag=bar | FileCheck --check-prefixes=CHECK-MULTILIB-CUSTOM-FLAG,CHECK-AARCH64-MULTILIB-CUSTOM-FLAG %s // CHECK-ARM-MULTILIB-CUSTOM-FLAG: --target=thumbv8m.main-unknown-none-eabi // CHECK-AARCH64-MULTILIB-CUSTOM-FLAG: --target=aarch64-unknown-none-eabi // CHECK-MULTILIB-CUSTOM-FLAG-DAG: -fmultilib-flag=foo _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits