Skip to content

Commit 81edc53

Browse files
committed
wasm: update the overrides
1 parent 7e4ed65 commit 81edc53

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

toolchain/internal/extra_targets.bzl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,26 @@ 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": "wasm-ld",
370+
371+
# wasm-ld doesn't understand `-l:libfoo.a` style syntax unfortunately
372+
"prefer_static_cxx_libs_on_linux_hosts": False,
373+
374+
# not yet supported on wasm; see: https://github.com/WebAssembly/tool-conventions/issues/133
375+
"linker_include_build_id_on_linux_hosts": False,
376+
377+
# not support by `wasm-ld`:
378+
"linker_use_gnu_hash_style_on_linux_hosts": False,
379+
380+
# not applicable for wasm (we're not dynamically linking):
381+
"linker_use_elf_hardening_so_flags_on_linux_hosts": False,
363382
}
364383

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

0 commit comments

Comments
 (0)