<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/58038>58038</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            BUG with "emcc --bind -std=c++14 --emrun -s WASM=1 -s"
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          visoeclipse
      </td>
    </tr>
</table>

<pre>
    shared:INFO: (Emscripten: Running sanity checks)
cache:INFO: generating system headers: sysroot_install.stamp... (this will be cached in "/usr/local/Cellar/emscripten/3.1.23/libexec/cache/sysroot_install.stamp" for subsequent builds)
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libembind-rtti.a... (this will be cached in "/usr/local/Cellar/emscripten/3.1.23/libexec/cache/sysroot/lib/wasm32-emscripten/libembind-rtti.a" for subsequent builds)
system_libs:INFO: compiled 1 inputs
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libGL.a... (this will be cached in "/usr/local/Cellar/emscripten/3.1.23/libexec/cache/sysroot/lib/wasm32-emscripten/libGL.a" for subsequent builds)
system_libs:INFO: compiled 3 inputs
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libal.a... (this will be cached in "/usr/local/Cellar/emscripten/3.1.23/libexec/cache/sysroot/lib/wasm32-emscripten/libal.a" for subsequent builds)
system_libs:INFO: compiled 1 inputs
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libhtml5.a... (this will be cached in "/usr/local/Cellar/emscripten/3.1.23/libexec/cache/sysroot/lib/wasm32-emscripten/libhtml5.a" for subsequent builds)
system_libs:INFO: compiled 2 inputs
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libstubs-debug.a... (this will be cached in "/usr/local/Cellar/emscripten/3.1.23/libexec/cache/sysroot/lib/wasm32-emscripten/libstubs-debug.a" for subsequent builds)
system_libs:INFO: compiled 2 inputs
cache:INFO:  - ok
cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/libc-debug.a... (this will be cached in "/usr/local/Cellar/emscripten/3.1.23/libexec/cache/sysroot/lib/wasm32-emscripten/libc-debug.a" for subsequent builds)
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
emcc: error: '/usr/local/Cellar/emscripten/3.1.23/libexec/llvm/bin/clang -target wasm32-unknown-emscripten -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -Werror=implicit-function-declaration -I/usr/local/Cellar/emscripten/3.1.23/libexec/cache/sysroot/include/SDL --sysroot=/usr/local/Cellar/emscripten/3.1.23/libexec/cache/sysroot -Xclang -iwithsysroot/include/compat -O2 -Werror -fno-unroll-loops -std=c99 -D_XOPEN_SOURCE=700 -Wno-unused-result -Os -fno-inline-functions -fno-builtin -Wno-ignored-attributes -Wno-macro-redefined -Wno-shift-op-parentheses -Wno-string-plus-int -Wno-pointer-sign -g3 -I/usr/local/Cellar/emscripten/3.1.23/libexec/system/lib/libc/musl/src/internal -I/usr/local/Cellar/emscripten/3.1.23/libexec/system/lib/libc/musl/src/include -I/usr/local/Cellar/emscripten/3.1.23/libexec/system/lib/pthread -c /usr/local/Cellar/emscripten/3.1.23/libexec/system/lib/libc/musl/src/fenv/__flt_rounds.c -o /usr/local/Cellar/emscripten/3.1.23/libexec/cache/build/libc-debug-tmp/__flt_rounds.o' failed (received SIGABRT (-6))
Traceback (most recent call last):
  File "/usr/local/Cellar/emscripten/3.1.23/libexec/emcc.py", line 4145, in <module>
    sys.exit(main(sys.argv))
  File "/usr/local/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/usr/local/Cellar/emscripten/3.1.23/libexec/emcc.py", line 4138, in main
    ret = run(args)
  File "/usr/local/Cellar/emscripten/3.1.23/libexec/emcc.py", line 1192, in run
    phase_calculate_system_libraries(state, linker_arguments, linker_inputs, newargs)
  File "/usr/local/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/usr/local/Cellar/emscripten/3.1.23/libexec/emcc.py", line 2860, in phase_calculate_system_libraries
    extra_files_to_link += system_libs.calculate(all_linker_inputs, newargs, forced=state.forced_stdlibs)
  File "/usr/local/Cellar/emscripten/3.1.23/libexec/tools/system_libs.py", line 2132, in calculate
    libs_to_link = get_libs_to_link(args, forced, only_forced)
  File "/usr/local/Cellar/emscripten/3.1.23/libexec/tools/system_libs.py", line 2092, in get_libs_to_link
    add_library('libc')
  File "/usr/local/Cellar/emscripten/3.1.23/libexec/tools/system_libs.py", line 2014, in add_library
    libs_to_link.append((lib.get_link_flag(), need_whole_archive))
  File "/usr/local/Cellar/emscripten/3.1.23/libexec/tools/system_libs.py", line 379, in get_link_flag
    fullpath = self.build()
  File "/usr/local/Cellar/emscripten/3.1.23/libexec/tools/system_libs.py", line 371, in build
    return shared.Cache.get(self.get_path(), self.do_build, force=USE_NINJA == 2, quiet=USE_NINJA)
  File "/usr/local/Cellar/emscripten/3.1.23/libexec/tools/cache.py", line 153, in get
    creator(str(cachename))
  File "/usr/local/Cellar/emscripten/3.1.23/libexec/tools/system_libs.py", line 480, in do_build
    create_lib(out_filename, self.build_objects(build_dir))
  File "/usr/local/Cellar/emscripten/3.1.23/libexec/tools/system_libs.py", line 460, in build_objects
    run_build_commands(commands)
  File "/usr/local/Cellar/emscripten/3.1.23/libexec/tools/system_libs.py", line 85, in run_build_commands
    shared.run_multiple_processes(commands, env=clean_env())
  File "/usr/local/Cellar/emscripten/3.1.23/libexec/tools/shared.py", line 215, in run_multiple_processes
    raise Exception('Subprocess %d/%d failed (%s)! (cmdline: %s)' % (idx + 1, len(commands), returncode_to_str(finished_process.returncode), shlex_join(commands[idx])))
Exception: Subprocess 224/998 failed (returned 1)! (cmdline: /usr/local/Cellar/emscripten/3.1.23/libexec/emcc -O2 -Werror -fno-unroll-loops -std=c99 -D_XOPEN_SOURCE=700 -Wno-unused-result -Os -fno-inline-functions -fno-builtin -Wno-ignored-attributes -Wno-macro-redefined -Wno-shift-op-parentheses -Wno-string-plus-int -Wno-pointer-sign -g -sSTRICT -I/usr/local/Cellar/emscripten/3.1.23/libexec/system/lib/libc/musl/src/internal -I/usr/local/Cellar/emscripten/3.1.23/libexec/system/lib/libc/musl/src/include -I/usr/local/Cellar/emscripten/3.1.23/libexec/system/lib/pthread -c /usr/local/Cellar/emscripten/3.1.23/libexec/system/lib/libc/musl/src/fenv/__flt_rounds.c -o /usr/local/Cellar/emscripten/3.1.23/libexec/cache/build/libc-debug-tmp/__flt_rounds.o)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJztWdty2zYQ_RrpBUOORFo29aAHW7Iy7qRxJk7avnFAEhIRgwALgL78fc-S1M11pkkdO-40Mx6RXFz2nMViFwtnprifuZJbUQzi04t3y0s82CBKziuXW1l7oUnwodFa6jVzXEt_z_JS5NduEE0Ho8VgdJpzCPaGr4UWlvt2wL3zomKl4IWwjhohscb4VGrnuVIhfqs6DENS6kvp2K1UimWCtbMWTGq0RINo2TiLX2VyrvCcC6U4CcQOaLSMw3EYxdRNZuJO5HjrwEXLR_ViZrYylrkmc-LPRmjPskaq4svcWMDM9dfSBgrL7f0e7Q4afm-5q-IoOEBPoKtM6iKw3suQv5xVvgnWPxuto59ioNuzT26qWiqAHwN-3Xj3Qyz85u1rMiyhebI94x9pT65ekz0JzX_bP0tfqclrMmkP6MlWjX6kVZ0H7KAQWbN-TbY9gPXftnD--qybf71l3789P706pw6V9Iyjec2sqI31zBtWel-TxTEt_tbSl00WwuykRt1sHkFtzWeREyzpXCMw-5JxTbRz1RSC-RKWsNyVLOP5tb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