diff options
author | Andrea Corallo <akrl@sdf.org> | 2021-08-22 22:08:37 +0100 |
---|---|---|
committer | Alan Third <alan@idiocy.org> | 2021-08-22 22:15:29 +0100 |
commit | 6c007668b38f06824004da466e97a96533f6344b (patch) | |
tree | 6d5dbd029d9d17342f8c67b36aa2fe0c166cfb20 /src/comp.c | |
parent | 48d49694539beae5270ca49eae2d5419938a906e (diff) | |
download | emacs-6c007668b38f06824004da466e97a96533f6344b.tar.gz emacs-6c007668b38f06824004da466e97a96533f6344b.tar.bz2 emacs-6c007668b38f06824004da466e97a96533f6344b.zip |
Set a unique ID for eln files on macOS (bug#45934)
* src/comp.c (Fcomp__compile_ctxt_to_file): Set gcc's -install_name
parameter to the real filename.
Diffstat (limited to 'src/comp.c')
-rw-r--r-- | src/comp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/comp.c b/src/comp.c index c3803464827..74a5337f8d7 100644 --- a/src/comp.c +++ b/src/comp.c @@ -4490,6 +4490,15 @@ DEFUN ("comp--compile-ctxt-to-file", Fcomp__compile_ctxt_to_file, GCC_JIT_INT_OPTION_OPTIMIZATION_LEVEL, comp.speed < 0 ? 0 : (comp.speed > 3 ? 3 : comp.speed)); + + /* On MacOS set a unique dylib ID. */ +#if defined (LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option) \ + && defined (DARWIN_OS) + gcc_jit_context_add_driver_option (comp.ctxt, "-install_name"); + gcc_jit_context_add_driver_option ( + comp.ctxt, SSDATA (Ffile_name_nondirectory (filename))); +#endif + comp.d_default_idx = CALL1I (comp-data-container-idx, CALL1I (comp-ctxt-d-default, Vcomp_ctxt)); comp.d_impure_idx = |