Skip to content

dynamic linking fails with cmake #16157

Open

Description

@lpotter

The Emscripten.cmake toolchain file has:
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)

which makes modules with SIDE_MODULE assert with:
Aborted(Assertion failed: need to see wasm magic number)

I have a small test which has one main and two small libs (main is MAIN_MODULE)
It will fail if I create the libraries like so:
add_library(_a STATIC lib_a.cpp)

If I comment out that line in Emscripten.cmake file that still fails.

But if I also change to shared lib:
add_library(_a SHARED lib_a.cpp)

it will work.

Activity

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