Browse Source

build: make python executable configurable

Upstreamed in https://codereview.chromium.org/11418101/

Fixes #4287.
v0.9.4-release
Ben Noordhuis 12 years ago
parent
commit
1e738c5ef2
  1. 1
      common.gypi
  2. 3
      configure
  3. 9
      deps/v8/Makefile
  4. 3
      deps/v8/build/common.gypi
  5. 2
      deps/v8/src/d8.gyp
  6. 2
      deps/v8/test/cctest/cctest.gyp
  7. 6
      deps/v8/tools/gyp/v8.gyp
  8. 4
      node.gyp

1
common.gypi

@ -9,6 +9,7 @@
'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
'gcc_version%': 'unknown', 'gcc_version%': 'unknown',
'clang%': 0, 'clang%': 0,
'python%': 'python',
# Turn on optimizations that may trigger compiler bugs. # Turn on optimizations that may trigger compiler bugs.
# Use at your own risk. Do *NOT* report bugs if this option is enabled. # Use at your own risk. Do *NOT* report bugs if this option is enabled.

3
configure

@ -573,7 +573,7 @@ def configure_openssl(o):
output = { output = {
'variables': {}, 'variables': { 'python': sys.executable },
'include_dirs': [], 'include_dirs': [],
'libraries': [], 'libraries': [],
'defines': [], 'defines': [],
@ -611,6 +611,7 @@ config = {
'BUILDTYPE': 'Debug' if options.debug else 'Release', 'BUILDTYPE': 'Debug' if options.debug else 'Release',
'USE_NINJA': str(int(options.use_ninja or 0)), 'USE_NINJA': str(int(options.use_ninja or 0)),
'USE_XCODE': str(int(options.use_xcode or 0)), 'USE_XCODE': str(int(options.use_xcode or 0)),
'PYTHON': sys.executable,
} }
config = '\n'.join(map('='.join, config.iteritems())) + '\n' config = '\n'.join(map('='.join, config.iteritems())) + '\n'

9
deps/v8/Makefile

@ -24,6 +24,7 @@
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PYTHON ?= python
# Variable default definitions. Override them by exporting them in your shell. # Variable default definitions. Override them by exporting them in your shell.
@ -112,6 +113,8 @@ ifeq ($(hardfp), on)
GYPFLAGS += -Dv8_use_arm_eabi_hardfloat=true GYPFLAGS += -Dv8_use_arm_eabi_hardfloat=true
endif endif
GYPFLAGS += "-Dpython=$(PYTHON)"
# ----------------- available targets: -------------------- # ----------------- available targets: --------------------
# - "dependencies": pulls in external dependencies (currently: GYP) # - "dependencies": pulls in external dependencies (currently: GYP)
# - any arch listed in ARCHES (see below) # - any arch listed in ARCHES (see below)
@ -179,7 +182,7 @@ $(BUILDS): $(OUTDIR)/Makefile.$$(basename $$@)
@$(MAKE) -C "$(OUTDIR)" -f Makefile.$(basename $@) \ @$(MAKE) -C "$(OUTDIR)" -f Makefile.$(basename $@) \
CXX="$(CXX)" LINK="$(LINK)" \ CXX="$(CXX)" LINK="$(LINK)" \
BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \
python -c "print raw_input().capitalize()") \ $(PYTHON) -c "print raw_input().capitalize()") \
builddir="$(shell pwd)/$(OUTDIR)/$@" builddir="$(shell pwd)/$(OUTDIR)/$@"
native: $(OUTDIR)/Makefile.native native: $(OUTDIR)/Makefile.native
@ -250,14 +253,14 @@ clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES)) native.clean
OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(ARCHES)) OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(ARCHES))
$(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE) $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE)
GYP_GENERATORS=make \ GYP_GENERATORS=make \
build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ $(PYTHON) build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
-Ibuild/standalone.gypi --depth=. \ -Ibuild/standalone.gypi --depth=. \
-Dv8_target_arch=$(subst .,,$(suffix $@)) \ -Dv8_target_arch=$(subst .,,$(suffix $@)) \
-S.$(subst .,,$(suffix $@)) $(GYPFLAGS) -S.$(subst .,,$(suffix $@)) $(GYPFLAGS)
$(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE) $(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE)
GYP_GENERATORS=make \ GYP_GENERATORS=make \
build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ $(PYTHON) build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
-Ibuild/standalone.gypi --depth=. -S.native $(GYPFLAGS) -Ibuild/standalone.gypi --depth=. -S.native $(GYPFLAGS)
must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN: must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN:

3
deps/v8/build/common.gypi

@ -103,6 +103,9 @@
# Interpreted regexp engine exists as platform-independent alternative # Interpreted regexp engine exists as platform-independent alternative
# based where the regular expression is compiled to a bytecode. # based where the regular expression is compiled to a bytecode.
'v8_interpreted_regexp%': 0, 'v8_interpreted_regexp%': 0,
# Name of the python executable.
'python%': 'python',
}, },
'target_defaults': { 'target_defaults': {
'conditions': [ 'conditions': [

2
deps/v8/src/d8.gyp

@ -99,7 +99,7 @@
'<(SHARED_INTERMEDIATE_DIR)/d8-js.cc', '<(SHARED_INTERMEDIATE_DIR)/d8-js.cc',
], ],
'action': [ 'action': [
'python', '<(python)',
'../tools/js2c.py', '../tools/js2c.py',
'<@(_outputs)', '<@(_outputs)',
'D8', 'D8',

2
deps/v8/test/cctest/cctest.gyp

@ -187,7 +187,7 @@
'<(generated_file)', '<(generated_file)',
], ],
'action': [ 'action': [
'python', '<(python)',
'../../tools/js2c.py', '../../tools/js2c.py',
'<@(_outputs)', '<@(_outputs)',
'TEST', # type 'TEST', # type

6
deps/v8/tools/gyp/v8.gyp

@ -796,7 +796,7 @@
'<(SHARED_INTERMEDIATE_DIR)/libraries.cc', '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
], ],
'action': [ 'action': [
'python', '<(python)',
'../../tools/js2c.py', '../../tools/js2c.py',
'<@(_outputs)', '<@(_outputs)',
'CORE', 'CORE',
@ -814,7 +814,7 @@
'<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
], ],
'action': [ 'action': [
'python', '<(python)',
'../../tools/js2c.py', '../../tools/js2c.py',
'<@(_outputs)', '<@(_outputs)',
'EXPERIMENTAL', 'EXPERIMENTAL',
@ -844,7 +844,7 @@
'<(SHARED_INTERMEDIATE_DIR)/debug-support.cc', '<(SHARED_INTERMEDIATE_DIR)/debug-support.cc',
], ],
'action': [ 'action': [
'python', '<(python)',
'../../tools/gen-postmortem-metadata.py', '../../tools/gen-postmortem-metadata.py',
'<@(_outputs)', '<@(_outputs)',
'<@(heapobject_files)' '<@(heapobject_files)'

4
node.gyp

@ -314,14 +314,14 @@
' or node_use_systemtap=="true"', ' or node_use_systemtap=="true"',
{ {
'action': [ 'action': [
'python', '<(python)',
'tools/js2c.py', 'tools/js2c.py',
'<@(_outputs)', '<@(_outputs)',
'<@(_inputs)', '<@(_inputs)',
], ],
}, { # No Dtrace }, { # No Dtrace
'action': [ 'action': [
'python', '<(python)',
'tools/js2c.py', 'tools/js2c.py',
'<@(_outputs)', '<@(_outputs)',
'<@(_inputs)', '<@(_inputs)',

Loading…
Cancel
Save