Skip to content

build(windows): quote the forced standard-stream include path - #11949

Merged
oneandonlydean merged 2 commits into
boykopovar:mainfrom
00xDisaster:fix/windows-include-path-quoting
Oct 28, 2026
Merged

oneandonlydean merged 2 commits into
boykopovar:mainfrom
00xDisaster:fix/windows-include-path-quoting

Conversation

@00xDisaster

@00xDisaster 00xDisaster commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

What

Quote the paths inside the three Windows-only SHELL:-include options that force-include HostStandardStreams.hpp. SHELL: splits its argument with shell-like quoting, so an unquoted source path containing a space became two words and the compiler saw a second input file. The option now reaches the compiler as one argument; a path without a space produces the same command as before.

The branch is stacked on #11723 because the Windows relinker's conventions shard hit a separate 10 second subprocess timeout in the same job. #11723 raises that timeout; this change is otherwise independent.

Fixes: #8607

Tested

Linux x86_64, GCC, CMake 4.4.4, Ninja.

  • The normal libc target configures and builds with the changed CMake files.
  • An isolated CMake project with the same SHELL:-include \"...\" form and a source directory named space src builds; build.ninja contains FLAGS = -include \"/tmp/.../space src/HostStandardStreams.hpp\" as one argument. The unquoted form fails on the same project.
  • No Windows toolchain is installed locally. The issue reports the Windows failure and this exact quoting on both a spaced and an unspaced path.
  • The branch includes test(tools): give the check_stub subprocess more time #11723's 120 second conventions timeout and passes conventions, test registration and git diff --check; the Windows job exercises the longer timeout.

No game was run.

Checklist

check_stub runs check_conventions.py in a temporary repository with a
10 s limit. The slowest tests of this file take 8 to 11 s each on a
Windows 10 machine here, and in a full ctest run the call exceeded the
limit (subprocess.TimeoutExpired after 10 seconds), so
conventions_function_bodies_shard_5 failed although it passes on its
own. The limit is now 120 s, the same as the ctest timeout of the shard.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the fix error Closes an issue (Fixes #N) label Oct 27, 2026
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5021 core/libs/CMakeLists.txt
PR 5925 core/shader/recompiler/CMakeLists.txt
PR 7275 core/libs/CMakeLists.txt
PR 7622 core/libs/CMakeLists.txt
core/shader/recompiler/CMakeLists.txt
PR 7642 core/shader/recompiler/CMakeLists.txt
PR 7922 core/shader/recompiler/CMakeLists.txt
PR 8004 core/shader/recompiler/CMakeLists.txt
PR 8650 core/libs/CMakeLists.txt
PR 9156 core/libs/CMakeLists.txt
PR 9293 core/libs/CMakeLists.txt
PR 9297 core/libs/CMakeLists.txt
PR 9302 core/libs/CMakeLists.txt
PR 9356 core/shader/recompiler/CMakeLists.txt
PR 9383 core/libs/CMakeLists.txt
PR 9387 core/shader/recompiler/CMakeLists.txt
PR 9508 core/shader/recompiler/CMakeLists.txt
PR 10193 core/shader/recompiler/CMakeLists.txt
PR 10427 core/libs/CMakeLists.txt
PR 12130 core/libs/CMakeLists.txt

@00xDisaster
00xDisaster force-pushed the fix/windows-include-path-quoting branch from e63c1ba to 0a20a1a Compare October 27, 2026 14:44
@00xDisaster
00xDisaster force-pushed the fix/windows-include-path-quoting branch from 0a20a1a to a07835c Compare October 27, 2026 14:59
@ycbuzi

ycbuzi commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Windows check with a space in the source path, which Tested couldn't run. Windows 11 Home 10.0.26200, WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), CMake 4.3.1, Ninja, Release. The source tree was reached through a directory junction D:\AnyPS5\wt fmax, a fresh build directory each time, cmake -S "D:\AnyPS5\wt fmax" -B ..., then ninja on one libc object (core/libs/CMakeFiles/libc.dir/prx/libc/Export.cpp.obj).

tree FLAGS in build.ninja compile
main d13b3d7c55 ... -include D:/AnyPS5/wt fmax/core/libs/prx/libc/include/HostStandardStreams.hpp fails: c++.exe: fatal error: cannot specify '-o' with '-c', '-S' or '-E' with multiple files
this PR a07835c9f9 merged onto it ... -include "D:/AnyPS5/wt fmax/core/libs/prx/libc/include/HostStandardStreams.hpp" succeeds

So on Windows the unquoted path splits at the space and GCC sees a second input file, and the quoted form compiles. That's #8607's failure. Not covered: the core/shader/recompiler include and a full build from a spaced path. Paths without a space were already covered by every other run here.

AI-assisted: yes (Claude Code)

@maskym

maskym commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Windows result for head a07835c9f9, merged into main f759e165d9 (the PR's GPUs tested line names no NVIDIA run on Windows).

This PR's own tests: the conventions_function_bodies shards (the quoted -include path builds all 372 libraries and every test executable on Windows, which is the point of the change; the libc targets using the forced include compile), all passed.

Host: Windows 11 26300, Intel i7-12700K, NVIDIA GeForce RTX 2070 SUPER (vendor 0x10de, device 0x1e84; Vulkan loader 1.4.357 from the NVIDIA driver), Khronos Validation Layers nightly 1.4.366 (b2b44c0d37) through VK_ADD_LAYER_PATH, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, BUILD_TESTING=ON, Ninja. Build clean.

Same focused run on main f759e165d9 and on this tree, same machine and GPU: VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1, VK_LOADER_DEBUG=error,warn,layer, ctest --test-dir build -R '^(agc|guest_video_out|video_out)' --parallel 4 -V.

The tree also carried the open PRs #11951, #11711, #11704, #11692, #11691, #11690, #11794, all merged cleanly, so the run is a joint one; of those, #11692's new agc_driver_depth_plane_cpu_write_after_page_unwatch fails on this host, reported on that PR. Not run on a PS5.

AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine.

@THEMANnt THEMANnt left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed a07835c9f982921977726abddf9ad8288fe20d90 — approve. All three forced-include options preserve a source path containing spaces as one compiler argument.

Windows/GCC 15.2/CMake/Ninja: three isolated targets use the exact submitted option strings under a path with spaces; all build, link and run. The three old option forms fail their build. The fixture header checks that the include actually arrived; this does not build libc or the shader recompiler. The inherited conventions-test timeout-only change was inspected separately. Hosted Build reports success; no GPU execution is claimed.

@00xDisaster

Copy link
Copy Markdown
Contributor Author

@THEMANnt thanks for the approval. @ycbuzi and @maskym thanks for the two independent Windows checks: the spaced-path compile and the full conventions-shard build. The branch is still stacked on #11723 for the conventions timeout; I will rebase it onto main as soon as #11723 lands, then this PR only carries the SHELL:-include quoting change.

@oneandonlydean oneandonlydean self-assigned this Oct 28, 2026
@oneandonlydean
oneandonlydean merged commit d5b654d into boykopovar:main Oct 28, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build fix error Closes an issue (Fixes #N) shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build(windows): the forced -include of HostStandardStreams.hpp breaks the build when the source path contains a space

6 participants