diff options
author | Brandt Bucher <brandtbucher@microsoft.com> | 2024-03-04 18:16:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-04 18:16:56 (GMT) |
commit | ffed8d985b57a97def2ec40c61b71a22a2af1b48 (patch) | |
tree | 82f0861366d67d9aab15c30dfc70c27f6a694588 /Tools/jit/_targets.py | |
parent | 981f27dcc4be8bc4824464c9d75f2ea6c868863f (diff) | |
download | cpython-ffed8d985b57a97def2ec40c61b71a22a2af1b48.zip cpython-ffed8d985b57a97def2ec40c61b71a22a2af1b48.tar.gz cpython-ffed8d985b57a97def2ec40c61b71a22a2af1b48.tar.bz2 |
GH-116134: JIT aarch64-pc-windows-msvc (GH-116130)
Diffstat (limited to 'Tools/jit/_targets.py')
-rw-r--r-- | Tools/jit/_targets.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Tools/jit/_targets.py b/Tools/jit/_targets.py index 07959b1..417fdb5 100644 --- a/Tools/jit/_targets.py +++ b/Tools/jit/_targets.py @@ -238,6 +238,19 @@ class _COFF( addend = ( int.from_bytes(raw[offset : offset + 4], "little", signed=True) - 4 ) + case { + "Offset": offset, + "Symbol": s, + "Type": { + "Value": "IMAGE_REL_ARM64_BRANCH26" + | "IMAGE_REL_ARM64_PAGEBASE_REL21" + | "IMAGE_REL_ARM64_PAGEOFFSET_12A" + | "IMAGE_REL_ARM64_PAGEOFFSET_12L" as kind + }, + }: + offset += base + value, symbol = self._unwrap_dllimport(s) + addend = 0 case _: raise NotImplementedError(relocation) return _stencils.Hole(offset, kind, value, symbol, addend) @@ -435,6 +448,9 @@ def get_target(host: str) -> _COFF | _ELF | _MachO: if re.fullmatch(r"aarch64-apple-darwin.*", host): args = ["-mcmodel=large"] return _MachO(host, alignment=8, args=args, prefix="_") + if re.fullmatch(r"aarch64-pc-windows-msvc", host): + args = ["-fms-runtime-lib=dll"] + return _COFF(host, alignment=8, args=args) if re.fullmatch(r"aarch64-.*-linux-gnu", host): args = ["-mcmodel=large"] return _ELF(host, alignment=8, args=args) |