Skip to content

Fix clang wrapper resolution in paths containing spaces - #1944

Merged
lewing merged 1 commit into
mainfrom
copilot/start-runtime-and-github-mcp-servers
Oct 12, 2026
Merged

lewing merged 1 commit into
mainfrom
copilot/start-runtime-and-github-mcp-servers

Conversation

Copilot AI commented Oct 9, 2026

Copy link
Copy Markdown

The shipped clang and clang++ wrappers fail when installed under a path containing spaces: unquoted $0 is split before dirname resolves the compiler directory.

  • Wrapper fix: Quote "$0" in eng/clang-wrapper.sh:
    CLANG_CC=$(dirname "$0")/clang-23
  • Scope: Correct the source used by the workload pack, rather than patching runtime’s local SDK cache.

@agocke

agocke commented Oct 9, 2026

Copy link
Copy Markdown
Member

Fixes dotnet/runtime#135416

@lewing
lewing merged commit 643f6ed into main Oct 12, 2026
10 checks passed
@lewing
lewing deleted the copilot/start-runtime-and-github-mcp-servers branch October 12, 2026 15:26
@akoeplinger

Copy link
Copy Markdown
Member

/backport to release/11.0

@github-actions

Copy link
Copy Markdown

Started backporting to release/11.0 (link to workflow run)

@akoeplinger

Copy link
Copy Markdown
Member

/backport to release/10.0

@github-actions

Copy link
Copy Markdown

Started backporting to release/10.0 (link to workflow run)

@github-actions

Copy link
Copy Markdown

@akoeplinger backporting to release/10.0 failed, the patch most likely resulted in conflicts. Please backport manually!

git am output
$ git cherry-pick 643f6edfb9515443c33517d9c5a2b186974779c6

Auto-merging eng/clang-wrapper.sh
CONFLICT (content): Merge conflict in eng/clang-wrapper.sh
error: could not apply 643f6edf... Fix clang wrapper paths containing spaces (#1944)
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config set advice.mergeConflict false"


$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Fix clang wrapper paths containing spaces
Using index info to reconstruct a base tree...
M	eng/clang-wrapper.sh
Falling back to patching base and 3-way merge...
Auto-merging eng/clang-wrapper.sh
CONFLICT (content): Merge conflict in eng/clang-wrapper.sh
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Fix clang wrapper paths containing spaces
Error: The process '/usr/bin/git' failed with exit code 128

Link to workflow output

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.

4 participants