Rollup merge of #120278 - djkoloski:remove_fatal_warnings_wasm, r=oli-obk
Remove --fatal-warnings on wasm targets These were added with good intentions, but a recent change in LLVM 18 emits a warning while examining .rmeta sections in .rlib files. Since this flag is a nice-to-have and users can update their LLVM linker independently of rustc's LLVM version, we can just omit the flag. See [this comment on wasm targets' uses of `--fatal-warnings`](https://github.com/llvm/llvm-project/pull/78658#issuecomment-1906651390).
This commit is contained in:
commit
565961bbf0
@ -38,9 +38,6 @@ macro_rules! args {
|
|||||||
// supposed to be imported and have all other symbols generate errors if
|
// supposed to be imported and have all other symbols generate errors if
|
||||||
// they remain undefined.
|
// they remain undefined.
|
||||||
concat!($prefix, "--allow-undefined"),
|
concat!($prefix, "--allow-undefined"),
|
||||||
// Rust code should never have warnings, and warnings are often
|
|
||||||
// indicative of bugs, let's prevent them.
|
|
||||||
concat!($prefix, "--fatal-warnings"),
|
|
||||||
// LLD only implements C++-like demangling, which doesn't match our own
|
// LLD only implements C++-like demangling, which doesn't match our own
|
||||||
// mangling scheme. Tell LLD to not demangle anything and leave it up to
|
// mangling scheme. Tell LLD to not demangle anything and leave it up to
|
||||||
// us to demangle these symbols later. Currently rustc does not perform
|
// us to demangle these symbols later. Currently rustc does not perform
|
||||||
|
@ -5,10 +5,7 @@
|
|||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
// Reset flags for non-Em flavors back to empty to satisfy sanity checking tests.
|
// Reset flags for non-Em flavors back to empty to satisfy sanity checking tests.
|
||||||
let pre_link_args = LinkArgs::new();
|
let pre_link_args = LinkArgs::new();
|
||||||
let post_link_args = TargetOptions::link_args(
|
let post_link_args = TargetOptions::link_args(LinkerFlavor::EmCc, &["-sABORTING_MALLOC=0"]);
|
||||||
LinkerFlavor::EmCc,
|
|
||||||
&["-sABORTING_MALLOC=0", "-Wl,--fatal-warnings"],
|
|
||||||
);
|
|
||||||
|
|
||||||
let opts = TargetOptions {
|
let opts = TargetOptions {
|
||||||
os: "emscripten".into(),
|
os: "emscripten".into(),
|
||||||
|
Loading…
Reference in New Issue
Block a user