Skip to content

Commit a0a3e76

Browse files
committed
Add separate build targets for regular PyPy and JIT extension version
1 parent 96d8934 commit a0a3e76

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

Makefile

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ JOBS=$(subst -j,--make-jobs ,$(filter -j%, $(MAKEFLAGS)))
1515

1616
.PHONY: pypy-c cffi_imports
1717

18-
pypy-c:
18+
pypy-jit-ext-c:
1919
@echo
2020
@echo "===================================================================="
2121
ifeq ($(PYPY_EXECUTABLE),)
@@ -37,5 +37,28 @@ endif
3737
@sleep 5
3838
cd pypy/goal && $(RUNINTERP) ../../rpython/bin/rpython $(JOBS) -Ojit targetpypystandalone.py
3939

40+
pypy-c:
41+
@echo
42+
@echo "===================================================================="
43+
ifeq ($(PYPY_EXECUTABLE),)
44+
@echo "Building a regular (jitting) version of PyPy, using CPython."
45+
@echo "This takes around 2 hours and $(URAM) GB of RAM."
46+
@echo "Note that pre-installing a PyPy binary would reduce this time"
47+
@echo "and produce basically the same result."
48+
else
49+
@echo "Building a regular (jitting) version of PyPy, using"
50+
@echo "$(PYPY_EXECUTABLE) to run the translation itself."
51+
@echo "This takes up to 1 hour and $(URAM) GB of RAM."
52+
endif
53+
@echo
54+
@echo "For more control (e.g. to use multiple CPU cores during part of"
55+
@echo "the process) you need to run \`\`rpython/bin/rpython'' directly."
56+
@echo "For more information see \`\`http://pypy.org/download.html''."
57+
@echo "===================================================================="
58+
@echo
59+
@sleep 5
60+
cd pypy/goal && PYPY_EXE_NAME=pypy $(RUNINTERP) ../../rpython/bin/rpython $(JOBS) -Ojit --no-gen-extension targetpypystandalone.py
61+
62+
4063
cffi_imports: pypy-c
4164
cd lib_pypy && ../pypy/goal/pypy-c pypy_tools/build_cffi_imports.py || /bin/true

pypy/goal/targetpypystandalone.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,10 @@ def get_additional_config_options(self):
243243

244244
def target(self, driver, args):
245245
driver.exe_name = 'pypy-jit-ext-%(backend)s'
246+
exe_name = os.getenv('PYPY_EXE_NAME')
247+
if exe_name:
248+
driver.exe_name = exe_name + '-%(backend)s'
249+
print('exe_name:', driver.exe_name)
246250

247251
config = driver.config
248252
parser = self.opt_parser(config)

0 commit comments

Comments
 (0)