Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
clang: error: unsupported option '--no-entry'
clang: error: unsupported option '--js-library=external/proxy_wasm_cpp_sdk/proxy_wasm_intrinsics.js'
clang: error: unknown argument: '-sSTANDALONE_WASM'
clang: error: unknown argument: '-sEXPORTED_FUNCTIONS=_malloc'
3. Rust wasm complains -- may be fixed with rules_rust update?
$ bazelisk build --verbose_failures --define engine=null --config=clang test/test_data:random.wasm
ERROR: /usr/local/google/home/mstevenson/git/proxy-wasm-cpp-host/test/test_data/BUILD:77:17: in (an implicit dependency) attribute of wasi_rust_binary_rule rule //test/test_data:random.wasm: in $whitelist_function_transition attribute of wasi_rust_binary_rule rule //test/test_data:random.wasm: package group '@@bazel_tools//tools/whitelists/function_transition_whitelist:function_transition_whitelist' is misplaced here (they are only allowed in the visibility attribute). Since this rule was created by the macro 'wasm_rust_binary', the error might have been caused by the macro implementation
ERROR: /usr/local/google/home/mstevenson/git/proxy-wasm-cpp-host/test/test_data/BUILD:77:17: Analysis of target '//test/test_data:random.wasm' failed
ERROR: Analysis of target '//test/test_data:random.wasm' failed; build aborted
While working on https://github.com/proxy-wasm/proxy-wasm-cpp-host/issues/384 I tried to update to Bazel 7, but I ran into a few build errors (below). This issue tracks fixing them.
Build errors seem to generally relate to toolchains + transitions:
--cxxopt
gets lost in C++ wasm transition (in proxy-wasm-cpp-sdk)no type named 'string_view' in namespace 'std'
--action_env=BAZEL_CXXOPTS="-std=c++17"
copts = ["-std=c++17"]
to all Bazel C++ targets (removes .bazelrc requirement)Emscripten linker gets lost in C++ wasm transition (in proxy-wasm-cpp-sdk)
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging clang: error: unsupported option '--no-entry' clang: error: unsupported option '--js-library=external/proxy_wasm_cpp_sdk/proxy_wasm_intrinsics.js' clang: error: unknown argument: '-sSTANDALONE_WASM' clang: error: unknown argument: '-sEXPORTED_FUNCTIONS=_malloc'
$ bazelisk build --verbose_failures --define engine=null --config=clang test/test_data:random.wasm ERROR: /usr/local/google/home/mstevenson/git/proxy-wasm-cpp-host/test/test_data/BUILD:77:17: in (an implicit dependency) attribute of wasi_rust_binary_rule rule //test/test_data:random.wasm: in $whitelist_function_transition attribute of wasi_rust_binary_rule rule //test/test_data:random.wasm: package group '@@bazel_tools//tools/whitelists/function_transition_whitelist:function_transition_whitelist' is misplaced here (they are only allowed in the visibility attribute). Since this rule was created by the macro 'wasm_rust_binary', the error might have been caused by the macro implementation ERROR: /usr/local/google/home/mstevenson/git/proxy-wasm-cpp-host/test/test_data/BUILD:77:17: Analysis of target '//test/test_data:random.wasm' failed ERROR: Analysis of target '//test/test_data:random.wasm' failed; build aborted