From 9883fa02621f9a83d91155eb62cf568197157436 Mon Sep 17 00:00:00 2001 From: Anders Hasselqvist Date: Wed, 17 Feb 2016 16:56:39 +0900 Subject: [PATCH] Allow overriding settings from Chromium's common.gypi Build settings are coming from the Chromium build settings in packager/build/common.gypi. We need to override those settings and set CLANG_CXX_LIBRARY = libc++ for MacOSX builds. packager/common.gypi does some override but only for packages that explicitly include it. We want a global override. Introduce packager/common_overrides.gypi which is injected as an argument to gyp in gyp_packager.py --- gyp_packager.py | 3 +++ packager/common_overrides.gypi | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 packager/common_overrides.gypi diff --git a/gyp_packager.py b/gyp_packager.py index 52009be284..d09e7d5df2 100755 --- a/gyp_packager.py +++ b/gyp_packager.py @@ -60,6 +60,9 @@ if __name__ == '__main__': # Always include common.gypi. args.extend(['-I' + os.path.join(src_dir, 'build', 'common.gypi')]) + # Allow overriding settings from Chromium's common.gypi + args.extend(['-I' + os.path.join(src_dir, 'common_overrides.gypi')]) + # Set these default GYP_DEFINES if user does not set the value explicitly. _DEFAULT_DEFINES = {'test_isolation_mode': 'noop', 'use_glib': 0, diff --git a/packager/common_overrides.gypi b/packager/common_overrides.gypi new file mode 100644 index 0000000000..5560820a2c --- /dev/null +++ b/packager/common_overrides.gypi @@ -0,0 +1,19 @@ +# Copyright 2016 Google Inc. All rights reserved. +# +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file or at +# https://developers.google.com/open-source/licenses/bsd +# +# This file contains global overrides to the chromium common.gypi settings . + +{ + 'target_defaults': { + 'conditions': [ + ['OS=="mac"', { + 'xcode_settings' : { + 'CLANG_CXX_LIBRARY': 'libc++', # -stdlib=libc++ + }, + }], + ], + }, +}