Skip to content
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

[SR-5733] swiftc (3.0) incorrectly passes '-F' arguments to the linker #48303

Closed
swift-ci opened this issue Aug 22, 2017 · 3 comments
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself legacy driver Area → compiler: the integrated C++ legacy driver. Succeeded by the swift-driver project

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-5733
Radar None
Original Reporter plinth666 (JIRA User)
Type Bug
Status Closed
Resolution Invalid
Environment

Swift 3.0 built locally.

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Driver
Assignee None
Priority Medium

md5: d6d775e1d6b65aa71aba387f7110f0b6

Issue Description:

Invoking swiftc with "-F /path/to/foo.framework" gets passed to the linker as the same thing. It should get passed to the linker as "-F/path/to" since ld wants it in that format.

This can be worked around by adding in both "-F /path/to/foo.framework" and "-Xlinker -F/path/to".

Example arguments:

-emit-library -target x86_64-apple-ios10.3 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.3.sdk -I /var/folders/jq/jq6r64mn1wvg18lp0bw71f780000gn/T/8f4d687f-7ac5-4d67-af47-eb8dc499c574 -I /Users/steveh/Projects/swiftdemo/lib/iphone/FinalProduct/x86_64 -L /Users/steveh/Projects/swiftdemo/lib/iphone/FinalProduct -F /Users/steveh/Projects/SimpleLib/someoutput/Debug-universal/SimpleLib.framework -L /Users/steveh/Projects/swiftdemo/bin/swift/lib/swift/iphonesimulator/ -lXamGlue -framework SimpleLib -v -emit-module -module-name XamWrapping SimpleLib-IdentityThing.swift

@swift-ci
Copy link
Collaborator Author

Comment by Steve Hawley (JIRA)

Addendum:

swiftc accepts either `-F /path/to/foo.framework` or `-F /path/to -framework foo`.

ld accepts either `-F /path/to -framework foo` or `-F/path/to -framework foo`.

ld does not accept `-F /path/to/foo.framework`

shrug

@belkadan
Copy link
Contributor

My ld accepts both forms. What ld are you using?

@swift-ci
Copy link
Collaborator Author

Comment by Steve Hawley (JIRA)

The issue has to do with ld requiring a -framework foo and swiftc does not.

It's not a big deal, and I'd just as soon close the issue.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself legacy driver Area → compiler: the integrated C++ legacy driver. Succeeded by the swift-driver project
Projects
None yet
Development

No branches or pull requests

2 participants