fix(build): preserve forced include paths with spaces #8629
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8629"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T19:03:19Z.
What
Quote the path to
HostStandardStreams.hppinside each CMakeSHELL:-includeoption. CMake otherwise splits a checkout path containing spaces into multiple compiler arguments, which makes Windows builds fail on the forced include.The fix covers the libc target, the library loop and shader recompiler target. Closes #8607.
Tested
/tmp/AnyPS5 space fixture: generated the forced-include command with the header path as one quoted argument and compiled the fixture successfully.python3 tools/check_conventions.py --base upstream/main: passed.git diff upstream/main...HEAD --check: passed.libsbuild after quoting the path.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T19:05:50Z.
Additional validation: I cross-configured a Windows-target CMake/Ninja object fixture on Linux with MinGW GCC 12.0.0. Source and build paths contained spaces, as did the forced-header path. Compilation passed, and the generated command kept the
-includeheader as one quoted argument. This is a focused MinGW cross-compile, not a full Windows project build.Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-21T16:12:09Z.
A native Windows build from a path with a space: Windows 11 26300, WinLibs GCC 15.2.0, Ninja, Release,
BUILD_TESTING=ON. The source wasC:/Users/leand/anyps5-work/Any PS5 space, and the build directory.../build space.main2c4b116da9:libcfails on its first file, as in #8607:FAILED: core/libs/CMakeFiles/libc.dir/prx/libc/Export.cpp.obj,c++.exe: fatal error: cannot specify '-o' with '-c', '-S' or '-E' with multiple files.03af44ef2a) merged into the samemain(clean merge):-k 0, 5670 steps) succeeds, except forImageArrayWindowPastLayerLimit.cpp, which fails the same way from a path without spaces (#8310)..prxlibraries and the shader recompiler objects.build.ninjahas 921 quoted-include "…/HostStandardStreams.hpp"flags and no unquoted ones. That covers all three sites:libc, the library loop, and the recompiler (checked onSpirvModuleEmitter.cpp).guest_file_lock*,guest_filesystem,libc_*,agc_shader_disk_cache*,agc_driver_graphics).BUILD_TESTING=OFFbuilds onlylibcand a few tools here, so a check with tests off wouldn't reach the other two sites.Imported from boykopovar/AnyPS5. Originally posted by Queuse on 2026-10-21T23:36:24Z.
Native Windows 11 validation: applied
03af44ef2ato main926ed2eda1and built the completelibstarget from a source path containing a space (GCC 15.2.0-r7, Ninja, Release). The build succeeded; generated commands retain the forced header as one quoted argument in all three target families. The same pinned main also built from a path without spaces. No title run. AI-assisted: yes.Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-25T12:36:53Z.
Review: APPROVED
Reviewed head
03af44ef2a6bbc862021080860df21083da7d26d. No actionable findings in this focused Windows build fix.The nested quotes keep the HostStandardStreams.hpp pathname together when CMake parses each SHELL:-include option. All three sites are covered: libc, the library loop and shader-recompiler targets. Paths without spaces retain the same forced-include behavior.
Validation: Windows, supported MinGW GCC 15.2.0, CMake/Ninja: exercised the three exact option lines in a small compiler fixture whose source/header/build paths contain spaces. All three head targets build and run successfully with the forced header required by the source. The same fixture with baseline options fails compilation for all three targets because the pathname is split into separate arguments. Conventions and whitespace checks pass. Hosted relinker/ASan and policy checks pass; full product jobs are skipped.
Scope: Real compiler argument handling with representative forced headers, not a complete rebuild of libc, shader recompiler or the application.