Skip to content

Commit

Permalink
add ExclusiveGroup feature to multilib.yaml.
Browse files Browse the repository at this point in the history
The armv7m.test test was wrong in that when -mfpu=none
or -mfloat-abi=softfp is used, only the armv7m_soft_nofp
variant should be selected.

The new ExclusiveGroup: stdlibs flag would result that
only one variant will be selected for other tests too.
So use <prefix>-EMPTY: checks to verify.
  • Loading branch information
amilendra committed Sep 28, 2023
1 parent 8e82341 commit ac09ed9
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 2 deletions.
1 change: 1 addition & 0 deletions test/multilib/aarch64.test
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# RUN: %clang -print-multi-directory --target=aarch64-none-elf | FileCheck %s
# CHECK: aarch64-none-elf/aarch64
# CHECK-EMPTY:
1 change: 1 addition & 0 deletions test/multilib/armv4t.test
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# RUN: %clang -print-multi-directory --target=arm-none-eabi -mfpu=none | FileCheck %s
# CHECK: arm-none-eabi/armv4t
# CHECK-EMPTY:
1 change: 1 addition & 0 deletions test/multilib/armv5e.test
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# RUN: %clang -print-multi-directory --target=armv5e-none-eabi -mfpu=none | FileCheck %s
# CHECK: arm-none-eabi/armv5te
# CHECK-EMPTY:
1 change: 1 addition & 0 deletions test/multilib/armv6m.test
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# RUN: %clang -print-multi-directory --target=armv6m-none-eabi -mfpu=none | FileCheck %s
# CHECK: arm-none-eabi/armv6m_soft_nofp
# CHECK-EMPTY:
2 changes: 2 additions & 0 deletions test/multilib/armv7a.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=none | FileCheck %s
# CHECK: arm-none-eabi/armv7a_soft_nofp
# CHECK-EMPTY:

# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16 | FileCheck --check-prefix=VFPV3 %s
# VFPV3: arm-none-eabi/armv7a_hard_vfpv3_d16
# VFPV3-EMPTY:
3 changes: 3 additions & 0 deletions test/multilib/armv7em.test
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# RUN: %clang -print-multi-directory --target=armv7em-none-eabi -mfpu=none | FileCheck %s
# CHECK: arm-none-eabi/armv7em_soft_nofp
# CHECK-EMPTY:

# RUN: %clang -print-multi-directory --target=armv7em-none-eabihf -mfpu=fpv4-sp-d16 | FileCheck --check-prefix=FPV4 %s
# FPV4: arm-none-eabi/armv7em_hard_fpv4_sp_d16
# FPV4-EMPTY:

# RUN: %clang -print-multi-directory --target=armv7em-none-eabihf -mfpu=fpv5-d16 | FileCheck --check-prefix=FPV5 %s
# FPV5: arm-none-eabi/armv7em_hard_fpv5_d16
# FPV5-EMPTY:
7 changes: 5 additions & 2 deletions test/multilib/armv7m.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=none | FileCheck %s
# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=none -mfloat-abi=softfp | FileCheck %s
# CHECK: arm-none-eabi/armv7m_soft_nofp
# CHECK-EMPTY:

# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=none -mfloat-abi=softfp | FileCheck --check-prefix=SOFT_FPV4 %s
# SOFT_FPV4: arm-none-eabi/armv7m_soft_fpv4_sp_d16
# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=vfp -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-FPV4 %s
# SOFT-FPV4: arm-none-eabi/armv7m_soft_fpv4_sp_d16
# SOFT-FPV4-EMPTY:
2 changes: 2 additions & 0 deletions test/multilib/armv7r.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# RUN: %clang -print-multi-directory --target=armv7r-none-eabi -mfpu=none | FileCheck %s
# CHECK: arm-none-eabi/armv7r_soft_nofp
# CHECK-EMPTY:

# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 | FileCheck --check-prefix=VFPV3 %s
# VFPV3: arm-none-eabi/armv7r_hard_vfpv3_d16
# VFPV3-EMPTY:
4 changes: 4 additions & 0 deletions test/multilib/armv8.1m.main.test
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# RUN: %clang -print-multi-directory --target=armv8.1m.main-none-eabi -mfpu=none | FileCheck %s
# CHECK: arm-none-eabi/armv8.1m.main_soft_nofp
# CHECK-EMPTY:

# RUN: %clang -print-multi-directory --target=armv8.1m.main-none-eabihf -march=armv8.1m.main -mfpu=fp-armv8-fullfp16-sp-d16 | FileCheck --check-prefix=HARD_FP %s
# HARD_FP: arm-none-eabi/armv8.1m.main_hard_fp_nomve
# HARD_FP-EMPTY:

# RUN: %clang -print-multi-directory --target=armv8.1m.main-none-eabihf -march=armv8.1m.main -mfpu=fp-armv8-fullfp16-d16 | FileCheck --check-prefix=HARD_FPDP %s
# HARD_FPDP: arm-none-eabi/armv8.1m.main_hard_fpdp_nomve
# HARD_FPDP-EMPTY:

# RUN: %clang -print-multi-directory --target=armv8.1m.main-none-eabihf -march=armv8.1m.main+mve -mfpu=none | FileCheck --check-prefix=MVE %s
# MVE: arm-none-eabi/armv8.1m.main_hard_nofp_mve
# MVE-EMPTY:

# RUN: %clang -print-multi-flags-experimental --target=arm-none-eabihf -mcpu=cortex-m55 | FileCheck --check-prefix=CORTEXM55 %s
# CORTEXM55: -march=thumbv8.1m.main+fp16+lob+mve.fp
2 changes: 2 additions & 0 deletions test/multilib/armv8m.main.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# RUN: %clang -print-multi-directory --target=armv8m.main-none-eabi -mfpu=none | FileCheck %s
# CHECK: arm-none-eabi/armv8m.main_soft_nofp
# CHECK-EMPTY:

# RUN: %clang -print-multi-directory --target=armv8m.main-none-eabihf -mfpu=fpv5-sp-d16 | FileCheck --check-prefix=HARD %s
# HARD: arm-none-eabi/armv8m.main_hard_fp
# HARD-EMPTY:

0 comments on commit ac09ed9

Please sign in to comment.