From 3a954aa52d8e04025c502c468cb36c04dd23c59d Mon Sep 17 00:00:00 2001 From: "jochen@chromium.org" Date: Fri, 17 Jan 2014 09:11:22 +0000 Subject: [PATCH] Introduce a setting to control the toolset for which d8 is compiled BUG=v8:1775 R=machenbach@chromium.org LOG=y Review URL: https://codereview.chromium.org/138273016 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18656 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- build/toolchain.gypi | 5 +++++ src/d8.gyp | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/build/toolchain.gypi b/build/toolchain.gypi index c3b1de0..badac26 100644 --- a/build/toolchain.gypi +++ b/build/toolchain.gypi @@ -70,6 +70,11 @@ # it's handled in build/standalone.gypi. 'want_separate_host_toolset%': 1, + # Toolset the d8 binary should be compiled for. Possible values are 'host' + # and 'target'. If you want to run v8 tests, it needs to be set to 'target'. + # The setting is ignored if want_separate_host_toolset is 0. + 'v8_toolset_for_d8%': 'target', + 'host_os%': '<(OS)', 'werror%': '-Werror', # For a shared library build, results in "libv8-<(soname_version).so". diff --git a/src/d8.gyp b/src/d8.gyp index bc1dedc..0e51baa 100644 --- a/src/d8.gyp +++ b/src/d8.gyp @@ -32,6 +32,7 @@ # Enable support for Intel VTune. Supported on ia32/x64 only 'v8_enable_vtunejit%': 0, 'v8_enable_i18n_support%': 1, + 'v8_toolset_for_d8%': 'target', }, 'includes': ['../build/toolchain.gypi', '../build/features.gypi'], 'targets': [ @@ -49,6 +50,9 @@ 'd8.cc', ], 'conditions': [ + [ 'want_separate_host_toolset==1', { + 'toolsets': [ '<(v8_toolset_for_d8)', ], + }], [ 'console=="readline"', { 'libraries': [ '-lreadline', ], 'sources': [ 'd8-readline.cc' ], -- 2.7.4