Skip to content

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Jan 29, 2025

This change disables EMSCRIPTEN_FORCE_COMPILERS by default which means cmake will run all the normal compiler detection phases. This has the advantage that things get setup correctly without taking any shortcuts. See #23444.

The downside is the that cmake phase itself is now slower since its needs to compiler, link and run a bunch of test binaries.

On my machine running all the cmake tests went from 27 to 36 seconds. Running a single empty cmake project when from 1s to 4.5s. Since running cmake is normally rare compared to building the project itself I think this slowdown is worth it, but I've left the EMSCRIPTEN_FORCE_COMPILERS setting in place for now that folks that want fast cmake.

Also, remember that cmake itself caches all this stuff so its only the first run that get slowed down.

This change disables `EMSCRIPTEN_FORCE_COMPILERS` by default which means
cmake will run all the normal compiler detection phases.  This has the
advantage that things get setup correctly without taking any shortcuts.
See emscripten-core#23444.

The downside is the that cmake phase itself is now slower since its
needs to compiler, link and run a bunch of test binaries.

On my machine running all the cmake tests went from 27 to 36 seconds.
Running a single empty cmake project when from 1s to 4.5s.  Since
running cmake is normally rare compared to building the project itself I
think this slowdown is worth it, but I've left the
`EMSCRIPTEN_FORCE_COMPILERS` setting in place for now that folks that
want fast cmake.

Also, remember that cmake itself caches all this stuff so its only the
first run that get slowed down.
@sbc100 sbc100 force-pushed the cmake_force_compiler branch from dcf1b2f to 8f8b3fd Compare January 29, 2025 22:46
@sbc100 sbc100 requested a review from dschuff January 29, 2025 22:47
@sbc100 sbc100 requested a review from kripken January 29, 2025 23:02
@sbc100 sbc100 enabled auto-merge (squash) January 29, 2025 23:23
@sbc100 sbc100 merged commit ffcebb7 into emscripten-core:main Jan 30, 2025
29 checks passed
@sbc100 sbc100 deleted the cmake_force_compiler branch January 30, 2025 17:48
sbc100 added a commit to sbc100/emscripten that referenced this pull request Feb 11, 2025
This features was turned off by default in emscripten-core#23537.  I'm not sure there
is any value in maintaining it anymore.  Shortcutting the cmake
configuration process was more valuable in the past when emscripten was
slower.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Feb 12, 2025
This features was turned off by default in emscripten-core#23537.  I'm not sure there
is any value in maintaining it anymore.  Shortcutting the cmake
configuration process was more valuable in the past when emscripten was
slower.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Mar 14, 2025
This features was turned off by default in emscripten-core#23537.  I'm not sure there
is any value in maintaining it anymore.  Shortcutting the cmake
configuration process was more valuable in the past when emscripten was
slower.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Mar 14, 2025
This features was turned off by default in emscripten-core#23537.  I'm not sure there
is any value in maintaining it anymore.  Shortcutting the cmake
configuration process was more valuable in the past when emscripten was
slower.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Apr 30, 2025
sbc100 added a commit to sbc100/emscripten that referenced this pull request Apr 30, 2025
sbc100 added a commit that referenced this pull request Apr 30, 2025
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