diff options
author | Eli Zaretskii <eliz@gnu.org> | 2021-03-07 15:52:20 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2021-03-07 15:52:20 +0200 |
commit | f89e70a7041b061eb40f2b5e0c58a28bfb84920f (patch) | |
tree | cdea6bc99edf777729586ec9171c5aab65119eb8 | |
parent | 619f66f423c76d94b2bca728f9c22b536e909108 (diff) | |
download | emacs-f89e70a7041b061eb40f2b5e0c58a28bfb84920f.tar.gz emacs-f89e70a7041b061eb40f2b5e0c58a28bfb84920f.tar.bz2 emacs-f89e70a7041b061eb40f2b5e0c58a28bfb84920f.zip |
Fix encoding of file names in comp.c
* src/comp.c (Fcomp__compile_ctxt_to_file) [WINDOWSNT]: Fix
encoding of file names passed to libgccjit.
-rw-r--r-- | src/comp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/comp.c b/src/comp.c index 7927448d5f0..2322ce001b9 100644 --- a/src/comp.c +++ b/src/comp.c @@ -4371,6 +4371,7 @@ DEFUN ("comp--compile-ctxt-to-file", Fcomp__compile_ctxt_to_file, comp.func_relocs_local = NULL; #ifdef WINDOWSNT + ebase_name = ansi_encode_filename (ebase_name); /* Tell libgccjit the actual file name of the loaded DLL, otherwise it will use 'libgccjit.so', which is not useful. */ Lisp_Object libgccjit_loaded_from = Fget (Qgccjit, QCloaded_from); @@ -4476,9 +4477,13 @@ DEFUN ("comp--compile-ctxt-to-file", Fcomp__compile_ctxt_to_file, Lisp_Object tmp_file = Fmake_temp_file_internal (base_name, Qnil, build_string (".eln.tmp"), Qnil); + Lisp_Object encoded_tmp_file = ENCODE_FILE (tmp_file); +#ifdef WINDOWSNT + encoded_tmp_file = ansi_encode_filename (encoded_tmp_file); +#endif gcc_jit_context_compile_to_file (comp.ctxt, GCC_JIT_OUTPUT_KIND_DYNAMIC_LIBRARY, - SSDATA (ENCODE_FILE (tmp_file))); + SSDATA (encoded_tmp_file)); const char *err = gcc_jit_context_get_first_error (comp.ctxt); if (err) |