Skip to content

Commit 19bd1ec

Browse files
committed
qemu: drop explicit --python= argument
We should let qemu autodetect the system python3 since using sys.executable causes the build to fail when cheribuild is run from a virtualenv.
1 parent aca27f6 commit 19bd1ec

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pycheribuild/projects/build_qemu.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ def add_asan_flags(self):
180180
self.configure_args.append("--enable-sanitizers")
181181
# Ensure that tests crash on UBSan reports
182182
self.COMMON_FLAGS.append("-fno-sanitize-recover=all")
183+
# QEMU does not work with -fsanitize=function (which is the default since Clang 17)
184+
# https://gitlab.com/qemu-project/qemu/-/issues/2345
185+
compiler = self.get_compiler_info(self.CC)
186+
if compiler.is_clang and compiler.version > (17, 0):
187+
self.COMMON_FLAGS.append("-fno-sanitize=function")
183188
if self.use_lto:
184189
self.info("Disabling LTO for ASAN instrumented builds")
185190
self.use_lto = False
@@ -205,8 +210,6 @@ def setup(self):
205210
if self.enable_plugins:
206211
self.configure_args.append("--enable-plugins")
207212

208-
# QEMU now builds with python3
209-
self.configure_args.append("--python=" + sys.executable)
210213
if self.build_type.is_debug:
211214
self.configure_args.extend(["--enable-debug", "--enable-debug-tcg"])
212215
else:

0 commit comments

Comments
 (0)