Skip to content

Commit fd4abaa

Browse files
committed
Add explicit search paths into SDK as they aren't passed with non-darwin targets
1 parent aca254a commit fd4abaa

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

clang/test/ClangScanDeps/modules-in-sysroot.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// The first compilation verifies that transitive dependencies on non-sysroot input are captured.
55
// The second compilation verifies that external paths are resolved when a vfsoverlay is applied when considering sysroot-ness.
66

7+
// REQUIRES: shell
78
// RUN: rm -rf %t
89
// RUN: split-file %s %t
910
// RUN: sed -e "s|DIR|%/t|g" %t/compile-commands.json.in > %t/compile-commands.json
@@ -31,13 +32,13 @@
3132
[
3233
{
3334
"directory": "DIR",
34-
"command": "clang -c DIR/client.m -isysroot DIR/MacOSX.sdk -I DIR/BuildDir -fmodules -fmodules-cache-path=DIR/module-cache -fimplicit-module-maps",
35-
"file": "DIR/client.m"
35+
"command": "clang -c DIR/client.c -isysroot DIR/MacOSX.sdk -IDIR/MacOSX.sdk/usr/include -IDIR/BuildDir -fmodules -fmodules-cache-path=DIR/module-cache -fimplicit-module-maps",
36+
"file": "DIR/client.c"
3637
},
3738
{
3839
"directory": "DIR",
39-
"command": "clang -c DIR/client.m -isysroot DIR/MacOSX.sdk -ivfsoverlay DIR/overlay.json -DUSE_VFS -I DIR/BuildDir -fmodules -fmodules-cache-path=DIR/module-cache -fimplicit-module-maps",
40-
"file": "DIR/client.m"
40+
"command": "clang -c DIR/client.c -isysroot DIR/MacOSX.sdk -IDIR/MacOSX.sdk/usr/include -ivfsoverlay DIR/overlay.json -DUSE_VFS -IDIR/BuildDir -fmodules -fmodules-cache-path=DIR/module-cache -fimplicit-module-maps",
41+
"file": "DIR/client.c"
4142
}
4243
]
4344

@@ -102,6 +103,6 @@ module NotInSDK [system] {
102103
//--- BuildDir/HeaderNotFoundInSDK.h
103104
typedef int local_t;
104105

105-
//--- client.m
106+
//--- client.c
106107
#include <A/A.h>
107108
#include <B/B.h>

0 commit comments

Comments
 (0)