Skip to content

Conversation

@croes
Copy link
Contributor

@croes croes commented Feb 24, 2023

Set CMAKE_NM in the CMake toolchain file.

We ran into some issues where the system's nm was used instead of emnm, and we traced it back to the Emscripten CMake toolchain file not setting CMAKE_NM.

We fixed this locally by setting CMAKE_NM after including the Emscripten toolchain CMake file, but figured it's better to push a fix upstream.

@sbc100 sbc100 enabled auto-merge (squash) February 24, 2023 16:31
@croes
Copy link
Contributor Author

croes commented Feb 27, 2023

After investigating further, the underlying issue was that the Emscripten CMake toolchain file wasn't correctly passed when compiling some third-party dependencies (we use conan, and had to define tools.cmake.cmaketoolchain:user_toolchain for dependencies using the CMakeToolchain template). This caused linking / nm issues later on.

Defining CMAKE_NM still might make sense (there's little to no documentation on this), but it's also fine to just close this PR. In the end, it wasn't the cause of our issue.

@sbc100 sbc100 disabled auto-merge February 27, 2023 15:33
@sbc100 sbc100 enabled auto-merge (squash) February 27, 2023 15:33
@sbc100 sbc100 merged commit cc8f7a2 into emscripten-core:main Feb 27, 2023
impact-maker pushed a commit to impact-maker/emscripten that referenced this pull request Mar 17, 2023
impact-maker pushed a commit to impact-maker/emscripten that referenced this pull request Mar 17, 2023
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.

2 participants