Skip to content

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Aug 26, 2025

Support for big endian targets is "best effort" and not fully supported or tested.

Also, as far as I'm aware there is only one or two users of this feature so I think it makes sense for it to stay as "best effort" for the foreseeable future.

See #25042

@sbc100 sbc100 changed the title Warn that SUPPORT_BIG_ENDIAN is experimental. NFC Warn that SUPPORT_BIG_ENDIAN is experimental Aug 26, 2025
@sbc100 sbc100 changed the title Warn that SUPPORT_BIG_ENDIAN is experimental Warn that SUPPORT_BIG_ENDIAN is experimental Aug 26, 2025
Support for big endian targets is "best effort" and not fully supported
or tested.
@sbc100 sbc100 merged commit 38b34de into emscripten-core:main Aug 28, 2025
30 checks passed
@sbc100 sbc100 deleted the big_endian branch August 28, 2025 00:16
@juj
Copy link
Collaborator

juj commented Aug 28, 2025

I know this is well-intentioned, though this PR now disrupts running the bigendian0 test suite, where majority of the tests then fail due to warnings being treated as errors.

E.g.

$ test/runner bigendian0.test_autodebug_wasm
Running test_core: (1 tests)
test_autodebug_wasm (test_core.bigendian0.test_autodebug_wasm) ... env_modify: {'EMCC_AUTODEBUG': '1'}
emcc: error: -sSUPPORT_BIG_ENDIAN is experimental, not all features are fully supported. [-Wexperimental] [-Werror]
None
None
FAIL

======================================================================
FAIL: test_autodebug_wasm (test_core.bigendian0.test_autodebug_wasm)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/ssd1000/emscripten_buildbot/worker_root/x10dax-linux-mint22/emscripten_x10dax/build/emscripten/main/test/common.py", line 1847, in run_process
    rtn = shared.run_process(cmd, check=check, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/ssd1000/emscripten_buildbot/worker_root/x10dax-linux-mint22/emscripten_x10dax/build/emscripten/main/tools/shared.py", line 112, in run_process
    ret = subprocess.run(cmd, check=check, input=input, *args, **kw)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/mnt/ssd1000/emscripten_buildbot/worker_root/x10dax-linux-mint22/emscripten_x10dax/build/emscripten/main/emcc', '/mnt/ssd1000/emscripten_buildbot/worker_root/x10dax-linux-mint22/emscripten_x10dax/build/emscripten/main/test/core/test_autodebug.c', '-o', 'test_autodebug.js', '-sNO_DEFAULT_TO_CXX', '-sSUPPORT_BIG_ENDIAN', '-Wclosure', '-Werror', '-Wno-limited-postlink-optimizations', '-O0', '-Wno-unused-command-line-argument', '-mreference-types']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/ssd1000/emscripten_buildbot/worker_root/x10dax-linux-mint22/emscripten_x10dax/build/emscripten/main/test/common.py", line 986, in resulting_test
    return func(self, *args)
           ^^^^^^^^^^^^^^^^^
  File "/mnt/ssd1000/emscripten_buildbot/worker_root/x10dax-linux-mint22/emscripten_x10dax/build/emscripten/main/test/common.py", line 720, in metafunc
    func(self, *args, **kwargs)
  File "/mnt/ssd1000/emscripten_buildbot/worker_root/x10dax-linux-mint22/emscripten_x10dax/build/emscripten/main/test/test_core.py", line 304, in decorated
    f(self, *args, **kwargs)
  File "/mnt/ssd1000/emscripten_buildbot/worker_root/x10dax-linux-mint22/emscripten_x10dax/build/emscripten/main/test/common.py", line 481, in modified
    return f(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/ssd1000/emscripten_buildbot/worker_root/x10dax-linux-mint22/emscripten_x10dax/build/emscripten/main/test/test_core.py", line 7043, in test_autodebug_wasm
    output = self.do_runf('core/test_autodebug.c', 'success')
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/ssd1000/emscripten_buildbot/worker_root/x10dax-linux-mint22/emscripten_x10dax/build/emscripten/main/test/common.py", line 2027, in do_runf
    return self._build_and_run(filename, expected_output, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/ssd1000/emscripten_buildbot/worker_root/x10dax-linux-mint22/emscripten_x10dax/build/emscripten/main/test/common.py", line 2056, in _build_and_run
    js_file = self.build(filename, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/ssd1000/emscripten_buildbot/worker_root/x10dax-linux-mint22/emscripten_x10dax/build/emscripten/main/test/common.py", line 1508, in build
    self.run_process(cmd, stderr=self.stderr_redirect if not DEBUG else None)
  File "/mnt/ssd1000/emscripten_buildbot/worker_root/x10dax-linux-mint22/emscripten_x10dax/build/emscripten/main/test/common.py", line 1852, in run_process
    self.fail(f'subprocess exited with non-zero return code({e.returncode}): `{shlex.join(cmd)}`')
AssertionError: subprocess exited with non-zero return code(1): `/mnt/ssd1000/emscripten_buildbot/worker_root/x10dax-linux-mint22/emscripten_x10dax/build/emscripten/main/emcc /mnt/ssd1000/emscripten_buildbot/worker_root/x10dax-linux-mint22/emscripten_x10dax/build/emscripten/main/test/core/test_autodebug.c -o test_autodebug.js -sNO_DEFAULT_TO_CXX -sSUPPORT_BIG_ENDIAN -Wclosure -Werror -Wno-limited-postlink-optimizations -O0 -Wno-unused-command-line-argument -mreference-types`

----------------------------------------------------------------------
Ran 1 test in 0.504s

FAILED (failures=1)

I don't think that it would be productive to modify each test to account for this warning message being possibly present.. probably would be simplest to just revert this? (I don't think there have ever been people complaining about expectations around -sSUPPORT_BIG_ENDIAN so far?)

sbc100 added a commit to sbc100/emscripten that referenced this pull request Aug 28, 2025
The change to make this config as experimental (emscripten-core#25058) raced with that
adding of the test suite (emscripten-core#25068).

Adding `-Wno-experimental` here like we do for other such configurations
(e.g. wasm64).
@sbc100
Copy link
Collaborator Author

sbc100 commented Aug 28, 2025

Sorry the marking as experimental raced with the adding of the new test config. Fix is in #25090

juj pushed a commit that referenced this pull request Aug 28, 2025
The change to make this config as experimental (#25058) raced with that
adding of the test suite (#25068).

Adding `-Wno-experimental` here like we do for other such configurations
(e.g. wasm64).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants