Skip to content

wasm64 suite --profiling-funcs regression #26968

Closed

Description

@juj

It looks like PR https://github.com/emscripten-core/emscripten/pull/26963/changes slipped in uses of --profiling-funcs to the wasm64 suite.

But at the same time, the test suites are run with -Werror, so this results in a number of tests failing with

C:\emsdk\emscripten\main>test\runner wasm64.test_dylink_dot_a
Running 1 tests
[1/1] test_dylink_dot_a (test_core.wasm64.test_dylink_dot_a) ... FAIL

Stdout:

emcc: error: linker flag ignored during compilation: '--profiling-funcs' [-Wunused-command-line-argument] [-Werror]



======================================================================
FAIL: test_dylink_dot_a (test_core.wasm64.test_dylink_dot_a)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\emsdk\emscripten\main\test\common.py", line 1211, in run_process
    rtn = utils.run_process(cmd, check=check, **kwargs)
  File "C:\emsdk\emscripten\main\tools\utils.py", line 45, in run_process
    ret = subprocess.run(cmd, check=check, input=input, *args, **kw)
  File "C:\emsdk\python\3.13.3_64bit\Lib\subprocess.py", line 577, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['C:\\emsdk\\emscripten\\main\\emcc.bat', '-fPIC', '-c', 'third.c', '-o', 'third.o', '-Wclosure', '-Werror', '-Wno-limited-postlink-optimizations', '--profiling-funcs', '-m64']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\emsdk\emscripten\main\test\common.py", line 380, in resulting_test
    return func(self, *args)
  File "C:\emsdk\emscripten\main\test\test_core.py", line 235, in decorated
    return func(self, *args, **kwargs)
  File "C:\emsdk\emscripten\main\test\test_core.py", line 5086, in test_dylink_dot_a
    self.run_process([EMCC, '-fPIC', '-c', 'third.c', '-o', 'third.o'] + self.get_cflags(compile_only=True))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\emsdk\emscripten\main\test\common.py", line 1216, 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): `'C:\emsdk\emscripten\main\emcc.bat' -fPIC -c third.c -o third.o -Wclosure -Werror -Wno-limited-postlink-optimizations --profiling-funcs -m64`

Stdout:

emcc: error: linker flag ignored during compilation: '--profiling-funcs' [-Wunused-command-line-argument] [-Werror]


----------------------------------------------------------------------
Ran 1 test in 0.335s

FAILED (failures=1)

See e.g. http://clbri.com:8010/api/v2/logs/443833/raw_inline

Activity

  1. sbc100 commented on May 16, 2026

    @sbc100
    Collaborator

    Strange I see --profiling-func in the cflags of these suits both before and after the change.

    I guess the reason this didn't show up in emscripten CI is because we are running much slimmed down set of CI tests (temporarily) : #26664

  2. sbc100 commented on May 16, 2026

    @sbc100
    Collaborator

    Ah, this issue was little more subtle that I thought. The issue is that #26963 stopped using settings and instead used just cflags for setting up the wasm64 suite. This code then stopped running:

    emscripten/test/test_core.py

    Lines 9857 to 9860 in 1d63dc0

    if settings:
    # Until we create a way to specify link-time settings separately from compile-time settings
    # we need to pass this flag here to avoid warnings from compile-only commands.
    cflags.append('-Wno-unused-command-line-argument')

  3. sbc100 commented on May 16, 2026

    @sbc100
    Collaborator

    This didn't effect wasm64_4gb or wasm64l which have additional settings and are the only wasm64 suites we are running in our reduced CI setup.

  4. added a commit that references this issue on May 16, 2026
    312257d
  5. added a commit that references this issue on May 16, 2026
    d3d2dec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions