Skip to content

SPM does not control the swift driver invocation in all cases #6575

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

Closed
compnerd opened this issue May 17, 2023 · 0 comments · Fixed by #6585
Closed

SPM does not control the swift driver invocation in all cases #6575

compnerd opened this issue May 17, 2023 · 0 comments · Fixed by #6585
Assignees
Labels

Comments

@compnerd
Copy link
Member

Description

When building without the integrated swift driver and without swift module emission separated, SPM will rely on the LLBuild hardcoded swift driver invocation which does not take into account any of the flags when building code.

https://github.com/apple/swift-package-manager/blob/main/Sources/Build/LLBuildManifestBuilder.swift#L260-L276

The generated command invocation is embedded into LLBuild statically and does not evolve with SPM. As per @dmbryson this should not be relied upon.

Expected behavior

SPM would be able to control the formulation of the command line

Actual behavior

The command line is encoded into the LLBuild codebase.

Steps to reproduce

No response

Swift Package Manager version/commit hash

No response

Swift & OS version (output of swift --version ; uname -a)

No response

@compnerd compnerd added the bug label May 17, 2023
@neonichu neonichu self-assigned this May 17, 2023
neonichu added a commit that referenced this issue May 19, 2023
This allows us to take control of these compiler invocations and is a first step towards unifying all the various ways of generating compiler arguments that are currently in `SwiftTargetBuildDescription`.

This PR aims to keep the behavior of the existing tool as far as possible, the only known differences are single quotes instead of double for arguments with spaces and the fact that the output file map will be created eagerly.

resolves #6575
neonichu added a commit that referenced this issue May 22, 2023
This allows us to take control of these compiler invocations and is a first step towards unifying all the various ways of generating compiler arguments that are currently in `SwiftTargetBuildDescription`.

This PR aims to keep the behavior of the existing tool as far as possible, the only known differences are single quotes instead of double for arguments with spaces and the fact that the output file map will be created eagerly.

resolves #6575
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants