aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2021-03-07 15:52:20 +0200
committerEli Zaretskii2021-03-07 15:52:20 +0200
commitf89e70a7041b061eb40f2b5e0c58a28bfb84920f (patch)
treecdea6bc99edf777729586ec9171c5aab65119eb8 /src
parent619f66f423c76d94b2bca728f9c22b536e909108 (diff)
downloademacs-f89e70a7041b061eb40f2b5e0c58a28bfb84920f.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/comp.c7
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,
4371 comp.func_relocs_local = NULL; 4371 comp.func_relocs_local = NULL;
4372 4372
4373#ifdef WINDOWSNT 4373#ifdef WINDOWSNT
4374 ebase_name = ansi_encode_filename (ebase_name);
4374 /* Tell libgccjit the actual file name of the loaded DLL, otherwise 4375 /* Tell libgccjit the actual file name of the loaded DLL, otherwise
4375 it will use 'libgccjit.so', which is not useful. */ 4376 it will use 'libgccjit.so', which is not useful. */
4376 Lisp_Object libgccjit_loaded_from = Fget (Qgccjit, QCloaded_from); 4377 Lisp_Object libgccjit_loaded_from = Fget (Qgccjit, QCloaded_from);
@@ -4476,9 +4477,13 @@ DEFUN ("comp--compile-ctxt-to-file", Fcomp__compile_ctxt_to_file,
4476 4477
4477 Lisp_Object tmp_file = 4478 Lisp_Object tmp_file =
4478 Fmake_temp_file_internal (base_name, Qnil, build_string (".eln.tmp"), Qnil); 4479 Fmake_temp_file_internal (base_name, Qnil, build_string (".eln.tmp"), Qnil);
4480 Lisp_Object encoded_tmp_file = ENCODE_FILE (tmp_file);
4481#ifdef WINDOWSNT
4482 encoded_tmp_file = ansi_encode_filename (encoded_tmp_file);
4483#endif
4479 gcc_jit_context_compile_to_file (comp.ctxt, 4484 gcc_jit_context_compile_to_file (comp.ctxt,
4480 GCC_JIT_OUTPUT_KIND_DYNAMIC_LIBRARY, 4485 GCC_JIT_OUTPUT_KIND_DYNAMIC_LIBRARY,
4481 SSDATA (ENCODE_FILE (tmp_file))); 4486 SSDATA (encoded_tmp_file));
4482 4487
4483 const char *err = gcc_jit_context_get_first_error (comp.ctxt); 4488 const char *err = gcc_jit_context_get_first_error (comp.ctxt);
4484 if (err) 4489 if (err)