Repository: rust
Issue: Cannot build to emscripten target with strict mode enabled.
Labels: T-compiler,O-wasm,C-bug,O-emscripten

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code:

```rust
fn main() {
    println!("Hello, world!")
}
```

with following config.toml

```toml
[target.wasm32-unknown-emscripten]
rustflags = [
    "-C",
    "link-arg=-lnodefs.js",
    "-C",
    "link-arg=-lnoderawfs.js",
    "-C",
    "link-arg=-sALLOW_MEMORY_GROWTH",
    "-C",
    "link-arg=-sEXIT_RUNTIME=1",
]
runner = "node"

[env]
EMCC_STRICT="1"
RUST_BACKTRACE="1"
```

I expected to see this happen: *Compile and run successfully*.

Instead, this happened: *Failed with undefined symbols exported*.

<detail>

```
+ cargo +nightly run -Zbuild-std --target wasm32-unknown-emscripten --release -vv --bin helloworld
...... # Emitted
       Dirty wasm_emscripten_fs_bug v0.1.0 (/Users/huangboyi/Projects/wasm_emscripten_fs_bug): the toolchain changed
   Compiling wasm_emscripten_fs_bug v0.1.0 (/Users/huangboyi/Projects/wasm_emscripten_fs_bug)
     Running `CARGO=/Users/huangboyi/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/cargo CARGO_CRATE_NAME=wasm_emscripten_fs_bug CARGO_MANIFEST_DIR=/Users/huangboyi/Projects/wasm_emscripten_fs_bug CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=wasm_emscripten_fs_bug CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.1.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 CARGO_RUSTC_CURRENT_DIR=/Users/huangboyi/Projects/wasm_emscripten_fs_bug DYLD_FALLBACK_LIBRARY_PATH='/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/release/deps:/Users/huangboyi/.rustup/toolchains/nightly-aarch64-apple-darwin/lib:/Users/huangboyi/.rustup/toolchains/nightly-aarch64-apple-darwin/lib:/Users/huangboyi/lib:/usr/local/lib:/usr/lib' /Users/huangboyi/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/rustc --crate-name wasm_emscripten_fs_bug --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=128 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=71151a7ce089efb4 -C extra-filename=-71151a7ce089efb4 --out-dir /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps --target wasm32-unknown-emscripten -L dependency=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps -L dependency=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/release/deps --extern 'noprelude:alloc=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/liballoc-74fe7e501f7c70cf.rmeta' --extern 'noprelude:compiler_builtins=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libcompiler_builtins-2b31b48ff4f4a613.rmeta' --extern 'noprelude:core=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libcore-c85502135f2a0df6.rmeta' --extern emscripten_functions=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libemscripten_functions-cef5ac2cd11e77c9.rmeta --extern 'noprelude:panic_unwind=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libpanic_unwind-bdb4c697b4946812.rmeta' --extern 'noprelude:proc_macro=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libproc_macro-01a0f280f5bb6473.rmeta' --extern 'noprelude:std=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libstd-f99c64f6dd1305f5.rmeta' -Z unstable-options -C link-arg=-lnodefs.js -C link-arg=-lnoderawfs.js -C link-arg=-sALLOW_MEMORY_GROWTH -C link-arg=-sEXIT_RUNTIME=1 -L native=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/build/emscripten-functions-a4927023cc152b7c/out`
     Running `CARGO=/Users/huangboyi/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/cargo CARGO_BIN_NAME=helloworld CARGO_CRATE_NAME=helloworld CARGO_MANIFEST_DIR=/Users/huangboyi/Projects/wasm_emscripten_fs_bug CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=wasm_emscripten_fs_bug CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.1.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 CARGO_RUSTC_CURRENT_DIR=/Users/huangboyi/Projects/wasm_emscripten_fs_bug DYLD_FALLBACK_LIBRARY_PATH='/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/release/deps:/Users/huangboyi/.rustup/toolchains/nightly-aarch64-apple-darwin/lib:/Users/huangboyi/.rustup/toolchains/nightly-aarch64-apple-darwin/lib:/Users/huangboyi/lib:/usr/local/lib:/usr/lib' /Users/huangboyi/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/rustc --crate-name helloworld --edition=2021 src/bin/helloworld.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=128 --crate-type bin --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no -C metadata=c21172a7f0190588 --out-dir /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps --target wasm32-unknown-emscripten -L dependency=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps -L dependency=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/release/deps --extern 'noprelude:alloc=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/liballoc-74fe7e501f7c70cf.rlib' --extern 'noprelude:compiler_builtins=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libcompiler_builtins-2b31b48ff4f4a613.rlib' --extern 'noprelude:core=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libcore-c85502135f2a0df6.rlib' --extern emscripten_functions=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libemscripten_functions-cef5ac2cd11e77c9.rlib --extern 'noprelude:panic_unwind=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libpanic_unwind-bdb4c697b4946812.rlib' --extern 'noprelude:proc_macro=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libproc_macro-01a0f280f5bb6473.rlib' --extern 'noprelude:std=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libstd-f99c64f6dd1305f5.rlib' --extern wasm_emscripten_fs_bug=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libwasm_emscripten_fs_bug-71151a7ce089efb4.rlib -Z unstable-options -C link-arg=-lnodefs.js -C link-arg=-lnoderawfs.js -C link-arg=-sALLOW_MEMORY_GROWTH -C link-arg=-sEXIT_RUNTIME=1 -L native=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/build/emscripten-functions-a4927023cc152b7c/out`
error: linking with `emcc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/Users/huangboyi/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin:/Users/huangboyi/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/self-contained:/Users/huangboyi/anaconda3/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin:/Users/huangboyi/emsdk:/Users/huangboyi/emsdk/upstream/emscripten:/Users/huangboyi/Library/pnpm:/Users/huangboyi/anaconda3/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/huangboyi/.cargo/bin" VSLANG="1033" "emcc" "-s" "EXPORTED_FUNCTIONS=[\"_main\"]" "/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/helloworld.helloworld.f45530bb195a40cd-cgu.0.rcgu.o" "/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/helloworld.2ynqfu82oxsloz58.rcgu.o" "-L" "/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps" "-L" "/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/release/deps" "-L" "/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/build/emscripten-functions-a4927023cc152b7c/out" "-L" "/Users/huangboyi/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib" "/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libstd-f99c64f6dd1305f5.rlib" "/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libpanic_unwind-bdb4c697b4946812.rlib" "/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/librustc_demangle-c43c62be40541e3c.rlib" "/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libstd_detect-b2660fc16745b6ff.rlib" "/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libhashbrown-a6a40891dae8955d.rlib" "/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/librustc_std_workspace_alloc-a9b14fd89ec3a417.rlib" "/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libminiz_oxide-e6218b2e0fa45d71.rlib" "/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libadler-2c5d0b623a3adaf6.rlib" "/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libunwind-a573bf5cfdc6c443.rlib" "/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libcfg_if-126730bc5d231950.rlib" "/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/liblibc-bc7b82af187c7b28.rlib" "/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/liballoc-74fe7e501f7c70cf.rlib" "/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/librustc_std_workspace_core-8e42f0bd57a41f3f.rlib" "/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libcore-c85502135f2a0df6.rlib" "/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libcompiler_builtins-2b31b48ff4f4a613.rlib" "-l" "c" "-B/Users/huangboyi/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/gcc-ld" "-fuse-ld=lld" "--target=wasm32-unknown-emscripten" "-s" "DISABLE_EXCEPTION_CATCHING=0" "-L" "/Users/huangboyi/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib" "-L" "/Users/huangboyi/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/self-contained" "-o" "/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/helloworld.js" "-O3" "-g0" "-lnodefs.js" "-lnoderawfs.js" "-sALLOW_MEMORY_GROWTH" "-sEXIT_RUNTIME=1" "-sABORTING_MALLOC=0" "-Wl,--fatal-warnings"
  = note: emcc: warning: setting `DISABLE_EXCEPTION_CATCHING` is not meaningful unless linking as C++ [-Wlinkflags]
          wasm-ld: error: symbol exported via --export not found: __cxa_is_pointer_type
          wasm-ld: error: symbol exported via --export not found: __cxa_can_catch
          wasm-ld: error: symbol exported via --export not found: __cxa_increment_exception_refcount
          wasm-ld: error: symbol exported via --export not found: __cxa_decrement_exception_refcount
          wasm-ld: error: symbol exported via --export not found: __cxa_free_exception
          wasm-ld: error: /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libpanic_unwind-bdb4c697b4946812.rlib(panic_unwind-bdb4c697b4946812.panic_unwind.2c24c6f4fb7ba96a-cgu.0.rcgu.o): undefined symbol: __cxa_begin_catch
          wasm-ld: error: /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libpanic_unwind-bdb4c697b4946812.rlib(panic_unwind-bdb4c697b4946812.panic_unwind.2c24c6f4fb7ba96a-cgu.0.rcgu.o): undefined symbol: __cxa_end_catch
          wasm-ld: error: /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libpanic_unwind-bdb4c697b4946812.rlib(panic_unwind-bdb4c697b4946812.panic_unwind.2c24c6f4fb7ba96a-cgu.0.rcgu.o): undefined symbol: __cxa_allocate_exception
          wasm-ld: error: /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libpanic_unwind-bdb4c697b4946812.rlib(panic_unwind-bdb4c697b4946812.panic_unwind.2c24c6f4fb7ba96a-cgu.0.rcgu.o): undefined symbol: __cxa_throw
          wasm-ld: error: /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libpanic_unwind-bdb4c697b4946812.rlib(panic_unwind-bdb4c697b4946812.panic_unwind.2c24c6f4fb7ba96a-cgu.0.rcgu.o): undefined symbol: vtable for __cxxabiv1::__class_type_info
          emcc: error: '/Users/huangboyi/emsdk/upstream/bin/wasm-ld -o /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/helloworld.wasm /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/helloworld.helloworld.f45530bb195a40cd-cgu.0.rcgu.o /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/helloworld.2ynqfu82oxsloz58.rcgu.o -L/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps -L/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/release/deps -L/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/build/emscripten-functions-a4927023cc152b7c/out -L/Users/huangboyi/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libstd-f99c64f6dd1305f5.rlib /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libpanic_unwind-bdb4c697b4946812.rlib /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/librustc_demangle-c43c62be40541e3c.rlib /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libstd_detect-b2660fc16745b6ff.rlib /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libhashbrown-a6a40891dae8955d.rlib /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/librustc_std_workspace_alloc-a9b14fd89ec3a417.rlib /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libminiz_oxide-e6218b2e0fa45d71.rlib /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libadler-2c5d0b623a3adaf6.rlib /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libunwind-a573bf5cfdc6c443.rlib /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libcfg_if-126730bc5d231950.rlib /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/liblibc-bc7b82af187c7b28.rlib /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/liballoc-74fe7e501f7c70cf.rlib /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/librustc_std_workspace_core-8e42f0bd57a41f3f.rlib /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libcore-c85502135f2a0df6.rlib /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libcompiler_builtins-2b31b48ff4f4a613.rlib -lc -L/Users/huangboyi/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib -L/Users/huangboyi/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/wasm32-unknown-emscripten/lib/self-contained --fatal-warnings -L/Users/huangboyi/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten -lc -ldlmalloc -lcompiler_rt -lsockets --fatal-warnings -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-cxx-exceptions -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr /var/folders/t_/9rkxz6xn40q75nc_5vzm9h6r0000gn/T/tmpq6e7w75llibemscripten_js_symbols.so --strip-debug --export-if-defined=main --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=__start_em_lib_deps --export-if-defined=__stop_em_lib_deps --export-if-defined=__start_em_js --export-if-defined=__stop_em_js --export-if-defined=__main_argc_argv --export-if-defined=fflush --export=stackSave --export=stackRestore --export=stackAlloc --export=__errno_location --export=__get_temp_ret --export=__set_temp_ret --export=__funcs_on_exit --export=__cxa_is_pointer_type --export=__cxa_can_catch --export=__cxa_increment_exception_refcount --export=__cxa_decrement_exception_refcount --export=setThrew --export=__cxa_free_exception --export=__wasm_call_ctors --export-table -z stack-size=65536 --initial-memory=16777216 --max-memory=2147483648 --no-entry --table-base=1 --global-base=1024' failed (returned 1)
          

error: could not compile `wasm_emscripten_fs_bug` (bin "helloworld") due to 1 previous error

Caused by:
  process didn't exit successfully: `CARGO=/Users/huangboyi/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/cargo CARGO_BIN_NAME=helloworld CARGO_CRATE_NAME=helloworld CARGO_MANIFEST_DIR=/Users/huangboyi/Projects/wasm_emscripten_fs_bug CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=wasm_emscripten_fs_bug CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.1.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 CARGO_RUSTC_CURRENT_DIR=/Users/huangboyi/Projects/wasm_emscripten_fs_bug DYLD_FALLBACK_LIBRARY_PATH='/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/release/deps:/Users/huangboyi/.rustup/toolchains/nightly-aarch64-apple-darwin/lib:/Users/huangboyi/.rustup/toolchains/nightly-aarch64-apple-darwin/lib:/Users/huangboyi/lib:/usr/local/lib:/usr/lib' /Users/huangboyi/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/rustc --crate-name helloworld --edition=2021 src/bin/helloworld.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=128 --crate-type bin --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no -C metadata=c21172a7f0190588 --out-dir /Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps --target wasm32-unknown-emscripten -L dependency=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps -L dependency=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/release/deps --extern 'noprelude:alloc=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/liballoc-74fe7e501f7c70cf.rlib' --extern 'noprelude:compiler_builtins=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libcompiler_builtins-2b31b48ff4f4a613.rlib' --extern 'noprelude:core=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libcore-c85502135f2a0df6.rlib' --extern emscripten_functions=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libemscripten_functions-cef5ac2cd11e77c9.rlib --extern 'noprelude:panic_unwind=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libpanic_unwind-bdb4c697b4946812.rlib' --extern 'noprelude:proc_macro=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libproc_macro-01a0f280f5bb6473.rlib' --extern 'noprelude:std=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libstd-f99c64f6dd1305f5.rlib' --extern wasm_emscripten_fs_bug=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/deps/libwasm_emscripten_fs_bug-71151a7ce089efb4.rlib -Z unstable-options -C link-arg=-lnodefs.js -C link-arg=-lnoderawfs.js -C link-arg=-sALLOW_MEMORY_GROWTH -C link-arg=-sEXIT_RUNTIME=1 -L native=/Users/huangboyi/Projects/wasm_emscripten_fs_bug/target/wasm32-unknown-emscripten/release/build/emscripten-functions-a4927023cc152b7c/out` (exit status: 1)
```

</detail>

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.75.0 (82e1608df 2023-12-21)
binary: rustc
commit-hash: 82e1608dfa6e0b5569232559e3d385fea5a93112
commit-date: 2023-12-21
host: aarch64-apple-darwin
release: 1.75.0
LLVM version: 17.0.6
```

`rustc +nightly --version --verbose`:
```
rustc 1.77.0-nightly (3cdd004e5 2023-12-29)
binary: rustc
commit-hash: 3cdd004e55c869faa2b7b25efd3becf50346e7d6
commit-date: 2023-12-29
host: aarch64-apple-darwin
release: 1.77.0-nightly
LLVM version: 17.0.6
```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary>Backtrace</summary>
<p>

No backtrace here.

</p>
</details>