CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
112 lines
2.9 KiB
C
112 lines
2.9 KiB
C
// Most likely platform specific sed differences
|
|
// UNSUPPORTED: system-windows
|
|
|
|
// This test verifies modules that are entirely comprised from stable directory inputs are captured in
|
|
// dependency information.
|
|
|
|
// The first compilation verifies that transitive dependencies on local input are captured.
|
|
// The second compilation verifies that external paths are resolved when a
|
|
// vfsoverlay for determining is-in-stable-directories.
|
|
|
|
// RUN: rm -rf %t
|
|
// RUN: split-file %s %t
|
|
// RUN: sed -e "s|DIR|%/t|g" %t/compile-commands.json.in > %t/compile-commands.json
|
|
// RUN: sed -e "s|DIR|%/t|g" %t/overlay.json.template > %t/overlay.json
|
|
// RUN: clang-scan-deps -compilation-database %t/compile-commands.json \
|
|
// RUN: -j 1 -format experimental-full > %t/deps.db
|
|
// RUN: cat %t/deps.db | sed 's:\\\\\?:/:g' | FileCheck %s -DPREFIX=%/t
|
|
|
|
// CHECK: "modules": [
|
|
// CHECK-NEXT: {
|
|
// CHECK: "is-in-stable-directories": true,
|
|
// CHECK: "name": "A"
|
|
|
|
// Verify that there are no more occurances of sysroot.
|
|
// CHECK-NOT: "is-in-stable-directories"
|
|
|
|
// CHECK: "name": "A"
|
|
// CHECK: "USE_VFS"
|
|
// CHECK: "name": "B"
|
|
// CHECK: "name": "C"
|
|
// CHECK: "name": "D"
|
|
// CHECK: "name": "NotInSDK"
|
|
|
|
//--- compile-commands.json.in
|
|
[
|
|
{
|
|
"directory": "DIR",
|
|
"command": "clang -c DIR/client.c -isysroot DIR/Sysroot -IDIR/Sysroot/usr/include -IDIR/BuildDir -fmodules -fmodules-cache-path=DIR/module-cache -fimplicit-module-maps",
|
|
"file": "DIR/client.c"
|
|
},
|
|
{
|
|
"directory": "DIR",
|
|
"command": "clang -c DIR/client.c -isysroot DIR/Sysroot -IDIR/Sysroot/usr/include -ivfsoverlay DIR/overlay.json -DUSE_VFS -IDIR/BuildDir -fmodules -fmodules-cache-path=DIR/module-cache -fimplicit-module-maps",
|
|
"file": "DIR/client.c"
|
|
}
|
|
]
|
|
|
|
//--- overlay.json.template
|
|
{
|
|
"version": 0,
|
|
"case-sensitive": "false",
|
|
"roots": [
|
|
{
|
|
"external-contents": "DIR/SysrootButNotReally/A/A_vfs.h",
|
|
"name": "DIR/Sysroot/usr/include/A/A_vfs.h",
|
|
"type": "file"
|
|
}
|
|
]
|
|
}
|
|
|
|
//--- Sysroot/usr/include/A/module.modulemap
|
|
module A {
|
|
umbrella "."
|
|
}
|
|
|
|
//--- Sysroot/usr/include/A/A.h
|
|
#ifdef USE_VFS
|
|
#include <A/A_vfs.h>
|
|
#endif
|
|
typedef int A_t;
|
|
|
|
//--- SysrootButNotReally/A/A_vfs.h
|
|
typedef int typeFromVFS;
|
|
|
|
//--- Sysroot/usr/include/B/module.modulemap
|
|
module B [system] {
|
|
umbrella "."
|
|
}
|
|
|
|
//--- Sysroot/usr/include/B/B.h
|
|
#include <C/C.h>
|
|
typedef int B_t;
|
|
|
|
//--- Sysroot/usr/include/C/module.modulemap
|
|
module C [system] {
|
|
umbrella "."
|
|
}
|
|
|
|
//--- Sysroot/usr/include/C/C.h
|
|
#include <D/D.h>
|
|
|
|
//--- Sysroot/usr/include/D/module.modulemap
|
|
module D [system] {
|
|
umbrella "."
|
|
}
|
|
|
|
// Simulate a header that will be resolved in a local directory, from a sysroot header.
|
|
//--- Sysroot/usr/include/D/D.h
|
|
#include <HeaderNotFoundInSDK.h>
|
|
|
|
//--- BuildDir/module.modulemap
|
|
module NotInSDK [system] {
|
|
umbrella "."
|
|
}
|
|
|
|
//--- BuildDir/HeaderNotFoundInSDK.h
|
|
typedef int local_t;
|
|
|
|
//--- client.c
|
|
#include <A/A.h>
|
|
#include <B/B.h>
|