Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
d145747
LLVM 20 bump
savannahostrowski Sep 18, 2025
d86b66e
Merge main
savannahostrowski Sep 19, 2025
9324b14
Add flags for testing
savannahostrowski Sep 19, 2025
f3bb6b9
Merge branch 'main' into llvm-20
savannahostrowski Sep 20, 2025
b6e7981
Merge main
savannahostrowski Oct 6, 2025
e867644
Fix windows
savannahostrowski Oct 6, 2025
13e9f5b
Merge main
savannahostrowski Oct 7, 2025
84781b4
Merge branch 'main' into llvm-20
savannahostrowski Oct 8, 2025
0034f14
Download binaries from GitHub releases
emmatyping Aug 6, 2025
cc98d30
Add hash checking
emmatyping Aug 7, 2025
76842eb
Apply Emma's commits for grabbing binaries from release artifacts
savannahostrowski Oct 8, 2025
a732cec
Merge branch 'main' into llvm-20
savannahostrowski Oct 11, 2025
e8395ce
Fix up LLVM via release artifacts
savannahostrowski Oct 11, 2025
d1e4363
Merge branch 'main' into llvm-20
savannahostrowski Oct 12, 2025
01aed67
Remove model flags for x86_64 darwin causing GOT relocation issues
savannahostrowski Oct 12, 2025
94f1a89
Clean up
savannahostrowski Oct 12, 2025
e6450de
Only patch x86_64 GOT relocations when relaxation succeeds
savannahostrowski Oct 13, 2025
1adf827
Revert "Only patch x86_64 GOT relocations when relaxation succeeds"
savannahostrowski Oct 13, 2025
b9bfacf
mcmodel=large
savannahostrowski Oct 14, 2025
57c44ee
Add macro to handle debug
savannahostrowski Oct 16, 2025
081ee86
fno-pic
savannahostrowski Oct 16, 2025
0b773f9
remove fno-pic
savannahostrowski Oct 16, 2025
c78af6f
remove hack
savannahostrowski Oct 18, 2025
d715cf2
Trampoline attempt
savannahostrowski Oct 18, 2025
38e11b9
Touch up and add better comments
savannahostrowski Oct 19, 2025
74eb9a4
Merge main
savannahostrowski Oct 19, 2025
ca95652
More clean up
savannahostrowski Oct 19, 2025
47153a5
📜🤖 Added by blurb_it.
blurb-it[bot] Oct 19, 2025
7b2df52
Redupe LLVM version reference from jit.yml
savannahostrowski Oct 21, 2025
3a5af39
Merge branch 'llvm-20' of https://github.com/savannahostrowski/cpytho…
savannahostrowski Oct 21, 2025
450dd09
Simplify fetching LLVM from bin-deps
savannahostrowski Oct 21, 2025
5da3349
Remove duplicate 20 reference in jit.yml
savannahostrowski Oct 21, 2025
620cd4f
Fix flags
savannahostrowski Oct 21, 2025
d1a68ab
Reduce DATA_ALIGN to 8 bytes
savannahostrowski Oct 21, 2025
f3d46bd
Merge branch 'main' into llvm-20
savannahostrowski Oct 21, 2025
4b35c2f
Update Devcontainer readme
savannahostrowski Oct 22, 2025
ffcb68e
Merge branch 'llvm-20' of https://github.com/savannahostrowski/cpytho…
savannahostrowski Oct 22, 2025
0540ba3
Merge branch 'main' into llvm-20
savannahostrowski Oct 30, 2025
618a4a6
Revert CI simplication and address comments for memcpy
savannahostrowski Oct 31, 2025
2e9ba92
Address comments about get_externals and trampoline helper
savannahostrowski Oct 31, 2025
a21cb31
Merge branch 'main' into llvm-20
savannahostrowski Oct 31, 2025
795f466
Restore get_externals
savannahostrowski Oct 31, 2025
b880f26
Fix spacing
savannahostrowski Oct 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add macro to handle debug
  • Loading branch information
savannahostrowski committed Oct 16, 2025
commit 57c44ee4e82869552478c8d0339dda9400cb8492
10 changes: 10 additions & 0 deletions Python/jit.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,17 @@ patch_32r(unsigned char *location, uint64_t value)
value -= (uintptr_t)location;
// Check that we're not out of range of 32 signed bits:
assert((int64_t)value >= -(1LL << 31));
#if defined(__APPLE__) && defined(Py_DEBUG)
// On macOS debug builds with LLVM 20, external symbols may be out of range.
// This is handled by GOT indirection, so we allow the truncation here.
// Release builds (-O3) don't have this issue due to better optimization.
if ((int64_t)value >= (1LL << 31)) {
// Truncate to 32-bit; the GOT entry will handle the indirection
value = (uint32_t)value;
}
#else
assert((int64_t)value < (1LL << 31));
#endif
*loc32 = (uint32_t)value;
}

Expand Down
3 changes: 1 addition & 2 deletions Tools/jit/_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,9 +585,8 @@ def get_target(host: str) -> _COFF32 | _COFF64 | _ELF | _MachO:
elif re.fullmatch(r"x86_64-apple-darwin.*", host):
host = "x86_64-apple-darwin"
condition = "defined(__x86_64__) && defined(__APPLE__)"
args = ["-mcmodel=large"]
optimizer = _optimizers.OptimizerX86
target = _MachO(host, condition, args=args, optimizer=optimizer)
target = _MachO(host, condition, optimizer=optimizer)
elif re.fullmatch(r"x86_64-pc-windows-msvc", host):
host = "x86_64-pc-windows-msvc"
condition = "defined(_M_X64)"
Expand Down