Skip to content

Conversation

jimeh
Copy link
Owner

@jimeh jimeh commented Dec 1, 2024

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 ensures
that the startup code is always run, and before any user configuration is
loaded.

@jimeh jimeh force-pushed the replace-site-start-with-patch branch from 904bdf3 to 971b606 Compare December 1, 2024 09:58
@jimeh jimeh marked this pull request as draft December 1, 2024 10:01
…ource patch

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
ensures that the startup code is always run, and before any user
configuration is loaded.
@jimeh jimeh force-pushed the replace-site-start-with-patch branch from 971b606 to 7fcf41b Compare December 1, 2024 12:34
@jimeh jimeh marked this pull request as ready for review December 1, 2024 12:35
@jimeh jimeh merged commit 03ed54c into master Dec 1, 2024
4 checks passed
@jimeh jimeh deleted the replace-site-start-with-patch branch December 1, 2024 12:35
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.

1 participant