Skip to content

ClangImporter: share more of the clang invocation #3005

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
Jun 30, 2016

Conversation

compnerd
Copy link
Member

What's in this pull request?

Resolved bug number: (SR-)


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
All supported platforms @swift-ci Please smoke test and merge
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
All supported platforms @swift-ci Please test and merge
OS X platform @swift-ci Please test OS X platform
OS X platform @swift-ci Please benchmark
Linux platform @swift-ci Please test Linux platform

Lint Testing

Language Comment
Python @swift-ci Please Python lint

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

This shares more of the clang invocation options across the various targets. It
makes it easier to see what options actually differ. Take the opportunity to
reorganise the options to be clustered by purpose.

@compnerd
Copy link
Member Author

CC @jrose-apple

@jrose-apple
Copy link
Contributor

I think the fact that Linux and Darwin both use -std=gnu11 is a coincidence, not something that's inherently shared. The other options are things that the importer depends on in general. (In particular, one might get C++ support before the other.)

@compnerd
Copy link
Member Author

It seems like it would be nicer to keep all the targets in as much parity as possible. I was thinking of actually proposing to require libBlocksRuntime on Linux, and pushing -fblocks into the shared path as well. It seems that it would be possible to share the entire invocation and just gate -x objective-c -fobjc-arc on ObjCInterop being enabled.

@compnerd
Copy link
Member Author

@jrose-apple ping

@jrose-apple
Copy link
Contributor

Sorry, I'm not convinced. Apple platforms really are different from everything else, and they will continue to be for a long time to come. I like the reorganization of the flags that are truly common, but the rest of them are all things we depend on for correctness in all configurations.

@compnerd
Copy link
Member Author

@jrose-apple okay, well, this just reorders the arguments to be more logically grouped that you were still in favor of.

@@ -384,8 +387,6 @@ getNormalInvocationArguments(std::vector<std::string> &invocationArgStrs,
invocationArgStrs.insert(invocationArgStrs.end(), {
// Non-Darwin platforms don't use the Objective-C runtime, so they can
// not import Objective-C modules.
//
// Just use the most feature-rich C language mode.
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is still relevant, isn't it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, right, that should remain. Ill update that shortly.

Reorganise the options to be grouped together by purpose.  NFC.
@jrose-apple
Copy link
Contributor

@swift-ci Please smoke test

@compnerd
Copy link
Member Author

@jrose-apple any other comments on this?

@jrose-apple
Copy link
Contributor

Nope, all good!

@jrose-apple jrose-apple merged commit eb84b7d into swiftlang:master Jun 30, 2016
@compnerd compnerd deleted the clang-invocation branch July 3, 2016 17:09
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