Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Brandt Bucher <[email protected]>
  • Loading branch information
savannahostrowski and brandtbucher authored Oct 29, 2024
1 parent bb1e650 commit 5f3ec52
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Tools/jit/_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"]
Expand Down
5 changes: 3 additions & 2 deletions Tools/jit/jit.h
Original file line number Diff line number Diff line change
@@ -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));

0 comments on commit 5f3ec52

Please sign in to comment.