Skip to content

Conversation

@xymus
Copy link
Contributor

@xymus xymus commented Sep 14, 2021

Pass the canonical SDK name to the frontend for it to control which swiftmodule file can be loaded according to the SDK in use. Swiftmodule files should only be used in the context of the SDK used to create them. This will catch issues with roots and other similar configuration problems.

rdar://83104265

Related compiler-side PR: swiftlang/swift#37768

@xymus xymus requested review from artemcm, nkcsgexi and owenv September 14, 2021 18:55
@xymus
Copy link
Contributor Author

xymus commented Sep 14, 2021

@swift-ci Please test

@nkcsgexi
Copy link
Contributor

Could you please (1) update Options.swift using the ToT compiler source, and (2) check if -target-sdk-name is supported in the driver before feeding it to the compiler?

@xymus
Copy link
Contributor Author

xymus commented Sep 14, 2021

@nkcsgexi How can we check if a flag is supported by the compiler?

@xymus
Copy link
Contributor Author

xymus commented Sep 14, 2021

Nevermind, there's a supportedFrontendFlags.

@nkcsgexi
Copy link
Contributor

Right, it's especially necessary when we are using one single driver instance to orchestrate multiple compilers.

@xymus
Copy link
Contributor Author

xymus commented Sep 14, 2021

Adding commits for the suggested changes.

@swift-ci Please test

@kastiglione
Copy link
Contributor

+1 nice addition

@xymus
Copy link
Contributor Author

xymus commented Oct 8, 2021

@swift-ci Please test

xymus added 2 commits October 22, 2021 10:28
The frontend will use this information to control which swiftmodule file
can be loaded according to the SDK in use. Swiftmodule files should only
be used in the context of the SDK used to create them. This will catch
issues with roots and other configuration problems.

rdar://83104265
@xymus
Copy link
Contributor Author

xymus commented Oct 22, 2021

Other SDK sanity checks have landed. I believe it's time to merge this one.

@swift-ci Please test

@xymus xymus merged commit 2aeeb0c into swiftlang:main Oct 22, 2021
@xymus xymus deleted the pass-sdk-name branch October 22, 2021 22:01
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