1
1
diff --git a/Tools/jit/_targets.py b/Tools/jit/_targets.py
2
- index 6ceb4404e74..94b74b5c8b0 100644
2
+ index d0a1c081ffe..deb83f275d2 100644
3
3
--- a/Tools/jit/_targets.py
4
4
+++ b/Tools/jit/_targets.py
5
5
@@ -10,6 +10,7 @@
@@ -16,9 +16,9 @@ index 6ceb4404e74..94b74b5c8b0 100644
16
16
verbose: bool = False
17
17
+ cflags: str = ""
18
18
known_symbols: dict[str, int] = dataclasses.field(default_factory=dict)
19
+ pyconfig_dir: pathlib.Path = pathlib.Path.cwd().resolve()
19
20
20
- def _get_nop(self) -> bytes:
21
- @@ -119,6 +121,7 @@ async def _compile(
21
+ @@ -120,6 +122,7 @@ async def _compile(
22
22
) -> _stencils.StencilGroup:
23
23
o = tempdir / f"{opname}.o"
24
24
args = [
@@ -27,10 +27,10 @@ index 6ceb4404e74..94b74b5c8b0 100644
27
27
"-DPy_BUILD_CORE_MODULE",
28
28
"-D_DEBUG" if self.debug else "-DNDEBUG",
29
29
diff --git a/Tools/jit/build.py b/Tools/jit/build.py
30
- index 49b08f477db..49a1b11de47 100644
30
+ index 1afd0c76bad..96c4cb07593 100644
31
31
--- a/Tools/jit/build.py
32
32
+++ b/Tools/jit/build.py
33
- @@ -26 ,11 +26 ,15 @@
33
+ @@ -39 ,11 +39 ,15 @@
34
34
parser.add_argument(
35
35
"-v", "--verbose", action="store_true", help="echo commands as they are run"
36
36
)
@@ -43,32 +43,32 @@ index 49b08f477db..49a1b11de47 100644
43
43
target.force = args.force
44
44
target.verbose = args.verbose
45
45
+ target.cflags = args.with_cflags
46
+ target.pyconfig_dir = args.pyconfig_dir
46
47
target.build(
47
- out,
48
48
comment=comment,
49
49
diff --git a/configure b/configure
50
- index c51192f12c8..0dcef7c2617 100755
50
+ index 884f8a4b068..2e6740c33d9 100755
51
51
--- a/configure
52
52
+++ b/configure
53
53
@@ -10863,7 +10863,7 @@ then :
54
54
55
55
else case e in #(
56
56
e) as_fn_append CFLAGS_NODIST " $jit_flags"
57
- - REGEN_JIT_COMMAND="\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py ${ARCH_TRIPLES:-$host}"
58
- + REGEN_JIT_COMMAND="\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py ${ARCH_TRIPLES:-$host} --with-cflags=\"\$(CONFIGURE_CFLAGS)\""
57
+ - REGEN_JIT_COMMAND="\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py ${ARCH_TRIPLES:-$host} --output-dir . --pyconfig-dir . "
58
+ + REGEN_JIT_COMMAND="\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py ${ARCH_TRIPLES:-$host} --output-dir . --pyconfig-dir . -- with-cflags=\"\$(CONFIGURE_CFLAGS)\""
59
59
JIT_STENCILS_H="jit_stencils.h"
60
60
if test "x$Py_DEBUG" = xtrue
61
61
then :
62
62
diff --git a/configure.ac b/configure.ac
63
- index a7b2f62579b..5998f896a4e 100644
63
+ index cf25148bad2..f8bfab7bf96 100644
64
64
--- a/configure.ac
65
65
+++ b/configure.ac
66
66
@@ -2776,7 +2776,7 @@ AS_VAR_IF([jit_flags],
67
67
[],
68
68
[AS_VAR_APPEND([CFLAGS_NODIST], [" $jit_flags"])
69
69
AS_VAR_SET([REGEN_JIT_COMMAND],
70
- - ["\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py ${ARCH_TRIPLES:-$host}"])
71
- + ["\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py ${ARCH_TRIPLES:-$host} --with-cflags=\"\$(CONFIGURE_CFLAGS)\""])
70
+ - ["\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py ${ARCH_TRIPLES:-$host} --output-dir . --pyconfig-dir . "])
71
+ + ["\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py ${ARCH_TRIPLES:-$host} --output-dir . --pyconfig-dir . -- with-cflags=\"\$(CONFIGURE_CFLAGS)\""])
72
72
AS_VAR_SET([JIT_STENCILS_H], ["jit_stencils.h"])
73
73
AS_VAR_IF([Py_DEBUG],
74
74
[true],
0 commit comments