Without this the recommended way to silence emsdk_env was to pipe its
stderr to /dev/null.. but then you also loose potentially useful error
message.
Fixes: #946
* Explicit outputs for wasm_cc_binary
* Backwards compatibility
* data_runfiles restore
* restore test_bazel.sh
* Using wrong path on accident
* two separate rules for legacy support
* Added name attribute to wasm_cc_binary rule
* Optimize sandbox performance
Link just the files needed to compile, link, or archive, rather than the entire directory tree. This drastically improves build times on macOS, where the sandbox is known to be slow (https://github.com/bazelbuild/bazel/issues/8230).
* Linux wants clang to link
* all_files not needed?
* Linux wants llc
* And llvm-ar
* Templated build_file_content
* Pass -DENABLE_WERROR=0 when building Binaryen
We are experiencing an issue at our Unity CI with building Binaryen: https://github.com/WebAssembly/binaryen/issues/4588
It seems that for end users, disabling -Werror is a good general measure to enable wider chance of success to build. Emsdk installations are unlikely to be used by Binaryen developers to iterate on Binaryen development, so it is not necessary there?
* Flake
* Enable building LLVM with about-to-be deprecated toolchains for best chance of succeeding with the build.
* Shorten line length
* Adjust to 80 columns
When doing a git clone of a branch, instead of doing a general git clone that first would check out the default (main/master) branch and then later doing a checkout to switch to the target branch, instead specify the `--branch` option to the clone command line to immediately clone and checkout the desired final branch.
This helps first checkout runtime performance on CIs, especially when using shallow clones (GIT_CLONE_SHALLOW option).
Also this sidesteps a really odd git clone issue we are currently seeing in our CI, where it is unable to `checkout` the googletest submodule in binaryen, but would fail saying "path not found".
* Fix native Closure Compiler to work. Reverts my earlier PR #803 which was a great mistake, as it caused Emscripten to silently fall back to Java version of the Closure Compiler. After this PR, Closure Compiler will work on user platforms that do not have Java installed. Also forcibly remove Java version of Closure Compiler on systems where installing the native version succeeds, in order to save on code size.
* Add note to bug
* Improve google-closure-compiler-java uninstall.
* Read Closure version from Emscripten repository
* Skip native google-closure-compiler install when it is not present in the emscripten branch in package.json
* Print error
* Cache git executable search into a variable. This helps reduce noise in the verbose debug logging output messages when EMSDK_VERBOSE=1 is enabled.
* Flake
* Mark cached_git_executable global
Regarding the change to `content_exists`, we only support tools that
are directories full of files, there is no such thing as a tool that
is just a single file and not a directory.