]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #47889 - alexcrichton:wasm-hidden-by-default, r=cramertj
authorkennytm <kennytm@gmail.com>
Wed, 31 Jan 2018 08:36:15 +0000 (16:36 +0800)
committerGitHub <noreply@github.com>
Wed, 31 Jan 2018 08:36:15 +0000 (16:36 +0800)
rustc: Add an option to default hidden visibility

This commit adds a new option to target specifictions to specify that symbols
should be "hidden" visibility by default in LLVM. While there are no existing
targets that take advantage of this the `wasm32-unknown-unknown` target will
soon start to use this visibility. The LLD linker currently interprets `hidden`
as "don't export this from the wasm module" which is what we want for 90% of our
functions. While the LLD linker does have a "export this symbol" argument which
is what we use for other linkers, it was also somewhat easier to do this change
instead which'll involve less arguments flying around. Additionally there's no
need for non-`hidden` visibility for most of our symbols!

This change should not immediately impact the wasm targets as-is, but rather
this is laying the foundations for soon integrating LLD as a linker for wasm
code.


Trivial merge