@@ -45,8 +45,7 @@ class _Target(typing.Generic[_S, _R]):
45
45
def _compute_digest (self , out : pathlib .Path ) -> str :
46
46
hasher = hashlib .sha256 ()
47
47
hasher .update (self .triple .encode ())
48
- hasher .update (self .alignment .to_bytes ())
49
- hasher .update (self .prefix .encode ())
48
+ hasher .update (self .debug .to_bytes ())
50
49
# These dependencies are also reflected in _JITSources in regen.targets:
51
50
hasher .update (PYTHON_EXECUTOR_CASES_C_H .read_bytes ())
52
51
hasher .update ((out / "pyconfig.h" ).read_bytes ())
@@ -119,6 +118,7 @@ async def _compile(
119
118
"-O3" ,
120
119
"-c" ,
121
120
"-fno-asynchronous-unwind-tables" ,
121
+ "-fno-builtin" ,
122
122
# SET_FUNCTION_ATTRIBUTE on 32-bit Windows debug builds:
123
123
"-fno-jump-tables" ,
124
124
# Position-independent code adds indirection to every load and jump:
@@ -166,7 +166,7 @@ def build(self, out: pathlib.Path, *, comment: str = "") -> None:
166
166
with jit_stencils .open ("w" ) as file :
167
167
file .write (digest )
168
168
if comment :
169
- file .write (f"// { comment } \n " )
169
+ file .write (f"// { comment } \n \n " )
170
170
file .write ("" )
171
171
for line in _writer .dump (stencil_groups ):
172
172
file .write (f"{ line } \n " )
@@ -310,6 +310,8 @@ def _handle_section(
310
310
flags = {flag ["Name" ] for flag in section ["Attributes" ]["Flags" ]}
311
311
name = section ["Name" ]["Value" ]
312
312
name = name .removeprefix (self .prefix )
313
+ if "Debug" in flags :
314
+ return
313
315
if "SomeInstructions" in flags :
314
316
value = _stencils .HoleValue .CODE
315
317
stencil = group .code
@@ -371,9 +373,6 @@ def _handle_relocation(
371
373
addend = 0
372
374
case _:
373
375
raise NotImplementedError (relocation )
374
- # Turn Clang's weird __bzero calls into normal bzero calls:
375
- if symbol == "__bzero" :
376
- symbol = "bzero"
377
376
return _stencils .Hole (offset , kind , value , symbol , addend )
378
377
379
378
0 commit comments