From c47d3c63695d2999752f5fc61ff171f3ff100553 Mon Sep 17 00:00:00 2001 From: machenbach Date: Mon, 6 Jun 2016 01:40:15 -0700 Subject: [PATCH] [build] Use sysroot for linux compilation with clang This ports the configuration for using a sysroot from chromium's common.gypi. This is restricted to clang only. BUG=chromium:474921, chromium:616032 LOG=y Review-Url: https://codereview.chromium.org/2028623002 Cr-Commit-Position: refs/heads/master@{#36729} --- DEPS | 12 +++++++++++ gypfiles/standalone.gypi | 44 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/DEPS b/DEPS index 1b684abd29..5e64adce00 100644 --- a/DEPS +++ b/DEPS @@ -189,6 +189,18 @@ hooks = [ "-s", "v8/buildtools/linux64/gn.sha1", ], }, + { + # Downloads the current stable linux sysroot to build/linux/ if needed. + # This sysroot updates at about the same rate that the chrome build deps + # change. + 'name': 'sysroot', + 'pattern': '.', + 'action': [ + 'python', + 'v8/build/linux/sysroot_scripts/install-sysroot.py', + '--running-as-hook', + ], + }, { # Update the Windows toolchain if necessary. 'name': 'win_toolchain', diff --git a/gypfiles/standalone.gypi b/gypfiles/standalone.gypi index 3191641310..9aeed5a14b 100644 --- a/gypfiles/standalone.gypi +++ b/gypfiles/standalone.gypi @@ -63,21 +63,52 @@ '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%': '