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
141 lines
4.1 KiB
C
141 lines
4.1 KiB
C
/// Most likely platform specific sed differences
|
|
// UNSUPPORTED: system-windows
|
|
|
|
/// This test validates that modules that depend on prebuilt modules
|
|
/// resolve `is-in-stable-directories` correctly.
|
|
/// The steps are:
|
|
/// 1. Scan dependencies to build the PCH. One of the module's depend on header
|
|
/// that is seemingly from the sysroot. However, it depends on a local header that is overlaid.
|
|
/// 2. Build the PCH & dependency PCMs.
|
|
/// 3. Scan a source file that transitively depends on the same modules as the pcm.
|
|
|
|
// RUN: rm -rf %t
|
|
// RUN: split-file %s %t
|
|
// RUN: sed -e "s|DIR|%/t|g" %t/overlay.json.template > %t/overlay.json
|
|
// RUN: sed -e "s|DIR|%/t|g" %t/compile-pch.json.in > %t/compile-pch.json
|
|
// RUN: clang-scan-deps -compilation-database %t/compile-pch.json \
|
|
// RUN: -j 1 -format experimental-full > %t/deps_pch.db
|
|
|
|
// RUN: %deps-to-rsp %t/deps_pch.db --module-name=A > %t/A.rsp
|
|
// RUN: %deps-to-rsp %t/deps_pch.db --module-name=B > %t/B.rsp
|
|
// RUN: %deps-to-rsp %t/deps_pch.db --module-name=B_transitive > %t/B_transitive.rsp
|
|
// RUN: %deps-to-rsp %t/deps_pch.db --module-name=C > %t/C.rsp
|
|
// RUN: %deps-to-rsp %t/deps_pch.db --tu-index=0 > %t/pch.rsp
|
|
// RUN: %clang @%t/A.rsp
|
|
// RUN: %clang @%t/B.rsp
|
|
// RUN: %clang @%t/B_transitive.rsp
|
|
// RUN: %clang @%t/C.rsp
|
|
// RUN: %clang @%t/pch.rsp
|
|
|
|
// RUN: sed -e "s|DIR|%/t|g" %t/compile-commands.json.in > %t/compile-commands.json
|
|
// RUN: clang-scan-deps -compilation-database %t/compile-commands.json \
|
|
// RUN: -j 1 -format experimental-full > %t/deps.db
|
|
// RUN: cat %t/deps_pch.db | sed 's:\\\\\?:/:g' | FileCheck %s -DPREFIX=%/t --check-prefix PCH_DEP
|
|
// RUN: cat %t/deps.db | sed 's:\\\\\?:/:g' | FileCheck %s -DPREFIX=%/t --check-prefix CLIENT
|
|
|
|
// PCH_DEP: "is-in-stable-directories": true
|
|
// PCH_DEP: "name": "A"
|
|
|
|
// PCH_DEP-NOT: "is-in-stable-directories": true
|
|
|
|
// Verify is-in-stable-directories is only assigned to the module that only depends on A.
|
|
// CLIENT-NOT: "is-in-stable-directories": true
|
|
|
|
// CLIENT: "name": "D"
|
|
// CLIENT: "is-in-stable-directories": true
|
|
// CLIENT: "name": "sys"
|
|
|
|
// CLIENT-NOT: "is-in-stable-directories": true
|
|
|
|
//--- compile-pch.json.in
|
|
[
|
|
{
|
|
"directory": "DIR",
|
|
"command": "clang -x c-header -c DIR/prebuild.h -isysroot DIR/MacOSX.sdk -IDIR/BuildDir -ivfsoverlay DIR/overlay.json -IDIR/MacOSX.sdk/usr/include -fmodules -fmodules-cache-path=DIR/module-cache -fimplicit-module-maps -o DIR/prebuild.pch",
|
|
"file": "DIR/prebuild.h"
|
|
}
|
|
]
|
|
|
|
//--- compile-commands.json.in
|
|
[
|
|
{
|
|
"directory": "DIR",
|
|
"command": "clang -c DIR/client.c -isysroot DIR/MacOSX.sdk -IDIR/BuildDir -ivfsoverlay DIR/overlay.json -IDIR/MacOSX.sdk/usr/include -fmodules -fmodules-cache-path=DIR/module-cache -fimplicit-module-maps -include-pch DIR/prebuild.pch",
|
|
"file": "DIR/client.c"
|
|
}
|
|
]
|
|
|
|
//--- overlay.json.template
|
|
{
|
|
"version": 0,
|
|
"case-sensitive": "false",
|
|
"roots": [
|
|
{
|
|
"external-contents": "DIR/BuildDir/B_vfs.h",
|
|
"name": "DIR/MacOSX.sdk/usr/include/B/B_vfs.h",
|
|
"type": "file"
|
|
}
|
|
]
|
|
}
|
|
|
|
//--- MacOSX.sdk/usr/include/A/module.modulemap
|
|
module A [system] {
|
|
umbrella "."
|
|
}
|
|
|
|
//--- MacOSX.sdk/usr/include/A/A.h
|
|
typedef int A_type;
|
|
|
|
//--- MacOSX.sdk/usr/include/B/module.modulemap
|
|
module B [system] {
|
|
umbrella "."
|
|
}
|
|
|
|
//--- MacOSX.sdk/usr/include/B/B.h
|
|
#include <B/B_vfs.h>
|
|
|
|
//--- BuildDir/B_vfs.h
|
|
typedef int local_t;
|
|
|
|
//--- MacOSX.sdk/usr/include/sys/sys.h
|
|
#include <A/A.h>
|
|
typedef int sys_t_m;
|
|
|
|
//--- MacOSX.sdk/usr/include/sys/module.modulemap
|
|
module sys [system] {
|
|
umbrella "."
|
|
}
|
|
|
|
//--- MacOSX.sdk/usr/include/B_transitive/B.h
|
|
#include <B/B.h>
|
|
|
|
//--- MacOSX.sdk/usr/include/B_transitive/module.modulemap
|
|
module B_transitive [system] {
|
|
umbrella "."
|
|
}
|
|
|
|
//--- MacOSX.sdk/usr/include/C/module.modulemap
|
|
module C [system] {
|
|
umbrella "."
|
|
}
|
|
|
|
//--- MacOSX.sdk/usr/include/C/C.h
|
|
#include <B_transitive/B.h>
|
|
|
|
|
|
//--- MacOSX.sdk/usr/include/D/module.modulemap
|
|
module D [system] {
|
|
umbrella "."
|
|
}
|
|
|
|
//--- MacOSX.sdk/usr/include/D/D.h
|
|
#include <C/C.h>
|
|
|
|
//--- prebuild.h
|
|
#include <A/A.h>
|
|
#include <C/C.h> // This dependency transitively depends on a local header.
|
|
|
|
//--- client.c
|
|
#include <sys/sys.h>
|
|
#include <D/D.h> // This dependency transitively depends on a local header.
|