andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 1 | # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license |
| 4 | # that can be found in the LICENSE file in the root of the source |
| 5 | # tree. An additional intellectual property rights grant can be found |
| 6 | # in the file PATENTS. All contributing project authors may |
| 7 | # be found in the AUTHORS file in the root of the source tree. |
| 8 | |
| 9 | # This file contains common settings for building WebRTC components. |
| 10 | |
| 11 | { |
| 12 | # Nesting is required in order to use variables for setting other variables. |
| 13 | 'variables': { |
| 14 | 'variables': { |
| 15 | 'variables': { |
| 16 | 'variables': { |
henrike@webrtc.org | 7ef7df5 | 2014-01-21 15:54:56 +0000 | [diff] [blame] | 17 | # This will already be set to zero by supplement.gypi |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 18 | 'build_with_chromium%': 1, |
| 19 | }, |
| 20 | 'build_with_chromium%': '<(build_with_chromium)', |
| 21 | |
| 22 | 'conditions': [ |
henrike@webrtc.org | 4258154 | 2013-07-16 16:37:22 +0000 | [diff] [blame] | 23 | ['build_with_chromium==1', { |
| 24 | 'build_with_libjingle': 1, |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 25 | 'webrtc_root%': '<(DEPTH)/third_party/webrtc', |
kjellander@webrtc.org | 0372b93 | 2014-09-03 14:34:46 +0000 | [diff] [blame] | 26 | 'apk_tests_path%': '<(DEPTH)/third_party/webrtc/build/apk_tests_noop.gyp', |
henrike@webrtc.org | a2073af | 2013-07-08 18:14:58 +0000 | [diff] [blame] | 27 | 'modules_java_gyp_path%': '<(DEPTH)/third_party/webrtc/modules/modules_java_chromium.gyp', |
michaelbai@google.com | 82ebb46 | 2014-02-11 04:48:27 +0000 | [diff] [blame] | 28 | 'gen_core_neon_offsets_gyp%': '<(DEPTH)/third_party/webrtc/modules/audio_processing/gen_core_neon_offsets_chromium.gyp', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 29 | }, { |
henrike@webrtc.org | 4258154 | 2013-07-16 16:37:22 +0000 | [diff] [blame] | 30 | 'build_with_libjingle%': 0, |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 31 | 'webrtc_root%': '<(DEPTH)/webrtc', |
kjellander@webrtc.org | 0372b93 | 2014-09-03 14:34:46 +0000 | [diff] [blame] | 32 | 'apk_tests_path%': '<(DEPTH)/webrtc/build/apk_tests.gyp', |
henrike@webrtc.org | a2073af | 2013-07-08 18:14:58 +0000 | [diff] [blame] | 33 | 'modules_java_gyp_path%': '<(DEPTH)/webrtc/modules/modules_java.gyp', |
michaelbai@google.com | 82ebb46 | 2014-02-11 04:48:27 +0000 | [diff] [blame] | 34 | 'gen_core_neon_offsets_gyp%':'<(DEPTH)/webrtc/modules/audio_processing/gen_core_neon_offsets.gyp', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 35 | }], |
| 36 | ], |
| 37 | }, |
| 38 | 'build_with_chromium%': '<(build_with_chromium)', |
fischman@webrtc.org | f61e02c | 2013-02-20 23:13:46 +0000 | [diff] [blame] | 39 | 'build_with_libjingle%': '<(build_with_libjingle)', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 40 | 'webrtc_root%': '<(webrtc_root)', |
kjellander@webrtc.org | 0372b93 | 2014-09-03 14:34:46 +0000 | [diff] [blame] | 41 | 'apk_tests_path%': '<(apk_tests_path)', |
henrike@webrtc.org | a2073af | 2013-07-08 18:14:58 +0000 | [diff] [blame] | 42 | 'modules_java_gyp_path%': '<(modules_java_gyp_path)', |
michaelbai@google.com | 82ebb46 | 2014-02-11 04:48:27 +0000 | [diff] [blame] | 43 | 'gen_core_neon_offsets_gyp%': '<(gen_core_neon_offsets_gyp)', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 44 | 'webrtc_vp8_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp8', |
stefan@webrtc.org | f56d612 | 2013-07-09 12:32:35 +0000 | [diff] [blame] | 45 | 'rbe_components_path%': '<(webrtc_root)/modules/remote_bitrate_estimator', |
leozwang@webrtc.org | 6f19b1b | 2012-10-27 17:46:55 +0000 | [diff] [blame] | 46 | 'include_opus%': 1, |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 47 | }, |
| 48 | 'build_with_chromium%': '<(build_with_chromium)', |
fischman@webrtc.org | f61e02c | 2013-02-20 23:13:46 +0000 | [diff] [blame] | 49 | 'build_with_libjingle%': '<(build_with_libjingle)', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 50 | 'webrtc_root%': '<(webrtc_root)', |
kjellander@webrtc.org | 0372b93 | 2014-09-03 14:34:46 +0000 | [diff] [blame] | 51 | 'apk_tests_path%': '<(apk_tests_path)', |
henrike@webrtc.org | a2073af | 2013-07-08 18:14:58 +0000 | [diff] [blame] | 52 | 'modules_java_gyp_path%': '<(modules_java_gyp_path)', |
michaelbai@google.com | 82ebb46 | 2014-02-11 04:48:27 +0000 | [diff] [blame] | 53 | 'gen_core_neon_offsets_gyp%': '<(gen_core_neon_offsets_gyp)', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 54 | 'webrtc_vp8_dir%': '<(webrtc_vp8_dir)', |
| 55 | 'include_opus%': '<(include_opus)', |
henrike@webrtc.org | d72a759 | 2014-09-02 15:41:12 +0000 | [diff] [blame] | 56 | 'rtc_relative_path%': 1, |
stefan@webrtc.org | f56d612 | 2013-07-09 12:32:35 +0000 | [diff] [blame] | 57 | 'rbe_components_path%': '<(rbe_components_path)', |
henrike@webrtc.org | 9f36c08 | 2014-06-16 21:35:20 +0000 | [diff] [blame] | 58 | 'external_libraries%': '0', |
| 59 | 'json_root%': '<(DEPTH)/third_party/jsoncpp/source/include/', |
| 60 | # openssl needs to be defined or gyp will complain. Is is only used when |
| 61 | # when providing external libraries so just use current directory as a |
| 62 | # placeholder. |
| 63 | 'ssl_root%': '.', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 64 | |
| 65 | # The Chromium common.gypi we use treats all gyp files without |
| 66 | # chromium_code==1 as third party code. This disables many of the |
| 67 | # preferred warning settings. |
| 68 | # |
| 69 | # We can set this here to have WebRTC code treated as Chromium code. Our |
| 70 | # third party code will still have the reduced warning settings. |
| 71 | 'chromium_code': 1, |
| 72 | |
kjellander@webrtc.org | 0aa04f9 | 2014-03-28 13:14:00 +0000 | [diff] [blame] | 73 | # Set to 1 to enable code coverage on Linux using the gcov library. |
| 74 | 'coverage%': 0, |
| 75 | |
solenberg@webrtc.org | d6e4663 | 2013-10-30 16:06:26 +0000 | [diff] [blame] | 76 | # Remote bitrate estimator logging/plotting. |
| 77 | 'enable_bwe_test_logging%': 0, |
| 78 | |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 79 | # Adds video support to dependencies shared by voice and video engine. |
| 80 | # This should normally be enabled; the intended use is to disable only |
| 81 | # when building voice engine exclusively. |
| 82 | 'enable_video%': 1, |
| 83 | |
| 84 | # Selects fixed-point code where possible. |
| 85 | 'prefer_fixed_point%': 0, |
| 86 | |
| 87 | # Enable data logging. Produces text files with data logged within engines |
| 88 | # which can be easily parsed for offline processing. |
| 89 | 'enable_data_logging%': 0, |
| 90 | |
andrew@webrtc.org | f9825e5 | 2013-05-20 21:18:04 +0000 | [diff] [blame] | 91 | # Enables the use of protocol buffers for debug recordings. |
| 92 | 'enable_protobuf%': 1, |
| 93 | |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 94 | # Disable these to not build components which can be externally provided. |
henrike@webrtc.org | a685c9d | 2014-06-17 14:48:44 +0000 | [diff] [blame] | 95 | 'build_json%': 1, |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 96 | 'build_libjpeg%': 1, |
| 97 | 'build_libyuv%': 1, |
| 98 | 'build_libvpx%': 1, |
henrike@webrtc.org | a685c9d | 2014-06-17 14:48:44 +0000 | [diff] [blame] | 99 | 'build_ssl%': 1, |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 100 | |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 101 | # Disable by default |
| 102 | 'have_dbus_glib%': 0, |
| 103 | |
tina.legrand@webrtc.org | 1f8c02a | 2012-10-25 12:37:08 +0000 | [diff] [blame] | 104 | # Enable to use the Mozilla internal settings. |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 105 | 'build_with_mozilla%': 0, |
| 106 | |
| 107 | 'libyuv_dir%': '<(DEPTH)/third_party/libyuv', |
| 108 | |
andrew@webrtc.org | 5140e24 | 2013-02-21 20:12:21 +0000 | [diff] [blame] | 109 | # Define MIPS architecture variant, MIPS DSP variant and MIPS FPU |
| 110 | # This may be subject to change in accordance to Chromium's MIPS flags |
andrew@webrtc.org | d05756f | 2014-09-30 15:53:24 +0000 | [diff] [blame] | 111 | 'mips_arch_variant%': 'r1', |
andrew@webrtc.org | 5140e24 | 2013-02-21 20:12:21 +0000 | [diff] [blame] | 112 | 'mips_dsp_rev%': 0, |
| 113 | 'mips_fpu%' : 1, |
henrike@webrtc.org | 34c50c1 | 2013-09-27 22:34:35 +0000 | [diff] [blame] | 114 | 'enable_android_opensl%': 1, |
andrew@webrtc.org | 5140e24 | 2013-02-21 20:12:21 +0000 | [diff] [blame] | 115 | |
andrew@webrtc.org | af7fdfc | 2014-08-29 17:41:13 +0000 | [diff] [blame] | 116 | # Link-Time Optimizations |
| 117 | # Executes code generation at link-time instead of compile-time |
| 118 | # https://gcc.gnu.org/wiki/LinkTimeOptimization |
| 119 | 'use_lto%': 0, |
| 120 | |
tpsiaki@google.com | 67eabc0 | 2014-09-10 18:06:47 +0000 | [diff] [blame] | 121 | # Defer ssl perference to that specified through sslconfig.h instead of |
| 122 | # choosing openssl or nss directly. In practice, this can be used to |
| 123 | # enable schannel on windows. |
| 124 | 'use_legacy_ssl_defaults%': 0, |
| 125 | |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 126 | 'conditions': [ |
| 127 | ['build_with_chromium==1', { |
| 128 | # Exclude pulse audio on Chromium since its prerequisites don't require |
| 129 | # pulse audio. |
| 130 | 'include_pulse_audio%': 0, |
| 131 | |
| 132 | # Exclude internal ADM since Chromium uses its own IO handling. |
| 133 | 'include_internal_audio_device%': 0, |
| 134 | |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 135 | }, { # Settings for the standalone (not-in-Chromium) build. |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 136 | # TODO(andrew): For now, disable the Chrome plugins, which causes a |
| 137 | # flood of chromium-style warnings. Investigate enabling them: |
| 138 | # http://code.google.com/p/webrtc/issues/detail?id=163 |
| 139 | 'clang_use_chrome_plugins%': 0, |
| 140 | |
henrike@webrtc.org | 4258154 | 2013-07-16 16:37:22 +0000 | [diff] [blame] | 141 | 'include_pulse_audio%': 1, |
| 142 | 'include_internal_audio_device%': 1, |
henrike@webrtc.org | 4258154 | 2013-07-16 16:37:22 +0000 | [diff] [blame] | 143 | }], |
| 144 | ['build_with_libjingle==1', { |
| 145 | 'include_tests%': 0, |
andrew@webrtc.org | f1a4817 | 2013-11-07 23:47:26 +0000 | [diff] [blame] | 146 | 'restrict_webrtc_logging%': 1, |
henrike@webrtc.org | 4258154 | 2013-07-16 16:37:22 +0000 | [diff] [blame] | 147 | }, { |
| 148 | 'include_tests%': 1, |
andrew@webrtc.org | f1a4817 | 2013-11-07 23:47:26 +0000 | [diff] [blame] | 149 | 'restrict_webrtc_logging%': 0, |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 150 | }], |
| 151 | ['OS=="ios"', { |
fischman@webrtc.org | d0f4c21 | 2013-08-20 22:16:55 +0000 | [diff] [blame] | 152 | 'build_libjpeg%': 0, |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 153 | 'enable_protobuf%': 0, |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 154 | }], |
fischman@webrtc.org | 31b4a5a | 2013-09-05 16:46:36 +0000 | [diff] [blame] | 155 | ['target_arch=="arm" or target_arch=="armv7"', { |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 156 | 'prefer_fixed_point%': 1, |
| 157 | }], |
| 158 | ], # conditions |
| 159 | }, |
| 160 | 'target_defaults': { |
| 161 | 'include_dirs': [ |
kjellander@webrtc.org | e1888af | 2013-01-28 20:00:03 +0000 | [diff] [blame] | 162 | # To include the top-level directory when building in Chrome, so we can |
| 163 | # use full paths (e.g. headers inside testing/ or third_party/). |
| 164 | '<(DEPTH)', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 165 | ], |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 166 | 'conditions': [ |
andrew@webrtc.org | f1a4817 | 2013-11-07 23:47:26 +0000 | [diff] [blame] | 167 | ['restrict_webrtc_logging==1', { |
| 168 | 'defines': ['WEBRTC_RESTRICT_LOGGING',], |
andrew@webrtc.org | c3e5d34 | 2012-11-23 19:30:59 +0000 | [diff] [blame] | 169 | }], |
tina.legrand@webrtc.org | 1f8c02a | 2012-10-25 12:37:08 +0000 | [diff] [blame] | 170 | ['build_with_mozilla==1', { |
| 171 | 'defines': [ |
| 172 | # Changes settings for Mozilla build. |
| 173 | 'WEBRTC_MOZILLA_BUILD', |
| 174 | ], |
| 175 | }], |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 176 | ['have_dbus_glib==1', { |
| 177 | 'defines': [ |
| 178 | 'HAVE_DBUS_GLIB', |
| 179 | ], |
| 180 | 'cflags': [ |
| 181 | '<!@(pkg-config --cflags dbus-glib-1)', |
| 182 | ], |
| 183 | }], |
henrike@webrtc.org | d72a759 | 2014-09-02 15:41:12 +0000 | [diff] [blame] | 184 | ['rtc_relative_path==1', { |
| 185 | 'defines': ['EXPAT_RELATIVE_PATH',], |
| 186 | }], |
andrew@webrtc.org | de7c9e8 | 2013-12-09 16:23:00 +0000 | [diff] [blame] | 187 | ['enable_video==1', { |
| 188 | 'defines': ['WEBRTC_MODULE_UTILITY_VIDEO',], |
| 189 | }], |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 190 | ['build_with_chromium==1', { |
| 191 | 'defines': [ |
| 192 | # Changes settings for Chromium build. |
| 193 | 'WEBRTC_CHROMIUM_BUILD', |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 194 | 'LOGGING_INSIDE_WEBRTC', |
| 195 | ], |
| 196 | 'include_dirs': [ |
| 197 | # overrides must be included first as that is the mechanism for |
| 198 | # selecting the override headers in Chromium. |
| 199 | '../overrides', |
| 200 | # Allow includes to be prefixed with webrtc/ in case it is not an |
| 201 | # immediate subdirectory of <(DEPTH). |
| 202 | '../..', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 203 | ], |
| 204 | }, { |
| 205 | 'conditions': [ |
| 206 | ['os_posix==1', { |
henrike@webrtc.org | 2fe5893 | 2014-10-06 22:04:11 +0000 | [diff] [blame] | 207 | 'configurations': { |
| 208 | 'Debug_Base': { |
| 209 | 'defines': [ |
| 210 | # Chromium's build/common.gypi defines this for all posix |
| 211 | # _except_ for ios & mac. We want it there as well, e.g. |
| 212 | # because ASSERT and friends trigger off of it. |
| 213 | '_DEBUG', |
| 214 | ], |
| 215 | }, |
| 216 | }, |
solenberg@webrtc.org | c6db88b | 2014-06-04 17:15:42 +0000 | [diff] [blame] | 217 | 'conditions': [ |
| 218 | # -Wextra is currently disabled in Chromium's common.gypi. Enable |
| 219 | # for targets that can handle it. For Android/arm64 right now |
| 220 | # there will be an 'enumeral and non-enumeral type in conditional |
| 221 | # expression' warning in android_tools/ndk_experimental's version |
| 222 | # of stlport. |
| 223 | # See: https://code.google.com/p/chromium/issues/detail?id=379699 |
| 224 | ['target_arch!="arm64" or OS!="android"', { |
| 225 | 'cflags': [ |
| 226 | '-Wextra', |
| 227 | # We need to repeat some flags from Chromium's common.gypi |
| 228 | # here that get overridden by -Wextra. |
| 229 | '-Wno-unused-parameter', |
| 230 | '-Wno-missing-field-initializers', |
| 231 | '-Wno-strict-overflow', |
| 232 | ], |
| 233 | }], |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 234 | ], |
| 235 | 'cflags_cc': [ |
pbos@webrtc.org | b3cc78d | 2013-11-21 11:42:02 +0000 | [diff] [blame] | 236 | '-Wnon-virtual-dtor', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 237 | # This is enabled for clang; enable for gcc as well. |
| 238 | '-Woverloaded-virtual', |
| 239 | ], |
| 240 | }], |
andresp@webrtc.org | 7fb75ec | 2013-12-20 20:20:50 +0000 | [diff] [blame] | 241 | ['clang==1', { |
| 242 | 'cflags': [ |
| 243 | '-Wthread-safety', |
| 244 | ], |
| 245 | }], |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 246 | ], |
| 247 | }], |
fischman@webrtc.org | 31b4a5a | 2013-09-05 16:46:36 +0000 | [diff] [blame] | 248 | ['target_arch=="arm" or target_arch=="armv7"', { |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 249 | 'defines': [ |
| 250 | 'WEBRTC_ARCH_ARM', |
| 251 | ], |
| 252 | 'conditions': [ |
kjellander@webrtc.org | 917306d | 2013-12-10 09:26:07 +0000 | [diff] [blame] | 253 | ['arm_version==7', { |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 254 | 'defines': ['WEBRTC_ARCH_ARM_V7',], |
| 255 | 'conditions': [ |
| 256 | ['arm_neon==1', { |
| 257 | 'defines': ['WEBRTC_ARCH_ARM_NEON',], |
| 258 | }, { |
| 259 | 'defines': ['WEBRTC_DETECT_ARM_NEON',], |
| 260 | }], |
| 261 | ], |
| 262 | }], |
| 263 | ], |
| 264 | }], |
andrew@webrtc.org | 5140e24 | 2013-02-21 20:12:21 +0000 | [diff] [blame] | 265 | ['target_arch=="mipsel"', { |
| 266 | 'defines': [ |
| 267 | 'MIPS32_LE', |
| 268 | ], |
| 269 | 'conditions': [ |
| 270 | ['mips_fpu==1', { |
| 271 | 'defines': [ |
| 272 | 'MIPS_FPU_LE', |
| 273 | ], |
| 274 | 'cflags': [ |
| 275 | '-mhard-float', |
| 276 | ], |
| 277 | }, { |
| 278 | 'cflags': [ |
| 279 | '-msoft-float', |
| 280 | ], |
| 281 | }], |
andrew@webrtc.org | d05756f | 2014-09-30 15:53:24 +0000 | [diff] [blame] | 282 | ['mips_arch_variant=="r2"', { |
andrew@webrtc.org | 5140e24 | 2013-02-21 20:12:21 +0000 | [diff] [blame] | 283 | 'defines': [ |
| 284 | 'MIPS32_R2_LE', |
| 285 | ], |
| 286 | 'cflags': [ |
| 287 | '-mips32r2', |
| 288 | ], |
| 289 | 'cflags_cc': [ |
| 290 | '-mips32r2', |
| 291 | ], |
| 292 | }], |
| 293 | ['mips_dsp_rev==1', { |
| 294 | 'defines': [ |
| 295 | 'MIPS_DSP_R1_LE', |
| 296 | ], |
| 297 | 'cflags': [ |
| 298 | '-mdsp', |
| 299 | ], |
| 300 | 'cflags_cc': [ |
| 301 | '-mdsp', |
| 302 | ], |
| 303 | }], |
| 304 | ['mips_dsp_rev==2', { |
| 305 | 'defines': [ |
| 306 | 'MIPS_DSP_R1_LE', |
| 307 | 'MIPS_DSP_R2_LE', |
| 308 | ], |
| 309 | 'cflags': [ |
| 310 | '-mdspr2', |
| 311 | ], |
| 312 | 'cflags_cc': [ |
| 313 | '-mdspr2', |
| 314 | ], |
| 315 | }], |
| 316 | ], |
| 317 | }], |
kjellander@webrtc.org | 0aa04f9 | 2014-03-28 13:14:00 +0000 | [diff] [blame] | 318 | ['coverage==1 and OS=="linux"', { |
| 319 | 'cflags': [ '-ftest-coverage', |
| 320 | '-fprofile-arcs' ], |
| 321 | 'link_settings': { 'libraries': [ '-lgcov' ] }, |
| 322 | }], |
henrike@webrtc.org | cc08e3f | 2014-03-07 15:30:21 +0000 | [diff] [blame] | 323 | ['os_posix==1', { |
| 324 | # For access to standard POSIXish features, use WEBRTC_POSIX instead of |
| 325 | # a more specific macro. |
| 326 | 'defines': [ |
| 327 | 'WEBRTC_POSIX', |
| 328 | ], |
| 329 | }], |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 330 | ['OS=="ios"', { |
| 331 | 'defines': [ |
| 332 | 'WEBRTC_MAC', |
| 333 | 'WEBRTC_IOS', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 334 | ], |
| 335 | }], |
| 336 | ['OS=="linux"', { |
| 337 | 'defines': [ |
| 338 | 'WEBRTC_LINUX', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 339 | ], |
| 340 | }], |
| 341 | ['OS=="mac"', { |
| 342 | 'defines': [ |
| 343 | 'WEBRTC_MAC', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 344 | ], |
| 345 | }], |
| 346 | ['OS=="win"', { |
| 347 | 'defines': [ |
| 348 | 'WEBRTC_WIN', |
| 349 | ], |
| 350 | # TODO(andrew): enable all warnings when possible. |
kjellander@webrtc.org | fa53d87 | 2013-02-04 10:07:17 +0000 | [diff] [blame] | 351 | # TODO(phoglund): get rid of 4373 supression when |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 352 | # http://code.google.com/p/webrtc/issues/detail?id=261 is solved. |
kjellander@webrtc.org | fa53d87 | 2013-02-04 10:07:17 +0000 | [diff] [blame] | 353 | 'msvs_disabled_warnings': [ |
| 354 | 4373, # legacy warning for ignoring const / volatile in signatures. |
| 355 | 4389, # Signed/unsigned mismatch. |
| 356 | ], |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 357 | # Re-enable some warnings that Chromium disables. |
| 358 | 'msvs_disabled_warnings!': [4189,], |
| 359 | }], |
| 360 | ['OS=="android"', { |
| 361 | 'defines': [ |
| 362 | 'WEBRTC_LINUX', |
| 363 | 'WEBRTC_ANDROID', |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 364 | ], |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 365 | 'conditions': [ |
| 366 | ['enable_android_opensl==1', { |
| 367 | 'defines': [ |
| 368 | 'WEBRTC_ANDROID_OPENSLES', |
| 369 | ], |
| 370 | }], |
wjia@webrtc.org | b119369 | 2013-01-12 01:52:07 +0000 | [diff] [blame] | 371 | ['clang!=1', { |
| 372 | # The Android NDK doesn't provide optimized versions of these |
| 373 | # functions. Ensure they are disabled for all compilers. |
| 374 | 'cflags': [ |
| 375 | '-fno-builtin-cos', |
| 376 | '-fno-builtin-sin', |
| 377 | '-fno-builtin-cosf', |
| 378 | '-fno-builtin-sinf', |
| 379 | ], |
| 380 | }], |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 381 | ], |
| 382 | }], |
| 383 | ], # conditions |
sergeyu@chromium.org | 6ebfd34 | 2013-05-22 18:22:21 +0000 | [diff] [blame] | 384 | 'direct_dependent_settings': { |
sergeyu@chromium.org | 6ebfd34 | 2013-05-22 18:22:21 +0000 | [diff] [blame] | 385 | 'conditions': [ |
| 386 | ['build_with_mozilla==1', { |
| 387 | 'defines': [ |
| 388 | # Changes settings for Mozilla build. |
| 389 | 'WEBRTC_MOZILLA_BUILD', |
| 390 | ], |
| 391 | }], |
| 392 | ['build_with_chromium==1', { |
| 393 | 'defines': [ |
| 394 | # Changes settings for Chromium build. |
| 395 | 'WEBRTC_CHROMIUM_BUILD', |
| 396 | ], |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 397 | 'include_dirs': [ |
| 398 | # overrides must be included first as that is the mechanism for |
| 399 | # selecting the override headers in Chromium. |
| 400 | '../overrides', |
| 401 | '../..', |
| 402 | ], |
| 403 | }, { |
| 404 | 'include_dirs': [ |
| 405 | '../..', |
| 406 | ], |
sergeyu@chromium.org | 6ebfd34 | 2013-05-22 18:22:21 +0000 | [diff] [blame] | 407 | }], |
| 408 | ['OS=="mac"', { |
| 409 | 'defines': [ |
| 410 | 'WEBRTC_MAC', |
| 411 | ], |
| 412 | }], |
| 413 | ['OS=="ios"', { |
| 414 | 'defines': [ |
| 415 | 'WEBRTC_MAC', |
| 416 | 'WEBRTC_IOS', |
| 417 | ], |
| 418 | }], |
| 419 | ['OS=="win"', { |
| 420 | 'defines': [ |
| 421 | 'WEBRTC_WIN', |
| 422 | ], |
| 423 | }], |
| 424 | ['OS=="linux"', { |
| 425 | 'defines': [ |
| 426 | 'WEBRTC_LINUX', |
| 427 | ], |
| 428 | }], |
| 429 | ['OS=="android"', { |
| 430 | 'defines': [ |
| 431 | 'WEBRTC_LINUX', |
| 432 | 'WEBRTC_ANDROID', |
| 433 | ], |
| 434 | 'conditions': [ |
| 435 | ['enable_android_opensl==1', { |
| 436 | 'defines': [ |
| 437 | 'WEBRTC_ANDROID_OPENSLES', |
| 438 | ], |
| 439 | }] |
| 440 | ], |
| 441 | }], |
henrike@webrtc.org | f048872 | 2014-05-13 18:00:26 +0000 | [diff] [blame] | 442 | ['os_posix==1', { |
| 443 | # For access to standard POSIXish features, use WEBRTC_POSIX instead |
| 444 | # of a more specific macro. |
| 445 | 'defines': [ |
| 446 | 'WEBRTC_POSIX', |
| 447 | ], |
| 448 | }], |
sergeyu@chromium.org | 6ebfd34 | 2013-05-22 18:22:21 +0000 | [diff] [blame] | 449 | ], |
| 450 | }, |
andrew@webrtc.org | 14b43be | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 451 | }, # target_defaults |
| 452 | } |
| 453 | |