| 1 | # UNSUPPORTED: system-windows |
| 2 | |
| 3 | # RUN: %clang --multi-lib-config=%s -no-canonical-prefixes -x c++ %s -### -o %t.out --target=thumbv7em-none-unknown-eabi --sysroot= 2>%t.err |
| 4 | |
| 5 | # RUN: FileCheck %s < %t.err --check-prefix=POS |
| 6 | # RUN: FileCheck %s < %t.err --check-prefix=NEG |
| 7 | |
| 8 | # Expected results: |
| 9 | # |
| 10 | # Due to the Mappings section, all six of these library directories should |
| 11 | # match the command-line flag --target=thumbv7em-none-unknown-eabi. |
| 12 | # |
| 13 | # The two "non_exclusive" directories, which don't have an ExclusiveGroup at |
| 14 | # all, should both be selected. So should the two "own_group", each of which |
| 15 | # specifies a different value of ExclusiveGroup. But the three "exclusive", |
| 16 | # which have the _same_ ExclusiveGroup value, should not: the third one wins. |
| 17 | # So we expect five of these seven directories to show up in the clang-cc1 |
| 18 | # command line, but not testdir1_exclusive or testdir2_exclusive. |
| 19 | |
| 20 | # POS-DAG: "-internal-isystem" "[[SYSROOT:[^"]*]]/bin/../lib/clang-runtimes/testdir1_non_exclusive/include/c++/v1" |
| 21 | # POS-DAG: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/testdir2_non_exclusive/include/c++/v1" |
| 22 | # POS-DAG: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/testdir3_exclusive/include/c++/v1" |
| 23 | # POS-DAG: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/testdir1_own_group/include/c++/v1" |
| 24 | # POS-DAG: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/testdir2_own_group/include/c++/v1" |
| 25 | |
| 26 | # NEG-NOT: "-internal-isystem" "{{[^"]*}}/bin/../lib/clang-runtimes/testdir1_exclusive/include/c++/v1" |
| 27 | # NEG-NOT: "-internal-isystem" "{{[^"]*}}/bin/../lib/clang-runtimes/testdir2_exclusive/include/c++/v1" |
| 28 | |
| 29 | --- |
| 30 | MultilibVersion: 1.0 |
| 31 | |
| 32 | Groups: |
| 33 | - Name: actually_exclude_something |
| 34 | Type: Exclusive |
| 35 | |
| 36 | - Name: foo |
| 37 | Type: Exclusive |
| 38 | |
| 39 | - Name: bar |
| 40 | Type: Exclusive |
| 41 | |
| 42 | Variants: |
| 43 | - Dir: testdir1_non_exclusive |
| 44 | Flags: [--target=thumbv7m-none-unknown-eabi] |
| 45 | |
| 46 | - Dir: testdir2_non_exclusive |
| 47 | Flags: [--target=thumbv7em-none-unknown-eabi] |
| 48 | |
| 49 | - Dir: testdir1_exclusive |
| 50 | Flags: [--target=thumbv7m-none-unknown-eabi] |
| 51 | Group: actually_exclude_something |
| 52 | |
| 53 | - Dir: testdir2_exclusive |
| 54 | Flags: [--target=thumbv7em-none-unknown-eabi] |
| 55 | Group: actually_exclude_something |
| 56 | |
| 57 | - Dir: testdir3_exclusive |
| 58 | Flags: [--target=thumbv7em-none-unknown-eabi] |
| 59 | Group: actually_exclude_something |
| 60 | |
| 61 | - Dir: testdir1_own_group |
| 62 | Flags: [--target=thumbv7m-none-unknown-eabi] |
| 63 | Group: foo |
| 64 | |
| 65 | - Dir: testdir2_own_group |
| 66 | Flags: [--target=thumbv7em-none-unknown-eabi] |
| 67 | Group: bar |
| 68 | |
| 69 | Mappings: |
| 70 | - Match: --target=thumbv7em-none-unknown-eabi |
| 71 | Flags: [--target=thumbv7m-none-unknown-eabi] |