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