Raise an error otherwise.
To be used by all entry points."
(cond
- ((null (boundp 'comp-ctxt))
+ ((null (featurep 'nativecomp))
(error "Emacs not compiled with native compiler support (--with-nativecomp)"))
((null (native-comp-available-p))
(error "Cannot find libgccjit"))))
;;;###autoload
(defun advice--add-function (where ref function props)
- (when (and (boundp 'comp-ctxt)
+ (when (and (featurep 'nativecomp)
(subr-primitive-p (gv-deref ref)))
(let ((subr-name (intern (subr-name (gv-deref ref)))))
;; Requiring the native compiler to advice `macroexpand' cause a
"Delete DIR recursively.
Clean-up the corresponding .eln files if Emacs is native
compiled."
- (when (boundp 'comp-ctxt)
+ (when (featurep 'nativecomp)
(cl-loop
for file in (directory-files-recursively dir ".el\\'")
do (comp-clean-up-stale-eln (comp-el-to-eln-filename file))))
;; At this point, we're ready to resume undo recording for scratch.
(buffer-enable-undo "*scratch*")
-(when (boundp 'comp-ctxt)
+(when (featurep 'nativecomp)
;; Fix the compilation unit filename to have it working when
;; when installed or if the source directory got moved. This is set to be
;; a pair in the form: (rel-path-from-install-bin . rel-path-from-local-bin).
((equal dump-mode "bootstrap") "emacs")
((equal dump-mode "pbootstrap") "bootstrap-emacs.pdmp")
(t (error "unrecognized dump mode %s" dump-mode)))))
- (when (and (boundp 'comp-ctxt)
+ (when (and (featurep 'nativecomp)
(equal dump-mode "pdump"))
;; Don't enable this before bootstrap is completed the as the
;; compiler infrastructure may not be usable.
doc: /* Hash table subr-name -> bool. */);
Vcomp_installed_trampolines_h = CALLN (Fmake_hash_table);
+ Fprovide (intern_c_string ("nativecomp"), Qnil);
#endif /* #ifdef HAVE_NATIVE_COMP */
defsubr (&Snative_comp_available_p);