Index: build/common.gypi |
diff --git a/build/common.gypi b/build/common.gypi |
index 845ab5a1dc0e57e095f8a20bf10c1043755b2221..caa16b64c2043473f149110e48372eed443633d2 100644 |
--- a/build/common.gypi |
+++ b/build/common.gypi |
@@ -36,6 +36,12 @@ |
# Use a raw surface abstraction. |
'use_ozone%': 0, |
+ # 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, |
+ |
# Configure the build for small devices. See crbug.com/318413 |
'embedded%': 0, |
@@ -57,6 +63,7 @@ |
'use_ozone%': '<(use_ozone)', |
'embedded%': '<(embedded)', |
'host_arch%': '<(host_arch)', |
+ 'use_sysroot%': '<(use_sysroot)', |
# Whether we are using Views Toolkit |
'toolkit_views%': 0, |
@@ -88,11 +95,11 @@ |
# Enable Wayland display server support. |
'enable_wayland_server%' : 0, |
- # 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, |
+ # Set this to true when building with Clang. |
+ # See http://code.google.com/p/chromium/wiki/Clang for details. |
+ # If this is set, clang is used as both host and target compiler in |
+ # cross-compile builds. |
+ 'clang%': 0, |
# Override buildtype to select the desired build flavor. |
# Dev - everyday build for development/testing |
@@ -114,6 +121,15 @@ |
'use_aura%': 1, |
}], |
+ # Turn off use_sysroot when clang build is disabled. |
+ # System headers for gcc > 4.6 aren't available at sysroot location. |
+ # If clang build is disabled and gcc > 4.6, ToT builds fail. |
+ # https://code.google.com/p/chromium/issues/detail?id=504446#c17 |
+ # TODO(kphanee): Can we check for gcc_version here somehow? |
+ ['use_sysroot==1 and clang==0', { |
+ 'use_sysroot%': 0, |
+ }], |
+ |
['chromecast==1', { |
'use_libpci': 0, |
'conditions': [ |
@@ -171,6 +187,7 @@ |
'branding_path_component%': '<(branding)', |
'host_arch%': '<(host_arch)', |
'target_arch%': '<(target_arch)', |
+ 'clang%': '<(clang)', |
'target_subarch%': '', |
@@ -355,6 +372,7 @@ |
'branding%': '<(branding)', |
'branding_path_component%': '<(branding_path_component)', |
'arm_version%': '<(arm_version)', |
+ 'clang%': '<(clang)', |
'sysroot%': '<(sysroot)', |
'chroot_cmd%': '<(chroot_cmd)', |
'system_libdir%': '<(system_libdir)', |
@@ -625,11 +643,6 @@ |
# Clang stuff. |
'make_clang_dir%': 'third_party/llvm-build/Release+Asserts', |
- # Set this to true when building with Clang. |
- # See http://code.google.com/p/chromium/wiki/Clang for details. |
- # If this is set, clang is used as both host and target compiler in |
- # cross-compile builds. |
- 'clang%': 0, |
# Use experimental lld linker instead of the platform's default linker. |
'use_lld%': 0, |