Chromium Code Reviews| Index: gypfiles/standalone.gypi |
| diff --git a/gypfiles/standalone.gypi b/gypfiles/standalone.gypi |
| index d764e80b1f567561541e8356a82370f60271a943..ceda67136e4ec0220660cdd8808162586d273739 100644 |
| --- a/gypfiles/standalone.gypi |
| +++ b/gypfiles/standalone.gypi |
| @@ -63,21 +63,51 @@ |
| 'host_arch%': 'ia32', |
| }], |
| ], |
| + |
| + # By default we build against a stable sysroot image to avoid |
| + # depending on the packages installed on the local machine. Set this |
| + # to 0 to build against locally installed headers and libraries (e.g. |
| + # if packaging for a linux distro) |
| + 'use_sysroot%': 1, |
| }, |
| 'host_arch%': '<(host_arch)', |
| 'target_arch%': '<(host_arch)', |
| + 'use_sysroot%': '<(use_sysroot)', |
| 'base_dir%': '<!(cd <(DEPTH) && python -c "import os; print os.getcwd()")', |
| # Instrument for code coverage and use coverage wrapper to exclude some |
| # files. Uses gcov if clang=0 is set explicitly. Otherwise, |
| # sanitizer_coverage must be set too. |
| 'coverage%': 0, |
| + |
| + 'conditions': [ |
| + # The system root for linux builds. |
| + ['OS=="linux" and use_sysroot==1', { |
| + 'conditions': [ |
| + ['target_arch=="arm"', { |
| + 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_wheezy_arm-sysroot', |
| + }], |
| + ['target_arch=="x64"', { |
| + 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_wheezy_amd64-sysroot', |
| + }], |
| + ['target_arch=="ia32"', { |
| + 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_wheezy_i386-sysroot', |
| + }], |
| + ['target_arch=="mipsel"', { |
| + 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_wheezy_mips-sysroot', |
| + }], |
| + ], |
|
vogelheim
2016/06/01 10:51:19
I'm not sure what gyp does if OS is linux, use_sys
Michael Achenbach
2016/06/01 11:20:37
I think it'll error out. So one should not set use
|
| + }, { |
| + 'sysroot%': '' |
| + }], # OS=="linux" and use_sysroot==1 |
| + ], |
| }, |
| 'base_dir%': '<(base_dir)', |
| 'host_arch%': '<(host_arch)', |
| 'target_arch%': '<(target_arch)', |
| 'v8_target_arch%': '<(target_arch)', |
| 'coverage%': '<(coverage)', |
| + 'sysroot%': '<(sysroot)', |
| 'asan%': 0, |
| 'lsan%': 0, |
| 'msan%': 0, |
| @@ -165,6 +195,7 @@ |
| 'fastbuild%': '<(fastbuild)', |
| 'coverage%': '<(coverage)', |
| 'has_valgrind%': '<(has_valgrind)', |
| + 'sysroot%': '<(sysroot)', |
| # Add a simple extras solely for the purpose of the cctests |
| 'v8_extra_library_files': ['../test/cctest/test-extra.js'], |
| @@ -631,6 +662,18 @@ |
| '-B<(base_dir)/third_party/binutils/Linux_x64/Release/bin', |
| ], |
| }], |
| + ['sysroot!="" and clang==1', { |
| + 'target_conditions': [ |
| + ['_toolset=="target"', { |
| + 'cflags': [ |
| + '--sysroot=<(sysroot)', |
| + ], |
| + 'ldflags': [ |
| + '--sysroot=<(sysroot)', |
| + '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))', |
| + ], |
| + }]] |
| + }], |
| ], |
| }, |
| }], |