1# 2# Copyright (C) 2013 Google Inc. All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: 7# 8# * Redistributions of source code must retain the above copyright 9# notice, this list of conditions and the following disclaimer. 10# * Redistributions in binary form must reproduce the above 11# copyright notice, this list of conditions and the following disclaimer 12# in the documentation and/or other materials provided with the 13# distribution. 14# * Neither the name of Google Inc. nor the names of its 15# contributors may be used to endorse or promote products derived from 16# this software without specific prior written permission. 17# 18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29# 30{ 31 'variables': { 32 # If set to 1, doesn't compile debug symbols into webcore reducing the 33 # size of the binary and increasing the speed of gdb. gcc only. 34 'remove_webcore_debug_symbols%': 0, 35 'enable_oilpan%': 0, 36 # If set to 1 (default) and using clang, the Blink GC plugin will check the 37 # usage of the garbage-collection infrastructure during compilation. 38 'blink_gc_plugin%': 1, 39 # If set to 1 together with blink_gc_plugin, the Blink GC plugin will dump 40 # points-to graph files for each compilation unit. 41 'blink_gc_plugin_dump_graph%': 0, 42 }, 43 'targets': [ 44 { 45 # GN version: //third_party/WebKit/Source:config 46 # (In GN this is a config rather than a target.) 47 'target_name': 'config', 48 'type': 'none', 49 'direct_dependent_settings': { 50 'include_dirs': [ 51 '.', 52 '..', 53 ], 54 'msvs_disabled_warnings': [ 55 4305, 4324, 4714, 4800, 4996, 56 ], 57 'variables': { 58 'chromium_code': 1, 59 }, 60 'conditions': [ 61 ['OS=="win" and component=="shared_library"', { 62 'defines': [ 63 'USING_V8_SHARED', 64 ], 65 }], 66 ['OS=="win"', { 67 'sources/': [ 68 ['exclude', 'Posix\\.cpp$'], 69 ], 70 },{ # OS!="win" 71 'sources/': [ 72 ['exclude', 'Win\\.cpp$'], 73 ], 74 }], 75 ['OS!="mac"', { 76 'sources/': [ 77 ['exclude', 'Mac\\.mm$'], 78 ], 79 }], 80 ['OS!="android"', { 81 'sources/': [ 82 ['exclude', 'Android\\.cpp$'], 83 ], 84 }], 85 ['OS!="win" and remove_webcore_debug_symbols==1', { 86 # Remove -g from all targets defined here. 87 'cflags!': ['-g'], 88 }], 89 ['gcc_version>=46', { 90 # Disable warnings about c++0x compatibility, as some names (such as 91 # nullptr) conflict with upcoming c++0x types. 92 'cflags_cc': ['-Wno-c++0x-compat'], 93 }], 94 ['OS=="linux" and target_arch=="arm"', { 95 # Due to a bug in gcc arm, we get warnings about uninitialized 96 # timesNewRoman.unstatic.3258 and colorTransparent.unstatic.4879. 97 'cflags': ['-Wno-uninitialized'], 98 }], 99 ['clang==1', { 100 'cflags': ['-Wglobal-constructors'], 101 'xcode_settings': { 102 'WARNING_CFLAGS': ['-Wglobal-constructors'], 103 }, 104 }], 105 # Only enable the blink_gc_plugin when using clang and chrome plugins. 106 ['blink_gc_plugin==1 and clang==1 and clang_use_chrome_plugins==1', { 107 'cflags': ['<!@(../../../tools/clang/scripts/blink_gc_plugin_flags.sh enable-oilpan=<(enable_oilpan) dump-graph=<(blink_gc_plugin_dump_graph))'], 108 'xcode_settings': { 109 'OTHER_CFLAGS': ['<!@(../../../tools/clang/scripts/blink_gc_plugin_flags.sh enable-oilpan=<(enable_oilpan) dump-graph=<(blink_gc_plugin_dump_graph))'], 110 }, 111 }], 112 ], 113 }, 114 }, 115 { 116 'target_name': 'unittest_config', 117 'type': 'none', 118 'dependencies': [ 119 'config', 120 '<(DEPTH)/testing/gmock.gyp:gmock', 121 '<(DEPTH)/testing/gtest.gyp:gtest', 122 ], 123 'export_dependent_settings': [ 124 'config', 125 '<(DEPTH)/testing/gmock.gyp:gmock', 126 '<(DEPTH)/testing/gtest.gyp:gtest', 127 ], 128 'direct_dependent_settings': { 129 'cflags!': ['-Wglobal-constructors'], 130 'xcode_settings': { 131 'WARNING_CFLAGS!': ['-Wglobal-constructors'], 132 }, 133 'variables': { 134 'chromium_code': 1, 135 }, 136 }, 137 } 138 ], 139} 140