diff options
| author | Craig Jennings <c@cjennings.net> | 2026-07-01 21:49:18 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-07-01 21:49:31 -0400 |
| commit | 75198a74bfd9c50b29b13b2d9a3205504a13c4ef (patch) | |
| tree | 44c2791fc10fd619bb51c7a241e24134e4c44de3 /modules | |
| parent | 35cbde39ffd459593589b36318a6bc2962703599 (diff) | |
| download | dotemacs-75198a74bfd9c50b29b13b2d9a3205504a13c4ef.tar.gz dotemacs-75198a74bfd9c50b29b13b2d9a3205504a13c4ef.zip | |
fix(native-comp): compile at speed 2 to preserve redefinition semantics
At speed 3 the native compiler emits direct calls for functions in the same compilation unit, bypassing the symbol's function cell. Any cl-letf mock of a module's own helper then silently runs the real code: the recording tests' mocked wayland check and device validation were bypassed, and make test launched real wf-recorder screen captures. Speed 2 is the highest level that preserves redefinition semantics. A meta test now pins the setting; the local eln cache needs one flush so stale speed-3 artifacts recompile.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/system-defaults.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/system-defaults.el b/modules/system-defaults.el index c63ca009..7f369a5e 100644 --- a/modules/system-defaults.el +++ b/modules/system-defaults.el @@ -40,7 +40,13 @@ (with-eval-after-load 'comp-run (setopt native-comp-async-jobs-number 8) ; parallel compile workers - (setopt native-comp-speed 3) ; highest optimization level + ;; Speed 2, not 3: at speed 3 the native compiler emits direct calls for + ;; functions in the same compilation unit, bypassing the function cell. + ;; cl-letf mocks of a module's own helpers then silently run the real + ;; code — on 2026-07-01 `make test' launched real wf-recorder screen + ;; recordings this way. Speed 2 is the highest semantics-preserving + ;; level. Guarded by tests/test-meta-native-comp-speed.el. + (setopt native-comp-speed 2) (setopt native-comp-always-compile t)) ; always native-compile ;; -------------------------- Log Native Comp Warnings ------------------------- |
