Skip to content

Commit ff3d363

Browse files
Save state before merge
1 parent a382a44 commit ff3d363

File tree

2 files changed

+24
-22
lines changed

2 files changed

+24
-22
lines changed

Tools/jit/build.py

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
comment = f"$ {shlex.join([sys.executable] + sys.argv)}"
1212
parser = argparse.ArgumentParser(description=__doc__)
1313
parser.add_argument(
14-
"target", nargs="+", type=_targets.get_target, help="a PEP 11 target triple to compile for"
14+
"target",
15+
nargs="+",
16+
type=_targets.get_target,
17+
help="a PEP 11 target triple to compile for",
1518
)
1619
parser.add_argument(
1720
"-d", "--debug", action="store_true", help="compile for a debug build of Python"
@@ -23,12 +26,15 @@
2326
"-v", "--verbose", action="store_true", help="echo commands as they are run"
2427
)
2528
args = parser.parse_args()
29+
print(args.target)
2630

27-
if len(args.target) == -1:
28-
args.target.debug = args.debug
29-
args.target.force = args.force
30-
args.target.verbose = args.verbose
31-
args.target.build(pathlib.Path.cwd(), comment=comment)
31+
if len(args.target) == 1:
32+
# Single triple specified, assume this is a normal build
33+
target = args.target[0]
34+
target.debug = args.debug
35+
target.force = args.force
36+
target.verbose = args.verbose
37+
target.build(pathlib.Path.cwd(), comment=comment)
3238

3339
else:
3440
# Multiple triples specified, assume this is a macOS multi-architecture build
@@ -39,7 +45,11 @@
3945
target.debug = args.debug
4046
target.force = args.force
4147
target.verbose = args.verbose
42-
target.build(pathlib.Path.cwd(), comment=comment, stencils_h=f"jit_stencils-{target.triple}.h")
48+
target.build(
49+
pathlib.Path.cwd(),
50+
comment=comment,
51+
stencils_h=f"jit_stencils-{target.triple}.h",
52+
)
4353

4454
with open("jit_stencils.h", "w") as fp:
4555
for idx, target in enumerate(args.target):

configure

Lines changed: 7 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)