aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrea Corallo2020-09-15 09:05:14 +0200
committerAndrea Corallo2020-09-15 09:05:14 +0200
commit5b41545f1be367837d9ac717ea67fba19a4c24d4 (patch)
treeb5c1b64d1f47ee8d0a52e2afdc3f228d291cbea4 /src
parent5f37c18581ea1a36e9dcb5d4ac741aafb0398ebe (diff)
downloademacs-5b41545f1be367837d9ac717ea67fba19a4c24d4.tar.gz
emacs-5b41545f1be367837d9ac717ea67fba19a4c24d4.zip
* Better error handling after calling 'gcc_jit_context_compile_to_file'
Tipically errors are catched in 'compile_function' but in case libgccjit throw an error only afterwards while compiling the whole compilation unit we have to report it correctly. * src/comp.c (Fcomp__compile_ctxt_to_file): Catch libgccjit errors after calling 'gcc_jit_context_compile_to_file'.
Diffstat (limited to 'src')
-rw-r--r--src/comp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/comp.c b/src/comp.c
index b3640b5e378..15d85d30fcb 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -4391,6 +4391,13 @@ DEFUN ("comp--compile-ctxt-to-file", Fcomp__compile_ctxt_to_file,
4391 GCC_JIT_OUTPUT_KIND_DYNAMIC_LIBRARY, 4391 GCC_JIT_OUTPUT_KIND_DYNAMIC_LIBRARY,
4392 SSDATA (tmp_file)); 4392 SSDATA (tmp_file));
4393 4393
4394 const char *err = gcc_jit_context_get_first_error (comp.ctxt);
4395 if (err)
4396 xsignal3 (Qnative_ice,
4397 build_string ("failed to compile"),
4398 file_name,
4399 build_string (err));
4400
4394 CALL1I (comp-clean-up-stale-eln, file_name); 4401 CALL1I (comp-clean-up-stale-eln, file_name);
4395 CALL2I (comp-delete-or-replace-file, file_name, tmp_file); 4402 CALL2I (comp-delete-or-replace-file, file_name, tmp_file);
4396 4403