Skip to content

Pass -use-static-resource-dir to frontend when linking statically #192

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
Aug 25, 2020

Conversation

drexin
Copy link
Contributor

@drexin drexin commented Aug 4, 2020

The compiler computes the resource folder based on its own executable path when it is not explicitly set, but it used to always pick the shared resource folder, because it did not have information about whether the binary will be statically or dynamically linked. This has been changed in swiftlang/swift#33168 and this PR adjusts the behavior to match that of the C++ implementation.

@drexin drexin requested a review from DougGregor August 4, 2020 23:51
@drexin
Copy link
Contributor Author

drexin commented Aug 4, 2020

@swift-ci test

@drexin drexin force-pushed the wip-static-resource-dir branch from 233028b to f7efa44 Compare August 4, 2020 23:55
@drexin
Copy link
Contributor Author

drexin commented Aug 4, 2020

@swift-ci test

@drexin drexin force-pushed the wip-static-resource-dir branch from f7efa44 to 610991d Compare August 5, 2020 00:02
@drexin
Copy link
Contributor Author

drexin commented Aug 5, 2020

@swift-ci test

@drexin
Copy link
Contributor Author

drexin commented Aug 5, 2020

@swift-ci test macos

@drexin drexin force-pushed the wip-static-resource-dir branch from 610991d to d201490 Compare August 5, 2020 00:42
@drexin
Copy link
Contributor Author

drexin commented Aug 5, 2020

@swift-ci test

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

This looks correct, although I think we also want to pass this down to -print-target-info? With your fixes to the Swift compiler, we might be able to replace this driver's resource-dir computation with using the result of -print-target-info, which would be wonderful.

@drexin
Copy link
Contributor Author

drexin commented Aug 5, 2020

Yes, good point. I‘ll add it to the target info.

@drexin drexin force-pushed the wip-static-resource-dir branch from d201490 to 1f1ed5f Compare August 7, 2020 18:52
@drexin
Copy link
Contributor Author

drexin commented Aug 7, 2020

@swift-ci test

@drexin drexin force-pushed the wip-static-resource-dir branch 2 times, most recently from bf16f7f to a2b269d Compare August 7, 2020 20:03
@drexin
Copy link
Contributor Author

drexin commented Aug 7, 2020

@swift-ci test

@drexin drexin force-pushed the wip-static-resource-dir branch from a2b269d to 311ddd5 Compare August 7, 2020 20:10
@drexin
Copy link
Contributor Author

drexin commented Aug 7, 2020

@swift-ci test

1 similar comment
@DougGregor
Copy link
Member

@swift-ci test

@DougGregor
Copy link
Member

@swift-ci test macOS

1 similar comment
@drexin
Copy link
Contributor Author

drexin commented Aug 10, 2020

@swift-ci test macOS

@artemcm
Copy link
Contributor

artemcm commented Aug 10, 2020

@swift-ci test

1 similar comment
@artemcm
Copy link
Contributor

artemcm commented Aug 25, 2020

@swift-ci test

@drexin drexin merged commit 029d4ba into swiftlang:master Aug 25, 2020
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