Skip to content

Conversation

@owenv
Copy link
Contributor

@owenv owenv commented Oct 27, 2025

Swift Build was relying on hand-authored module maps being discovered in include directories, while the old build system always passed them using -fmodule-map-file as well. This isn't ideal, but packages like Foundation rely on this to avoid clashes with modules that ship in the toolchain, so for now we align the behavior for compatibility with existing code.

Closes #9290

@owenv
Copy link
Contributor Author

owenv commented Oct 27, 2025

@swift-ci test

@owenv owenv force-pushed the owenv/custom-modulemap branch from 56108a0 to eabac8b Compare October 28, 2025 00:23
@owenv
Copy link
Contributor Author

owenv commented Oct 28, 2025

@swift-ci test

@owenv owenv force-pushed the owenv/custom-modulemap branch from eabac8b to 4167a10 Compare October 28, 2025 03:37
@owenv
Copy link
Contributor Author

owenv commented Oct 28, 2025

@swift-ci test

@dschaefer2
Copy link
Member

Nice, this looks like it will help the plug-in tool generated module map as well (once we discover its path properly in TargetSourcesBuider). If someone wants to generate an apinote, they will need to make sure the module map is right next to it.

@owenv
Copy link
Contributor Author

owenv commented Oct 28, 2025

@swift-ci test Windows

@owenv owenv enabled auto-merge (squash) October 28, 2025 16:18
@owenv owenv merged commit 56ba416 into swiftlang:main Oct 28, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SwiftPM fails to build swift-foundation with --build-system swiftbuild: redefinition of module '_FoundationCShims'

3 participants