|
1 | 1 | /// (Essentially identical to ps4-sdk-root.c except for the target.)
|
2 | 2 |
|
3 | 3 | /// PS5 clang emits warnings when SDK headers (<SDKROOT>/target/include/) or
|
4 |
| -/// libraries (<SDKROOT>/target/lib/) are missing, unless the user takes control |
5 |
| -/// of search paths, when corresponding existence checks are skipped. |
| 4 | +/// libraries (<SDKROOT>/target/lib/) are missing. If the the user takes control |
| 5 | +/// of header search paths, the existence check for <SDKROOT>/target/include is |
| 6 | +/// skipped. |
6 | 7 | ///
|
7 | 8 | /// User control of header search is assumed if `--sysroot`, `-isysroot`,
|
8 |
| -/// `-nostdinc` or `-nostdlibinc` is supplied. User control of library search |
9 |
| -/// is assumed if `--sysroot` is supplied. |
| 9 | +/// `-nostdinc` or `-nostdlibinc` is supplied. |
10 | 10 | ///
|
11 | 11 | /// Warnings are emitted if a specified `-isysroot` or `--sysroot` does not
|
12 | 12 | /// exist.
|
|
48 | 48 | // RUN: env SCE_PROSPERO_SDK_DIR=.. %clang @%t.rsp %s -c -isysroot . 2>&1 | FileCheck -check-prefixes=NO-WARN %s
|
49 | 49 | // RUN: env SCE_PROSPERO_SDK_DIR=.. %clang @%t.rsp %s -c --sysroot=. 2>&1 | FileCheck -check-prefixes=NO-WARN %s
|
50 | 50 |
|
51 |
| -/// --sysroot disables the existence check for libraries and headers. |
52 |
| -// RUN: env SCE_PROSPERO_SDK_DIR=.. %clang @%t.rsp %s --sysroot=. 2>&1 | FileCheck -check-prefix=NO-WARN %s |
| 51 | +/// --sysroot disables the existence check for headers. The check for libraries |
| 52 | +/// remains. |
| 53 | +// RUN: env SCE_PROSPERO_SDK_DIR=.. %clang @%t.rsp %s --sysroot=. 2>&1 | FileCheck -check-prefixes=WARN-SYS-LIBS,NO-WARN %s |
53 | 54 |
|
54 | 55 | /// -isysroot overrides --sysroot for header search, but not library search.
|
55 |
| -// RUN: env SCE_PROSPERO_SDK_DIR=.. %clang @%t.rsp %s -isysroot . --sysroot=.. 2>&1 | FileCheck -check-prefixes=ISYSTEM,NO-WARN %s |
56 |
| -// RUN: env SCE_PROSPERO_SDK_DIR=.. %clang @%t.rsp %s --sysroot=.. -isysroot . 2>&1 | FileCheck -check-prefixes=ISYSTEM,NO-WARN %s |
| 56 | +// RUN: env SCE_PROSPERO_SDK_DIR=.. %clang @%t.rsp %s -isysroot . --sysroot=%t.inconly 2>&1 | FileCheck -check-prefixes=ISYSTEM,WARN-SYS-LIBS,NO-WARN %s |
| 57 | +// RUN: env SCE_PROSPERO_SDK_DIR=.. %clang @%t.rsp %s --sysroot=%t.inconly -isysroot . 2>&1 | FileCheck -check-prefixes=ISYSTEM,WARN-SYS-LIBS,NO-WARN %s |
57 | 58 |
|
58 | 59 | /// Warnings are emitted if non-existent --sysroot/-isysroot are supplied.
|
59 |
| -// RUN: env SCE_PROSPERO_SDK_DIR=.. %clang @%t.rsp %s --sysroot=foo -isysroot . 2>&1 | FileCheck -check-prefixes=WARN-SYSROOT,NO-WARN %s |
60 |
| -// RUN: env SCE_PROSPERO_SDK_DIR=.. %clang @%t.rsp %s -isysroot foo --sysroot=. 2>&1 | FileCheck -check-prefixes=WARN-SYSROOT,NO-WARN %s |
61 |
| -// RUN: env SCE_PROSPERO_SDK_DIR=.. %clang @%t.rsp %s --sysroot=foo -isysroot bar 2>&1 | FileCheck -check-prefixes=WARN-SYSROOT,WARN-SYSROOT2,NO-WARN %s |
| 60 | +// RUN: env SCE_PROSPERO_SDK_DIR=.. %clang @%t.rsp %s --sysroot=foo -isysroot %t.both 2>&1 | FileCheck -check-prefixes=WARN-SYSROOT,WARN-SYS-LIBS,NO-WARN %s |
| 61 | +// RUN: env SCE_PROSPERO_SDK_DIR=.. %clang @%t.rsp %s -isysroot foo --sysroot=%t.both 2>&1 | FileCheck -check-prefixes=WARN-SYSROOT,NO-WARN %s |
| 62 | +// RUN: env SCE_PROSPERO_SDK_DIR=.. %clang @%t.rsp %s --sysroot=foo -isysroot bar 2>&1 | FileCheck -check-prefixes=WARN-SYSROOT,WARN-SYSROOT2,WARN-SYS-LIBS,NO-WARN %s |
62 | 63 |
|
63 | 64 | // NO-WARN-NOT: {{warning:|error:}}
|
64 |
| -// WARN-SYS-LIBS: warning: unable to find PS5 system libraries directory |
65 |
| -// WARN-SYS-HEADERS: warning: unable to find PS5 system headers directory |
66 | 65 | // WARN-SYSROOT: warning: no such sysroot directory: 'foo'
|
67 | 66 | // WARN-SYSROOT2: warning: no such sysroot directory: 'bar'
|
| 67 | +// WARN-SYS-LIBS: warning: unable to find PS5 system libraries directory |
| 68 | +// WARN-SYS-HEADERS: warning: unable to find PS5 system headers directory |
68 | 69 | // NO-WARN-NOT: {{warning:|error:}}
|
69 | 70 | // ISYSTEM: "-cc1"{{.*}}"-internal-externc-isystem" "./target/include"
|
0 commit comments