-
Notifications
You must be signed in to change notification settings - Fork 779
Ccache #711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| "activated_cfg": "NINJA=%installation_dir%/bin", | ||
| "activated_path": "%installation_dir%/bin", | ||
| "cmake_build_type": "Release", | ||
| "custom_install_script": "build_ninja" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just treat ninja like node an download the prebuilt binaries?
Looks like the zip files are easy to link to: https://github.com/ninja-build/ninja/releases
Or maybe just treat it like cmake itself and assume the developer has already installed it? Building from source seems like a less trodden path so have extra dependencies seems reasonable maybe? At least it seems like cmake and ninja should be treated in the same way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly because of being able to change up ninja code in a custom branch, because of getting direct Apple M1 Mac support this way, and to get backwards compatibility support against whichever Xcode SDK and Windows SDK that I compile for myself. (I don't know the guaranteed min OS versions of the precompiled releases).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we at least try it? or at least have "download binary" as the default way to download ninja? (then only folks with unusual OS/hardware need to build from source, like we do for llvm)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have have patches to ninja planned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not oppose adding prebuilt ninja as well, though I am not keen to work on that at the moment. Fortunately emsdk does allow a good structure to have both.
I do plan to change ninja to fix stdout printing issues on Windows. When one uses ninja, they lose colored output for error messages and all stdout gets needlessly buffered, resulting in EMCC_DEBUG being uncomfortable to use on Windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to simply use ninja pre-built bit I'm OK landing this as is.
Regarding the specifics of the ninja buffering issue. Are you talking about how the buffering causes the tools to skip adding color to their output? I agree it would be nice to find a fix for this, but I also really like how ninja buffers command and output rather than the nasty interleaving one gets with make VERVOSE=1 -jN.
|
Ping, any other reviews? If not, I'll proceed and land this. |
sbc100
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
| "activated_cfg": "NINJA=%installation_dir%/bin", | ||
| "activated_path": "%installation_dir%/bin", | ||
| "cmake_build_type": "Release", | ||
| "custom_install_script": "build_ninja" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to simply use ninja pre-built bit I'm OK landing this as is.
Regarding the specifics of the ninja buffering issue. Are you talking about how the buffering causes the tools to skip adding color to their output? I agree it would be nice to find a fix for this, but I also really like how ninja buffers command and output rather than the nasty interleaving one gets with make VERVOSE=1 -jN.
Yeah, that's right.
I think the right way is to do line buffering per each thread, and not character/printf segment buffering, but |
Not opposed at all with also having pre-built ninja packages in the manifest, but I don't find that so useful, mostly due to not getting M1 Mac Mini native ARM64 code, so not spending the time to work on that for now. |
I see.. it hadn't occurred to me that there might not be a ninja binary for that platform yet. Thanks for clarifying. |
|
Thank you @juj for this work and the fork of |
…otnet/llvm-project, dotnet/node, dotnet/source-build-reference-packages (emscripten-core#711) * Update dependencies from https://github.com/dotnet/source-build-reference-packages build Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.24155.1 -> To Version 9.0.0-alpha.1.24162.2 * Update dependencies from https://github.com/dotnet/emscripten build Microsoft.NETCore.Runtime.Wasm.Emscripten.Transport From Version 9.0.0-alpha.1.24161.1 -> To Version 9.0.0-alpha.1.24168.1 * Update dependencies from https://github.com/dotnet/source-build-reference-packages build Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.24155.1 -> To Version 9.0.0-alpha.1.24162.2 * Update dependencies from https://github.com/dotnet/llvm-project build runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Wasm.LLVM.Transport , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Wasm.LLVM.Transport , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Wasm.LLVM.Transport , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Wasm.LLVM.Transport , runtime.osx-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx-arm64.Microsoft.NETCore.Runtime.Wasm.LLVM.Transport , runtime.osx-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx-x64.Microsoft.NETCore.Runtime.Wasm.LLVM.Transport , runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.Wasm.LLVM.Transport , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Wasm.LLVM.Transport From Version 16.0.5-alpha.1.24161.3 -> To Version 16.0.5-alpha.1.24168.1 * Update dependencies from https://github.com/dotnet/binaryen build runtime.linux-arm64.Microsoft.NETCore.Runtime.Wasm.Binaryen.Transport , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Wasm.Binaryen.Transport , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Wasm.Binaryen.Transport , runtime.linux-x64.Microsoft.NETCore.Runtime.Wasm.Binaryen.Transport , runtime.osx-arm64.Microsoft.NETCore.Runtime.Wasm.Binaryen.Transport , runtime.osx-x64.Microsoft.NETCore.Runtime.Wasm.Binaryen.Transport , runtime.win-arm64.Microsoft.NETCore.Runtime.Wasm.Binaryen.Transport , runtime.win-x64.Microsoft.NETCore.Runtime.Wasm.Binaryen.Transport From Version 9.0.0-alpha.1.24163.4 -> To Version 9.0.0-alpha.1.24168.2 * Update dependencies from https://github.com/dotnet/emscripten build Microsoft.NETCore.Runtime.Wasm.Emscripten.Transport From Version 9.0.0-alpha.1.24161.1 -> To Version 9.0.0-alpha.1.24168.1 * Update dependencies from https://github.com/dotnet/llvm-project build runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Wasm.LLVM.Transport , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Wasm.LLVM.Transport , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Wasm.LLVM.Transport , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Wasm.LLVM.Transport , runtime.osx-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx-arm64.Microsoft.NETCore.Runtime.Wasm.LLVM.Transport , runtime.osx-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx-x64.Microsoft.NETCore.Runtime.Wasm.LLVM.Transport , runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.Wasm.LLVM.Transport , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Wasm.LLVM.Transport From Version 16.0.5-alpha.1.24161.3 -> To Version 16.0.5-alpha.1.24168.1 * Update dependencies from https://github.com/dotnet/binaryen build runtime.linux-arm64.Microsoft.NETCore.Runtime.Wasm.Binaryen.Transport , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Wasm.Binaryen.Transport , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Wasm.Binaryen.Transport , runtime.linux-x64.Microsoft.NETCore.Runtime.Wasm.Binaryen.Transport , runtime.osx-arm64.Microsoft.NETCore.Runtime.Wasm.Binaryen.Transport , runtime.osx-x64.Microsoft.NETCore.Runtime.Wasm.Binaryen.Transport , runtime.win-arm64.Microsoft.NETCore.Runtime.Wasm.Binaryen.Transport , runtime.win-x64.Microsoft.NETCore.Runtime.Wasm.Binaryen.Transport From Version 9.0.0-alpha.1.24163.4 -> To Version 9.0.0-alpha.1.24168.2 * Update dependencies from https://github.com/dotnet/node build runtime.linux-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport , runtime.linux-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport , runtime.osx-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport , runtime.osx-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport , runtime.win-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport , runtime.win-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport From Version 9.0.0-alpha.1.24161.1 -> To Version 9.0.0-alpha.1.24168.1 --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
This PR adds support for Ninja build system and ccache, to be built from source.
Needs a bit of code duplication cleanup in order to be able to land, but posting for visibility so that users can try it out.
The corresponding PR for emscripten is at emscripten-core/emscripten#13498 and the corresponding changes to ccache itself are at https://github.com/juj/ccache/tree/emscripten.
The general mechanism is that after activating ccache in Emscripten SDK, emcc and em++ will automatically take usage of the installed ccache tool.
Usage: