-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[cmake] Run normal compiler auto-detection by default #23537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
dcf1b2f to
8f8b3fd
Compare
dschuff
approved these changes
Jan 29, 2025
kripken
approved these changes
Jan 30, 2025
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
This effectively reverts emscripten-core#23537 Fixes: emscripten-core#23944
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Apr 30, 2025
This effectively reverts emscripten-core#23537 Fixes: emscripten-core#23944
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change disables
EMSCRIPTEN_FORCE_COMPILERSby 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_COMPILERSsetting 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.