From 6eb769364e317cc35c17e5b76d9b0322b5060b20 Mon Sep 17 00:00:00 2001 From: Grigori Rybkine Date: Wed, 28 Oct 2026 12:39:54 +0100 Subject: [PATCH] [test] Make check for compiler more robust * when checking for the compiler in $(CXX), get rid of compiler options, if any --- test/support.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/support.py b/test/support.py index 2f92319..e5b3c62 100644 --- a/test/support.py +++ b/test/support.py @@ -19,8 +19,9 @@ # a build system that supplies the dictionaries itself sets CPPJIT_TEST_SKIP_MAKE _PREBUILT = bool(os.getenv("CPPJIT_TEST_SKIP_MAKE", False)) # otherwise test/Makefile builds them with make and its default $(CXX) +# when checking for the compiler in $(CXX), get rid of compiler options, if any _HAS_TOOLCHAIN = bool( - shutil.which("make") and shutil.which(os.environ.get("CXX") or "g++") + shutil.which("make") and shutil.which((os.environ.get("CXX") or "c++").split()[0]) ) # for a test that loads a dictionary in a module whose other tests need none