feat(startup): replace bundled site-start.el approach with a custom source patch #124
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.
Because we bundle libgccjit and gcc libraries, as well as C sources into the
Emacs .app bundle itself, some extra setup is required during startup of emacs
to ensure that native compliation works, and C sources are found when needed.
Previously this was done by adding a custom site-start.el file to the Emacs.app
bundle, which was loaded at startup. This approach had some issues, namely that
when launching emacs with
-Q
or--no-site-file
, the file was not loaded,preventing native compilation from working.
Here we replace the site-start.el approach with a custom patch adding
macos-startup.el, which adds a hook to
after-pdump-load-hook
. This ensuresthat the startup code is always run, and before any user configuration is
loaded.