| 1 |
# UNSUPPORTED: system-windows |
| 2 |
|
| 3 |
# This test demonstrates "layered" multilib in which more than one |
| 4 |
# multilib is matched. |
| 5 |
# For example a multilib containing only a no-exceptions libc++ could |
| 6 |
# be layered on top of a multilib containing C libs. This avoids the |
| 7 |
# need to duplicate the C library for every libc++ variant. |
| 8 |
# However -fno-exceptions is not yet supported for multilib selection |
| 9 |
# so we use a more contrived -mfloat-abi example instead. |
| 10 |
|
| 11 |
# RUN: %clang --multi-lib-config=%s -no-canonical-prefixes -x c++ %s -### -o %t.out 2>&1 \ |
| 12 |
# RUN: --target=thumbv7m-none-eabi -mfloat-abi=softfp --sysroot= \ |
| 13 |
# RUN: | FileCheck %s |
| 14 |
# CHECK: "-cc1" "-triple" "thumbv7m-unknown-none-eabi" |
| 15 |
# CHECK-SAME: "-internal-isystem" "[[SYSROOT:[^"]*]]/bin/../lib/clang-runtimes/softfp/include/c++/v1" |
| 16 |
# CHECK-SAME: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/soft/include/c++/v1" |
| 17 |
# CHECK-SAME: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/softfp/include" |
| 18 |
# CHECK-SAME: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/soft/include" |
| 19 |
# CHECK-NEXT: "-L[[SYSROOT]]/bin/../lib/clang-runtimes/softfp/lib" |
| 20 |
# CHECK-SAME: "-L[[SYSROOT]]/bin/../lib/clang-runtimes/soft/lib" |
| 21 |
|
| 22 |
# RUN: %clang --multi-lib-config=%s -no-canonical-prefixes -print-multi-directory 2>&1 \ |
| 23 |
# RUN: --target=arm-none-eabi -mfloat-abi=softfp --sysroot= \ |
| 24 |
# RUN: | FileCheck --check-prefix=CHECK-PRINT-MULTI-DIRECTORY %s |
| 25 |
# CHECK-PRINT-MULTI-DIRECTORY: soft |
| 26 |
# CHECK-PRINT-MULTI-DIRECTORY-NEXT: softfp |
| 27 |
|
| 28 |
--- |
| 29 |
MultilibVersion: 1.0 |
| 30 |
Variants: |
| 31 |
- Dir: soft |
| 32 |
Flags: [-mfloat-abi=soft] |
| 33 |
- Dir: softfp |
| 34 |
Flags: [-mfloat-abi=softfp] |
| 35 |
Mappings: |
| 36 |
- Match: -mfloat-abi=softfp |
| 37 |
Flags: [-mfloat-abi=soft] |
| 38 |
... |