Skip to content

Commit

Permalink
wasm: update the overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
rrbutani committed Sep 13, 2021
1 parent 7e4ed65 commit 8cb5c40
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions toolchain/internal/extra_targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,29 @@ def overrides_for_target(rctx, triple):
overrides = {
"omit_hosted_linker_flags": True,
"omit_cxx_stdlib_flag": True,

# libtool doesn't seem to be able to handle wasm
"use_llvm_ar_instead_of_libtool_on_macos": True,

# lld ultimately shells out to `wasm-ld` which does *not* support
# start end groups for libraries which is why this override is
# important
"custom_linker_tool": {
"darwin": "wasm-ld",
"k8": "wasm-ld",
},

# wasm-ld doesn't understand `-l:libfoo.a` style syntax unfortunately
"prefer_static_cxx_libs_on_linux_hosts": False,

# not yet supported on wasm; see: https://github.com/WebAssembly/tool-conventions/issues/133
"linker_include_build_id_on_linux_hosts": False,

# not support by `wasm-ld`:
"linker_use_gnu_hash_style_on_linux_hosts": False,

# not applicable for wasm (we're not dynamically linking):
"linker_use_elf_hardening_so_flags_on_linux_hosts": False,
}

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

0 comments on commit 8cb5c40

Please sign in to comment.