Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify the paths to module maps generated by the Swift build rules. #560

Conversation

keith
Copy link
Member

@keith keith commented Jan 28, 2021

Since we pass these module maps directly to the compiler with -fmodule-map-file, we don't need them to be named exactly module.modulemap, so the extra subdirectory is also unnecessary.

This change also migrates generation of the modulemap file content for the generated header's module to the same code (module_maps.bzl) already used by swift_clang_module_aspect, instead of having its own separate code path.

PiperOrigin-RevId: 354324121
(cherry picked from commit 5f51ca9)

Since we pass these module maps directly to the compiler with `-fmodule-map-file`, we don't need them to be named exactly `module.modulemap`, so the extra subdirectory is also unnecessary.

This change also migrates generation of the modulemap file content for the generated header's module to the same code (`module_maps.bzl`) already used by `swift_clang_module_aspect`, instead of having its own separate code path.

PiperOrigin-RevId: 354324121
(cherry picked from commit 5f51ca9)
@google-cla google-cla bot added the cla: yes label Jan 28, 2021
keith referenced this pull request Jan 28, 2021
Since we pass these module maps directly to the compiler with `-fmodule-map-file`, we don't need them to be named exactly `module.modulemap`, so the extra subdirectory is also unnecessary.

This change also migrates generation of the modulemap file content for the generated header's module to the same code (`module_maps.bzl`) already used by `swift_clang_module_aspect`, instead of having its own separate code path.

PiperOrigin-RevId: 354324121
@keith keith marked this pull request as ready for review January 28, 2021 17:41
@keith keith merged commit aa54225 into master Jan 28, 2021
@keith keith deleted the ks/simplify-the-paths-to-module-maps-generated-by-the-swift-build-rules branch January 28, 2021 18:02
@thii
Copy link
Member

thii commented Feb 8, 2021

The generated module map now reexports all of the imported modules. Is that an intended change?

@keith
Copy link
Member Author

keith commented Feb 8, 2021

@allevato

@allevato
Copy link
Member

allevato commented Feb 8, 2021

Oof, it was not, thanks for catching that. I can get a fix out soon if you want to wait and stay in sync with upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants