Skip to content

[CMake] Use proper module triples for the names of standard library modules #31170

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

Merged
merged 3 commits into from
Apr 24, 2020

Conversation

DougGregor
Copy link
Member

The standard library (and other Swift modules built by our CMake build system)
has been building module files with an architecture only (e.g., x86_64.swiftmodule)
rather than a proper module triple (x86_86-apple-macosx10.15,
x86_64-apple-ios13.0-simulator, etc.), unlike every other build
system. There are hacks in the compiler and other tools to cope with
this unnecessary build difference. Fix the module file names so we'll
be able to remove the hacks later.

Fixes rdar://problem/49071536.

…odules.

The standard library (and other Swift modules built by our CMake build system)
has been building module files with an architecture only (e.g., x86_64.swiftmodule)
rather than a proper module triple (x86_86-apple-macosx10.15,
x86_64-apple-ios13.0-simulator, etc.), unlike every other build
system. There are hacks in the compiler and other tools to cope with
this unnecessary build difference. Fix the module file names so we'll
be able to remove the hacks later.

Fixes rdar://problem/49071536.
@DougGregor DougGregor requested a review from beccadax April 21, 2020 04:16
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - b27b4d4

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - b27b4d4

@DougGregor
Copy link
Member Author

@swift-ci please test

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - b27b4d4

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 13b6d7226229372859e620aa6b235d87762195b5

@DougGregor DougGregor force-pushed the build-module-triples branch from 13b6d72 to 691633b Compare April 24, 2020 04:33
@DougGregor
Copy link
Member Author

@swift-ci please test

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor merged commit 94e9153 into swiftlang:master Apr 24, 2020
@DougGregor DougGregor deleted the build-module-triples branch April 24, 2020 06:57
beccadax added a commit to beccadax/swift that referenced this pull request Apr 29, 2020
The “ios-like” build flavor is used to build modules that do not exist on macOS for Mac Catalyst. Even though they are built for the “OSX” SDK, they need to have a “MACCATALYST”-style module triple; unfortunately, the transition to naming swiftmodules by module triple in swiftlang#31170 did not handle this edge case correctly.

This commit handles that by piggybacking on a similar special case used to change the lib/swift subdirectory.
beccadax added a commit to beccadax/swift that referenced this pull request May 6, 2020
The “ios-like” build flavor is used to build modules that do not exist on macOS for Mac Catalyst. Even though they are built for the “OSX” SDK, they need to have a “MACCATALYST”-style module triple; unfortunately, the transition to naming swiftmodules by module triple in swiftlang#31170 did not handle this edge case correctly.

This commit handles that by piggybacking on a similar special case used to change the lib/swift subdirectory.
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.

3 participants