Skip to content

Fix Ninja build on Windows#20556

Merged
RReverser merged 2 commits intoemscripten-core:mainfrom
RReverser:fix-windows-ninja
Oct 27, 2023
Merged

Fix Ninja build on Windows#20556
RReverser merged 2 commits intoemscripten-core:mainfrom
RReverser:fix-windows-ninja

Conversation

@RReverser
Copy link
Collaborator

@RReverser RReverser commented Oct 27, 2023

: and space are special from Ninja's PoV and need to be escaped with $, while \ should be just converted to /. See #19079 (comment).

Also had to workaround ninja-build/ninja#53 (command line too long issue, which is common on Windows but apparently can happen on other OS too as limit is OS-specific) by utilising response file for archiving command.

I tested that this works on my Windows machine but not sure how to (and whether worth it) to test this on CI as well.

@RReverser RReverser requested review from dschuff and sbc100 October 27, 2023 18:35
@sbc100
Copy link
Collaborator

sbc100 commented Oct 27, 2023

We don't currently have any tests for EMCC_USE_NINJA.. so landing without test seems OK in this case.

@RReverser RReverser enabled auto-merge (squash) October 27, 2023 19:48
`:` and ` ` are special from Ninja's PoV and need to be escaped with `$`, while `\` should be just converted to `/`.

See emscripten-core#19079 (comment).

I tested that this works on my Windows machine but not sure how to (and whether worth it) to test this on CI as well.
@RReverser RReverser merged commit b14af61 into emscripten-core:main Oct 27, 2023
@RReverser RReverser deleted the fix-windows-ninja branch October 27, 2023 21:57
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.

2 participants