Skip to content

Fix 'linker' input unused warnings in Explicit Module Builds #39509

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 2 commits into from
Oct 1, 2021

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Sep 29, 2021

  • Use = version of -working-directory flag when passing it to clang
    Under some circumstances this prevents the directory argument from being treated as an arbitrary path input.

  • Omit path to clang from PCM build command-line
    It gets interpreted as just an executable we feed to the linker, since we launch emit-pcm actions via swift-frontend invocations, not clang.

Resolves rdar://83104047

@artemcm artemcm requested a review from nkcsgexi September 29, 2021 18:10
@artemcm
Copy link
Contributor Author

artemcm commented Sep 29, 2021

@swift-ci please test

@artemcm
Copy link
Contributor Author

artemcm commented Sep 29, 2021

@swift-ci please test Windows platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 9cd926454c0df6fbf7d47319d30a2e2285b501ba

@artemcm artemcm force-pushed the FixExplicitPCMWarnings branch from 9cd9264 to 86958de Compare September 29, 2021 20:05
@artemcm
Copy link
Contributor Author

artemcm commented Sep 29, 2021

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 86958de5243bcb0b93e4ea0d8a3b2868dc8c75de

@artemcm artemcm force-pushed the FixExplicitPCMWarnings branch from 86958de to 50aea2f Compare September 29, 2021 22:42
@artemcm
Copy link
Contributor Author

artemcm commented Sep 29, 2021

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 50aea2fb04dbaef693911df1c41ea23a3279c1ee

@artemcm
Copy link
Contributor Author

artemcm commented Sep 30, 2021

@swift-ci please test macOS platform

@artemcm
Copy link
Contributor Author

artemcm commented Sep 30, 2021

@swift-ci please test windows platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 50aea2fb04dbaef693911df1c41ea23a3279c1ee

It gets interpreted as just an executable we feed to the linker, since we launch `emit-pcm` actions via `swift-frontend` invocations, not `clang`.
…se-extra-clang-opts` is specified.

Instead of *just* passing in `ExtraArgs`, we need to make sure to still form a command-line according to Clang's expectation.
@artemcm artemcm force-pushed the FixExplicitPCMWarnings branch from 50aea2f to aa31794 Compare September 30, 2021 22:34
@artemcm
Copy link
Contributor Author

artemcm commented Sep 30, 2021

@swift-ci please test

@artemcm
Copy link
Contributor Author

artemcm commented Oct 1, 2021

@swift-ci please test Windows platform

1 similar comment
@artemcm
Copy link
Contributor Author

artemcm commented Oct 1, 2021

@swift-ci please test Windows platform

@artemcm artemcm merged commit ae727e1 into swiftlang:main Oct 1, 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.

3 participants