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
111 lines
4.1 KiB
Objective-C
111 lines
4.1 KiB
Objective-C
// Test the module map path is consistent between clang invocations when using VFS overlays.
|
|
|
|
// RUN: rm -rf %t
|
|
// RUN: split-file %s %t
|
|
|
|
// Pre-populate the module cache with the modules that don't use VFS overlays.
|
|
// RUN: %clang_cc1 -fsyntax-only -F%t/Frameworks -I%t/include %t/prepopulate_module_cache.m \
|
|
// RUN: -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/modules.cache
|
|
|
|
// Execute a compilation with VFS overlay. .pcm file path looks like <hash1>/ModuleName-<hash2>.pcm.
|
|
// <hash1> corresponds to the compilation settings like language options.
|
|
// <hash2> corresponds to the module map path. So if any of those change, we should use a different module.
|
|
// But for VFS overlay we make an exception that it's not a part of <hash1> to reduce the number of built .pcm files.
|
|
// Test that paths in overlays don't leak into <hash2> and don't cause using 2 .pcm files for the same module.
|
|
// DEFINE: %{command} = %clang_cc1 -fsyntax-only -verify -F%t/Frameworks -I%t/include %t/test.m \
|
|
// DEFINE: -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/modules.cache
|
|
// RUN: sed -e "s@TMP_DIR@%{/t:regex_replacement}@g" -e "s@USE_EXTERNAL_NAMES_OPTION@@g" %t/overlay.yaml.template > %t/external-names-default.yaml
|
|
// RUN: %{command} -ivfsoverlay %t/external-names-default.yaml
|
|
|
|
// RUN: sed -e "s@TMP_DIR@%{/t:regex_replacement}@g" -e "s@USE_EXTERNAL_NAMES_OPTION@'use-external-names': true,@g" %t/overlay.yaml.template > %t/external-names-true.yaml
|
|
// RUN: %{command} -ivfsoverlay %t/external-names-true.yaml
|
|
|
|
// RUN: sed -e "s@TMP_DIR@%{/t:regex_replacement}@g" -e "s@USE_EXTERNAL_NAMES_OPTION@'use-external-names': false,@g" %t/overlay.yaml.template > %t/external-names-false.yaml
|
|
// RUN: %{command} -ivfsoverlay %t/external-names-false.yaml
|
|
|
|
//--- prepopulate_module_cache.m
|
|
#import <Redirecting/Redirecting.h>
|
|
|
|
//--- test.m
|
|
// At first import multi-path modules directly, so clang decides which .pcm file they should belong to.
|
|
#import <MultiPath/MultiPath.h>
|
|
#import <MultiPathHeader.h>
|
|
|
|
// Then import a module from the module cache and all its transitive dependencies.
|
|
// Make sure the .pcm files loaded directly are the same as 'Redirecting' is referencing.
|
|
#import <Redirecting/Redirecting.h>
|
|
// expected-no-diagnostics
|
|
|
|
|
|
//--- Frameworks/MultiPath.framework/Headers/MultiPath.h
|
|
void multiPathFramework(void);
|
|
|
|
//--- Frameworks/MultiPath.framework/Modules/module.modulemap
|
|
framework module MultiPath {
|
|
header "MultiPath.h"
|
|
export *
|
|
}
|
|
|
|
|
|
//--- include/MultiPathHeader.h
|
|
void multiPathHeader(void);
|
|
|
|
//--- include/module.modulemap
|
|
module MultiPathHeader {
|
|
header "MultiPathHeader.h"
|
|
export *
|
|
}
|
|
|
|
|
|
//--- Frameworks/Redirecting.framework/Headers/Redirecting.h
|
|
#import <MultiPath/MultiPath.h>
|
|
#import <MultiPathHeader.h>
|
|
|
|
//--- Frameworks/Redirecting.framework/Modules/module.modulemap
|
|
framework module Redirecting {
|
|
header "Redirecting.h"
|
|
export *
|
|
}
|
|
|
|
|
|
//--- BuildTemporaries/MultiPath.h
|
|
void multiPathFramework(void);
|
|
//--- BuildTemporaries/framework.modulemap
|
|
framework module MultiPath {
|
|
header "MultiPath.h"
|
|
export *
|
|
}
|
|
//--- BuildTemporaries/header.h
|
|
void multiPathHeader(void);
|
|
//--- BuildTemporaries/include.modulemap
|
|
module MultiPathHeader {
|
|
header "MultiPathHeader.h"
|
|
export *
|
|
}
|
|
|
|
//--- overlay.yaml.template
|
|
{
|
|
'version': 0,
|
|
USE_EXTERNAL_NAMES_OPTION
|
|
'roots': [
|
|
{ 'name': 'TMP_DIR/Frameworks/MultiPath.framework/Headers', 'type': 'directory',
|
|
'contents': [
|
|
{ 'name': 'MultiPath.h', 'type': 'file',
|
|
'external-contents': 'TMP_DIR/BuildTemporaries/MultiPath.h'}
|
|
]},
|
|
{ 'name': 'TMP_DIR/Frameworks/MultiPath.framework/Modules', 'type': 'directory',
|
|
'contents': [
|
|
{ 'name': 'module.modulemap', 'type': 'file',
|
|
'external-contents': 'TMP_DIR/BuildTemporaries/framework.modulemap'}
|
|
]},
|
|
{ 'name': 'TMP_DIR/include', 'type': 'directory',
|
|
'contents': [
|
|
{ 'name': 'MultiPathHeader.h', 'type': 'file',
|
|
'external-contents': 'TMP_DIR/BuildTemporaries/header.h'},
|
|
{ 'name': 'module.modulemap', 'type': 'file',
|
|
'external-contents': 'TMP_DIR/BuildTemporaries/include.modulemap'}
|
|
]}
|
|
]
|
|
}
|
|
|