bazelbuild / bazelbuild/rules_swift

Linking with param file on Windows fails with spaces in paths

Open
#1,632 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
353
Forks
172
Avg merge
23h 14m
Merged PRs (30d)
8

Description

Trying to build https://github.com/apple/swift-argument-parser with Bazel fails on Windows at the linking step, because file paths in param files contain spaces that `llvm-lib.exe` doesn't parse as complete paths.

I tried setting `windows_quoting_for_param_files` at several places, but it doesn't seem to be passed on to the code handling the quoting. Other experiments also didn't work. Likely, this option is even not the right one to look at, even though it sounds related.

I'm not even sure now that `rules_swift` is the place where this needs to be fixed. If someone has other ideas, let me know.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Windows linking failure with a path containing spaces and trace how windows_quoting_for_param_files reaches the param-file handling around llvm-lib.exe. Compare the resulting argument parsing with a path without spaces; done means the Swift build links successfully on Windows when paths contain spaces.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.