dotnet / runtimelab

This repo is for experimentation and exploring new ideas that may or may not make it into the main dotnet/runtime repo.
MIT License
1.37k stars 189 forks source link

[NativeAOT-LLVM] [Question] Has upstream changed callMain for dotnet.native.js? #2523

Closed yowl closed 4 months ago

yowl commented 4 months ago

cc @pavelsavara @maraf

I'm merging the next month or so (to around 9 feb , commit b5411e3a110cdbc643be3a922a150a9e083cd240) and have this SmokeTest failure:

      nativeaot\SmokeTests\DotnetJs\DotnetJs\DotnetJs.cmd [FAIL]
        file:///C:/github/runtimelab/artifacts/tests/coreclr/browser.wasm.Debug/nativeaot/SmokeTests/DotnetJs/DotnetJs/native/dotnet.native.js:7014
        Module['callMain'] = callMain;
                             ^

        ReferenceError: callMain is not defined
            at file:///C:/github/runtimelab/artifacts/tests/coreclr/browser.wasm.Debug/nativeaot/SmokeTests/DotnetJs/DotnetJs/native/dotnet.native.js:7014:22

        Node.js v20.11.0

Maybe related to this comment in the description about callMain https://github.com/dotnet/runtimelab/pull/2453#issue-2030811358 ?

Does it sound familiar?

Thanks,

maraf commented 4 months ago

Upstream doesn't use callMain. Seems like its export doesn't work here. The export should be made by https://github.com/dotnet/runtimelab/blob/feature/NativeAOT-LLVM/src/coreclr/nativeaot/BuildIntegration/DotNetJsApi.targets#L35

yowl commented 4 months ago

Thanks, seems something is happening in the latest version of emscripten (with RUNTIME_EXPORTED_METHODS?), have reverted to our supported version and it is fine.