Skip to content

[Platform] Unify Linux/FreeBSD modulemaps with gyb #2081

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 1 commit into from
Apr 7, 2016

Conversation

modocache
Copy link
Contributor

What's in this pull request?

A great deal of duplication exists across the Linux and FreeBSD modulemaps. An Android modulemap would add even more duplication.

Use gyb to conditionally include certain exports for certain platforms. Most of glibc.modulemap is common across Linux and FreeBSD, and using gyb we can conditionally include the two exports that differ.

Resolved bug number: #1442 (comment)


Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
OS X platform @swift-ci Please test OS X platform
Linux platform @swift-ci Please test Linux platform

Note: Only members of the Apple organization can trigger swift-ci.

@modocache modocache mentioned this pull request Apr 6, 2016
@@ -362,10 +363,12 @@ module SwiftGlibc [system] {
header "@GLIBC_INCLUDE_PATH@/utmpx.h"
export *
}
% if CMAKE_SDK != "FREEBSD":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Negative tests are fragile and frustrating to read when porting to a new platform. Could you change these if statements to use comparisons like CMAKE_SDK in ['LINUX', 'ANDROID']?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@gribozavr
Copy link
Contributor

Thank you! LGTM modulo comments. Let's get feedback from the CI:
@swift-ci Please test

@modocache
Copy link
Contributor Author

The OS X failure appears to be unrelated.

@modocache modocache force-pushed the glibc-modulemap-gyb branch from 5477d09 to 89bb467 Compare April 7, 2016 15:18
A great deal of duplication exists across the Linux and FreeBSD
modulemaps. An Android modulemap would add even more duplication.

Use gyb to conditionally include certain exports for certain
platforms. Most of glibc.modulemap is common across Linux and FreeBSD,
and using gyb we can conditionally include the two exports that differ.
@modocache modocache force-pushed the glibc-modulemap-gyb branch from 89bb467 to 1fbdaee Compare April 7, 2016 15:25
@gribozavr
Copy link
Contributor

@swift-ci Please test and merge

@gribozavr
Copy link
Contributor

CI failures are unrelated.

@gribozavr gribozavr merged commit a64976a into swiftlang:master Apr 7, 2016
@modocache modocache deleted the glibc-modulemap-gyb branch April 7, 2016 17:49
MaxDesiatov pushed a commit that referenced this pull request Apr 19, 2021
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.

2 participants