================
@@ -0,0 +1,43 @@
+// UNSUPPORTED: system-windows
+// RUN: rm -rf %t
+// RUN: split-file %s %t
+
+// Verify the stable dir path.
+//--- Sysroot/usr/include/SysA/module.modulemap
+module SysA {
+ header "SysA.h"
+}
+
+//--- Sysroot/usr/include/SysA/SysA.h
+int SysVal = 42;
+
+//--- cdb.json.template
+[{
+ "file": "",
+ "directory": "DIR",
+ "command": "clang -fmodules -fmodules-cache-path=DIR/cache -isysroot
DIR/Sysroot -IDIR/Sysroot/usr/include -x c"
+}]
----------------
jansvoboda11 wrote:
If you're invoking `clang-scan-deps` just once with a compilation database
containing single invocation, I suggest using this simpler form instead and
drop the `.template` file and the `sed` invocation:
```
clang-scan-deps -format experimental-full -module-names=SysA -o %t/result.json
-- %clang -fmodules -fmodules-cache-path=%t/cache -isysroot %t/Sysroot
-I%t/Sysroot/usr/include -x c
```
https://github.com/llvm/llvm-project/pull/168143
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits