Move the SDK EMB cache out of ModuleCache.noindex#1416
Merged
Bigcheese merged 2 commits intoJun 15, 2026
Merged
Conversation
Contributor
Author
|
@swift-ci please test |
owenv
reviewed
May 19, 2026
| table.push(BuiltinMacros.SWIFT_EXPLICIT_MODULES_OUTPUT_PATH, Static { BuiltinMacros.namespace.parseString("$(OBJROOT)/SwiftExplicitPrecompiledModules") }) | ||
|
|
||
| // Shared output path for SDK explicit modules. Lives adjacent to ModuleCache.noindex under DerivedData so it is shared across projects (SDK PCMs are invariant across projects that share an SDK and toolchain). | ||
| table.push(BuiltinMacros.SDK_EXPLICIT_MODULES_OUTPUT_PATH, Static { BuiltinMacros.namespace.parseString("$(DERIVED_DATA_DIR)/SDKExplicitPrecompiledModules") }) |
Collaborator
There was a problem hiding this comment.
DERIVED_DATA_DIR may be empty for Xcode projects using custom build locations, so this may need logic similar to MODULE_CACHE_DIR to do something reasonable in that situation
Contributor
Author
There was a problem hiding this comment.
Added the same check as MODULE_CACHE_DIR. From my understanding this will end up putting the SDK modules in $(OBJROOT)/SwiftExplicitPrecompiledModules when there's no DerivedData.
768e93b to
02bc8f0
Compare
Contributor
Author
|
@swift-ci please test |
owenv
approved these changes
May 28, 2026
Contributor
Author
|
@swift-ci please test |
02bc8f0 to
5426bcf
Compare
Contributor
Author
|
@swift-ci please test |
Contributor
|
@swift-ci test macOS |
1 similar comment
Contributor
|
@swift-ci test macOS |
Add SDK_EXPLICIT_MODULES_OUTPUT_PATH and use it for -sdk-module-cache-path instead of MODULE_CACHE_DIR. Putting the scanning and EBM cache in the same directory was confusing when looking at logs. This defaults to $(DERIVED_DATA_DIR)/SDKExplicitPrecompiledModules rdar://175038966
5426bcf to
e064f90
Compare
Contributor
Author
|
@swift-ci please test |
Contributor
Author
|
@swift-ci please test |
Contributor
Author
|
@swift-ci please test windows |
vsarunas
pushed a commit
to ordo-one/swift-build
that referenced
this pull request
Jun 30, 2026
Add SDK_EXPLICIT_MODULES_OUTPUT_PATH and use it for -sdk-module-cache-path instead of MODULE_CACHE_DIR. Putting the scanning and EBM cache in the same directory was confusing when looking at logs. This defaults to $(DERIVED_DATA_DIR)/SDKExplicitPrecompiledModules rdar://175038966
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add SDK_EXPLICIT_MODULES_OUTPUT_PATH and use it for -sdk-module-cache-path instead of MODULE_CACHE_DIR.
Putting the scanning and EBM cache in the same directory was confusing when looking at logs. This defaults to
$(DERIVED_DATA_DIR)/SDKExplicitPrecompiledModules
rdar://175038966