Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Driver / baremetal-multilib-layered.yaml
blob2f86f8e3ea4f5f74fcb628036da74f07ccc0d77f
1 # REQUIRES: shell
2 # UNSUPPORTED: system-windows
4 # This test demonstrates "layered" multilib in which more than one
5 # multilib is matched.
6 # For example a multilib containing only a no-exceptions libc++ could
7 # be layered on top of a multilib containing C libs. This avoids the
8 # need to duplicate the C library for every libc++ variant.
9 # However -fno-exceptions is not yet supported for multilib selection
10 # so we use a more contrived -mfloat-abi example instead.
12 # RUN: rm -rf %T/baremetal_multilib_layered
13 # RUN: mkdir -p %T/baremetal_multilib_layered/bin
14 # RUN: mkdir -p %T/baremetal_multilib_layered/lib/clang-runtimes
15 # RUN: ln -s %clang %T/baremetal_multilib_layered/bin/clang
16 # RUN: ln -s %s %T/baremetal_multilib_layered/lib/clang-runtimes/multilib.yaml
18 # RUN: %T/baremetal_multilib_layered/bin/clang -no-canonical-prefixes -x c++ %s -### -o %t.out 2>&1 \
19 # RUN:     --target=thumbv7m-none-eabi -mfloat-abi=softfp --sysroot= \
20 # RUN:   | FileCheck -DSYSROOT=%T/baremetal_multilib_layered %s
21 # CHECK:      "-cc1" "-triple" "thumbv7m-none-unknown-eabi"
22 # CHECK-SAME: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/softfp/include/c++/v1"
23 # CHECK-SAME: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/soft/include/c++/v1"
24 # CHECK-SAME: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/softfp/include"
25 # CHECK-SAME: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/soft/include"
26 # CHECK-NEXT: "-L[[SYSROOT]]/bin/../lib/clang-runtimes/softfp/lib"
27 # CHECK-SAME: "-L[[SYSROOT]]/bin/../lib/clang-runtimes/soft/lib"
29 # RUN: %T/baremetal_multilib_layered/bin/clang -no-canonical-prefixes -print-multi-directory 2>&1 \
30 # RUN:     --target=arm-none-eabi -mfloat-abi=softfp --sysroot= \
31 # RUN:   | FileCheck --check-prefix=CHECK-PRINT-MULTI-DIRECTORY %s
32 # CHECK-PRINT-MULTI-DIRECTORY:      soft
33 # CHECK-PRINT-MULTI-DIRECTORY-NEXT: softfp
35 ---
36 MultilibVersion: 1.0
37 Variants:
38 - Dir: soft
39   Flags: [-mfloat-abi=soft]
40 - Dir: softfp
41   Flags: [-mfloat-abi=softfp]
42 Mappings:
43 - Match: -mfloat-abi=softfp
44   Flags: [-mfloat-abi=soft]
45 ...