From 5f3ec525986e959dadfd40c48a843ff096ffb453 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Tue, 29 Oct 2024 15:01:50 -0700 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Brandt Bucher --- Tools/jit/_targets.py | 3 +++ Tools/jit/jit.h | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Tools/jit/_targets.py b/Tools/jit/_targets.py index 687320b66af623..6bf3ec109a252c 100644 --- a/Tools/jit/_targets.py +++ b/Tools/jit/_targets.py @@ -135,6 +135,9 @@ async def _compile( # Don't call stack-smashing canaries that we can't find or patch: "-fno-stack-protector", "-std=c11", + "-o", + f"{o}", + f"{c}", *self.args, ] args_o = args + ["-o", f"{o}", f"{c}"] diff --git a/Tools/jit/jit.h b/Tools/jit/jit.h index 84a8461667b9e9..719b76c514e5c9 100644 --- a/Tools/jit/jit.h +++ b/Tools/jit/jit.h @@ -1,3 +1,4 @@ -// To use preserve_none in JIT builds, we need to declare a separate function pointer with __attribute__((preserve_none)) since this attribute is not supported in < clang 19. -// This is functionally the same as jit_func_native from Include/internal/pycore_jit.h except that it has __attribute__((preserve_none)). +// To use preserve_none in JIT builds, we need to declare a separate function +// pointer with __attribute__((preserve_none)), since this attribute may not be +// supported by the compiler used to build the rest of the interpreter. typedef _Py_CODEUNIT *(*jit_func_preserve_none)(_PyInterpreterFrame *frame, _PyStackRef *stack_pointer, PyThreadState *tstate) __attribute__((preserve_none));