diff --git a/docs/glossary.rst b/docs/glossary.rst index 77437b696..21f248166 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -230,3 +230,8 @@ Variables that kitty sets when running child programs Set to ``1`` when kitty is running a shell because of the ``--hold`` flag. Can be used to specialize shell behavior in the shell rc files as desired. + +.. envvar:: KITTY_NO_SIMD + + Set it to any value to prevent kitty from using SIMD CPU vector + instructions. diff --git a/kitty/simd-string.c b/kitty/simd-string.c index 9c5135f45..8fc717099 100644 --- a/kitty/simd-string.c +++ b/kitty/simd-string.c @@ -143,6 +143,9 @@ init_simd(void *x) { do_check(); #endif #endif + if (getenv("KITTY_NO_SIMD")) { + has_avx2 = false; has_sse4_2 = false; + } #undef do_check if (has_avx2) {