annotate clang/test/Driver/sysroot-flags.c @ 221:79ff65ed7e25

LLVM12 Original
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 15 Jun 2021 19:15:29 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // Check for proper handling of --sysroot and -isysroot flags.
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 // RUN: %clang -### -fsyntax-only -isysroot /foo/bar %s 2>&1 | \
anatofuz
parents:
diff changeset
4 // RUN: FileCheck %s -check-prefix=ISYSROOT
anatofuz
parents:
diff changeset
5 // ISYSROOT: "-isysroot" "{{[^"]*}}/foo/bar"
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 // Check that we get both isysroot for headers, and pass --sysroot on to GCC to
anatofuz
parents:
diff changeset
8 // produce the final binary.
anatofuz
parents:
diff changeset
9 // RUN: %clang -### -target x86_64-unknown-linux-gnu \
anatofuz
parents:
diff changeset
10 // RUN: --sysroot=/foo/bar -o /dev/null %s 2>&1 | \
anatofuz
parents:
diff changeset
11 // RUN: FileCheck %s -check-prefix=SYSROOT_EQ
anatofuz
parents:
diff changeset
12 // SYSROOT_EQ: "-isysroot" "{{[^"]*}}/foo/bar"
anatofuz
parents:
diff changeset
13 // SYSROOT_EQ: "--sysroot{{" "|=}}{{[^"]*}}/foo/bar"
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 // Check for overriding the header sysroot by providing both --sysroot and
anatofuz
parents:
diff changeset
16 // -isysroot.
anatofuz
parents:
diff changeset
17 // RUN: %clang -### -target x86_64-unknown-linux-gnu -isysroot /baz \
anatofuz
parents:
diff changeset
18 // RUN: --sysroot=/foo/bar -o /dev/null %s 2>&1 | FileCheck %s \
anatofuz
parents:
diff changeset
19 // RUN: -check-prefix=ISYSROOT_AND_SYSROOT
anatofuz
parents:
diff changeset
20 // ISYSROOT_AND_SYSROOT: "-isysroot" "{{[^"]*}}/baz"
anatofuz
parents:
diff changeset
21 // ISYSROOT_AND_SYSROOT: "--sysroot{{" "|=}}{{[^"]*}}/foo/bar"
anatofuz
parents:
diff changeset
22
anatofuz
parents:
diff changeset
23 // Check that omitting the equals works as well.
anatofuz
parents:
diff changeset
24 // RUN: %clang -### -target x86_64-unknown-linux-gnu \
anatofuz
parents:
diff changeset
25 // RUN: --sysroot /foo/bar -o /dev/null %s 2>&1 | \
anatofuz
parents:
diff changeset
26 // RUN: FileCheck %s -check-prefix=SYSROOT_SEPARATE
anatofuz
parents:
diff changeset
27 // SYSROOT_SEPARATE: "-isysroot" "{{[^"]*}}/foo/bar"
anatofuz
parents:
diff changeset
28 // SYSROOT_SEPARATE: "--sysroot{{" "|=}}{{[^"]*}}/foo/bar"