Open andrewrk opened 2 years ago
I don't know if this can help but changing this line (test/standalone/issue_11595/build.zig#L30) from 1000
iterations to 368
makes this test pass on Windows 11 and Zig 0.10.0-dev.3524+74673b7f6
.
If you look at #11595, you can see the title of the issue:
Macro defines lose double-quotes if sum of all source filenames + macros exceed certain length
So your suggestion would make the test pass because it would no longer check the condition that the test exists in order to check.
So your suggestion would make the test pass because it would no longer check the condition that the test exists in order to check.
Thanks.
Just to clarify, I was not suggesting changing the number of iterations, I was just pointing out the exact length for which the test passes and that the length seems to still be the issue.
My understanding of this bug is that
lib/std/build.zig
creates a "compiler response file" when building the sub-command `zig build-exe @"zig-cache/args/9238..."src/main.zig
parses the "compiler response file" to extract argumentssrc/Compilation.zig#updateCObject()
spawn the sub-command with the extracted arguments zig clang ...args...
and fail because of the Windows limit and the command line length.Maybe updateCObject()
also needs a mechanism to build a "compiler response file" to pass to zig clang
?
The fix was reverted in 9bcd48e40e272408879a442b21099ea5ab6b85b4 due to usage of realpath
.
Related: #12380 #12381