Skip to content

[Frontend] Improve -print-target-info #32758

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 5 commits into from
Jul 9, 2020

Conversation

DougGregor
Copy link
Member

Enhance -print-target-info in a few ways to benefit the driver (and eliminate code duplication):

  • Add the Swift compiler version (so clients don't also have to invoke with -version
  • Add the set of compatibility libraries that should be linked with the target

The latter involved some refactoring into a table of compatibility libraries, since we already had 2 copies of the logic in the source code, and I would have had to add a third for -print-target-info.

…put.

Clients that use -print-target-info can avoid an extra frontend
invocation by using this information.
Describe the backward-deployment libraries via a preprocessor-driven
table. Macro-metaprogramming the two places in the code base---the
driver and IRGen---to use this tabble to determine which
backward-compatibility libraries to link against.
The driver and any other client that attempts to properly link Swift
code need to know which compatibility libraries should be linked on a
per-target basis. Vend that information as part of -print-target-info.
@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

swift-ci commented Jul 8, 2020

Build failed
Swift Test OS X Platform
Git Sha - 618af04

@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

swift-ci commented Jul 8, 2020

Build failed
Swift Test Linux Platform
Git Sha - 618af04

@swift-ci
Copy link
Contributor

swift-ci commented Jul 8, 2020

Build failed
Swift Test OS X Platform
Git Sha - 618af04

@DougGregor
Copy link
Member Author

@swift-ci test

@swift-ci
Copy link
Contributor

swift-ci commented Jul 8, 2020

Build failed
Swift Test OS X Platform
Git Sha - e547182

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility Release

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