Skip to content

Do not pass -framework to compiler tasks #3304

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

Conversation

neonichu
Copy link
Contributor

@neonichu neonichu commented Feb 24, 2021

This fixes warnings of the form

clang: warning: -framework XCTest: 'linker' input unused [-Wunused-command-line-argument]

when using linkedFramework for C-family and Swift targets.

rdar://74548652

@neonichu
Copy link
Contributor Author

@swift-ci please smoke test

@abertelrud
Copy link
Contributor

The diffs look good but it seems that we're also passing -framework for compilation for Swift modules... I think that's wrong too, since those produce modules and not linked binaries? Or does the Swift driver need to see the -framework flags?

@jakepetroules
Copy link
Contributor

Or does the Swift driver need to see the -framework flags?

Compiler invocations for either language want -F, but not -framework.

@abertelrud
Copy link
Contributor

abertelrud commented Feb 24, 2021

Or does the Swift driver need to see the -framework flags?

Compiler invocations for either language want -F, but not -framework.

Right, that's what I thought was still the case. @neonichu while you're at it, would you mind then also removing the ones we're still passing to Swift?

This fixes warnings of the form

> clang: warning: -framework XCTest: 'linker' input unused [-Wunused-command-line-argument]

when using `linkedFramework` for C-family and Swift targets.

rdar://74548652
@neonichu neonichu force-pushed the do-not-pass-framework-to-clang-tasks branch from 3e4249b to 2642d0c Compare February 24, 2021 16:57
@neonichu
Copy link
Contributor Author

@swift-ci please smoke test

@neonichu neonichu changed the title Do not pass -framework to clang tasks Do not pass -framework to compiler tasks Feb 24, 2021
@neonichu
Copy link
Contributor Author

:0: error: module file '/home/buildnode/jenkins/workspace/swift-package-manager-Linux-smoke-test/branch-main/build/buildbot_incremental/foundation_static-linux-x86_64/module-cache/39XU9JKBSRWO0/SwiftShims-3849312O4BV1I.pcm' is out of date and needs to be rebuilt: signature mismatch

🕺

@neonichu
Copy link
Contributor Author

@swift-ci please smoke test linux

Copy link
Contributor

@abertelrud abertelrud left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for fixing the Swift compiler too!

@tomerd tomerd added the ready Author believes the PR is ready to be merged & any feedback has been addressed label Feb 24, 2021
@neonichu neonichu merged commit 4632dd5 into swiftlang:main Feb 24, 2021
@neonichu neonichu deleted the do-not-pass-framework-to-clang-tasks branch February 24, 2021 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Author believes the PR is ready to be merged & any feedback has been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants