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
71 lines
2.5 KiB
Plaintext
71 lines
2.5 KiB
Plaintext
// RUN: rm -rf %t
|
|
//
|
|
// First, create two modules a and b, with a dependency b -> a, both within
|
|
// the same directory p1.
|
|
//
|
|
// RUN: mkdir -p %t/p1
|
|
// RUN: cd %t/p1
|
|
//
|
|
// RUN: grep "<AM>" %s > %t/p1/a.modulemap
|
|
// RUN: %clang_cc1 -x c++ -fmodules -emit-module -fmodule-map-file-home-is-cwd \
|
|
// RUN: -fmodules-embed-all-files -fmodules-local-submodule-visibility \
|
|
// RUN: -fmodule-name="a" -o a.pcm a.modulemap
|
|
//
|
|
// RUN: grep "<BM>" %s > %t/p1/b.modulemap
|
|
// RUN: %clang_cc1 -x c++ -fmodules -emit-module -fmodule-map-file-home-is-cwd \
|
|
// RUN: -fmodules-embed-all-files -fmodules-local-submodule-visibility \
|
|
// RUN: -fmodule-name="b" -o b.pcm b.modulemap
|
|
//
|
|
// Next, move the whole tree p1 -> p2.
|
|
//
|
|
// RUN: cd %t
|
|
// RUN: mv %t/p1 %t/p2
|
|
// RUN: cd %t/p2
|
|
//
|
|
// Compile a new module c in the newly generated tree that depends on b; c.pcm
|
|
// has to be within a subdirectory so a.modulemap will be one step up (../) from
|
|
// c.pcm.
|
|
//
|
|
// RUN: mkdir %t/p2/c
|
|
// RUN: grep "<CM>" %s > %t/p2/c/c.modulemap
|
|
// RUN: grep "<CH>" %s > %t/p2/c/c.h
|
|
// RUN: %clang_cc1 -x c++ -fmodules -emit-module -fmodule-map-file-home-is-cwd \
|
|
// RUN: -fmodules-embed-all-files -fmodules-local-submodule-visibility \
|
|
// RUN: -fmodule-name="c" -fmodule-file=b.pcm -o c/c.pcm c/c.modulemap
|
|
//
|
|
// Delete a.modulemap from its original location, and instead inject a different
|
|
// (unrelated) a.modulemap in the path p2/p2.
|
|
//
|
|
// RUN: rm %t/p2/a.modulemap
|
|
// RUN: mkdir -p %t/p2/p2
|
|
// RUN: touch %t/p2/p2/a.modulemap
|
|
//
|
|
// Now compile a file c.cpp that uses c.h and the module c; it is important
|
|
// to first load b.pcm and a.pcm before c.pcm on the command line to trigger
|
|
// the right order of module loading. This used to trigger clang to find the
|
|
// p2/p2/a.modulemap via the path c/../p2/a.modulemap, which is not the correct
|
|
// relative path from c.
|
|
//
|
|
// RUN: grep "<CC>" %s > %t/p2/c/c.cpp
|
|
// RUN: %clang_cc1 -I. -x c++ -fmodules \
|
|
// RUN: -fmodule-file=b.pcm -fmodule-file=a.pcm -fmodule-file=c/c.pcm \
|
|
// RUN: -o c/c.o -emit-obj c/c.cpp
|
|
|
|
module "a" { // <AM>
|
|
} // <AM>
|
|
|
|
module "b" { // <BM>
|
|
use "a" // <BM>
|
|
} // <BM>
|
|
|
|
module "c" { // <CM>
|
|
header "c/c.h" // <CM>
|
|
use "a" // <CM>
|
|
use "b" // <CM>
|
|
} // <CM>
|
|
|
|
inline void c() {} // <CH>
|
|
|
|
#include "c/c.h" // <CC>
|
|
void foo() { c(); } // <CC>
|