Debian Codegraph @

clang/test/Driver/baremetal-multilib-exclusive-group.yaml

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