Skip to content

Commit 8cb5c40

Browse files
committed
wasm: update the overrides
1 parent 7e4ed65 commit 8cb5c40

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

toolchain/internal/extra_targets.bzl

+22
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,29 @@ def overrides_for_target(rctx, triple):
359359
overrides = {
360360
"omit_hosted_linker_flags": True,
361361
"omit_cxx_stdlib_flag": True,
362+
363+
# libtool doesn't seem to be able to handle wasm
362364
"use_llvm_ar_instead_of_libtool_on_macos": True,
365+
366+
# lld ultimately shells out to `wasm-ld` which does *not* support
367+
# start end groups for libraries which is why this override is
368+
# important
369+
"custom_linker_tool": {
370+
"darwin": "wasm-ld",
371+
"k8": "wasm-ld",
372+
},
373+
374+
# wasm-ld doesn't understand `-l:libfoo.a` style syntax unfortunately
375+
"prefer_static_cxx_libs_on_linux_hosts": False,
376+
377+
# not yet supported on wasm; see: https://github.com/WebAssembly/tool-conventions/issues/133
378+
"linker_include_build_id_on_linux_hosts": False,
379+
380+
# not support by `wasm-ld`:
381+
"linker_use_gnu_hash_style_on_linux_hosts": False,
382+
383+
# not applicable for wasm (we're not dynamically linking):
384+
"linker_use_elf_hardening_so_flags_on_linux_hosts": False,
363385
}
364386

365387
# `clang-12` specifically uses `-mthread-model posix` by default

0 commit comments

Comments
 (0)