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-9162] libSwiftPM should provide an API to get the compiler arguments of a file/target #4750

Open
benlangmuir opened this issue Nov 2, 2018 · 0 comments

Comments

@benlangmuir
Copy link
Member

Previous ID SR-9162
Radar rdar://45770630
Original Reporter @benlangmuir
Type New Feature
Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels New Feature
Assignee None
Priority Medium

md5: 4876f7f49e77b266871bc2b16fda82f3

Issue Description:

Use-case: a tool that wants to run sourcekit or swift on a file in a swiftpm package needs a way to get correct compiler arguments.

Using libSwiftPM's `BuildPlan` today, you can get a `TargetDescription` contains something called `compileArguments()`, but this only provides some of the arguments. The rest of the arguments are produced only by `swift-build-tool`. If you want to build a tool that uses `libSwiftPM` to get arguments, you need to replicate that logic for e.g. turning import paths into `-I` flags, and adding incidental flags like `-parse-as-library`, '-c', setting the mdoule name, etc.

libSwiftPM should provide an API to get the compiler arguments of a file/target

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants