henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 1 | # |
| 2 | # libjingle |
jlmiller@webrtc.org | 5f93d0a | 2015-01-20 21:36:13 +0000 | [diff] [blame] | 3 | # Copyright 2012 Google Inc. |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 4 | # |
fischman@webrtc.org | e3de6b1 | 2013-08-26 19:31:21 +0000 | [diff] [blame] | 5 | # Redistribution and use in source and binary forms, with or without |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 6 | # modification, are permitted provided that the following conditions are met: |
| 7 | # |
fischman@webrtc.org | e3de6b1 | 2013-08-26 19:31:21 +0000 | [diff] [blame] | 8 | # 1. Redistributions of source code must retain the above copyright notice, |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 9 | # this list of conditions and the following disclaimer. |
| 10 | # 2. Redistributions in binary form must reproduce the above copyright notice, |
| 11 | # this list of conditions and the following disclaimer in the documentation |
| 12 | # and/or other materials provided with the distribution. |
fischman@webrtc.org | e3de6b1 | 2013-08-26 19:31:21 +0000 | [diff] [blame] | 13 | # 3. The name of the author may not be used to endorse or promote products |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 14 | # derived from this software without specific prior written permission. |
| 15 | # |
| 16 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED |
fischman@webrtc.org | e3de6b1 | 2013-08-26 19:31:21 +0000 | [diff] [blame] | 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 18 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO |
fischman@webrtc.org | e3de6b1 | 2013-08-26 19:31:21 +0000 | [diff] [blame] | 19 | # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 20 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 21 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
| 22 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
fischman@webrtc.org | e3de6b1 | 2013-08-26 19:31:21 +0000 | [diff] [blame] | 23 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
| 24 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 25 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 | # |
| 27 | |
| 28 | # This file contains common settings for building libjingle components. |
| 29 | |
| 30 | { |
| 31 | 'variables': { |
fischman@webrtc.org | dd14b2a | 2013-08-12 18:06:29 +0000 | [diff] [blame] | 32 | 'webrtc_root%': '<(DEPTH)/webrtc', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 33 | # TODO(ronghuawu): For now, disable the Chrome plugins, which causes a |
| 34 | # flood of chromium-style warnings. |
| 35 | 'clang_use_chrome_plugins%': 0, |
Henrik Kjellander | e6cefb6 | 2015-04-27 14:39:04 +0200 | [diff] [blame] | 36 | # Disable these to not build components which can be externally provided. |
Henrik Kjellander | e6cefb6 | 2015-04-27 14:39:04 +0200 | [diff] [blame] | 37 | 'build_json%': 1, |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 38 | }, |
| 39 | 'target_defaults': { |
| 40 | 'include_dirs': [ |
kjellander@webrtc.org | cf85f1c | 2014-03-05 00:40:33 +0000 | [diff] [blame] | 41 | '<(DEPTH)', |
kjellander@webrtc.org | e41ec81 | 2015-03-06 08:03:16 +0000 | [diff] [blame] | 42 | '../..', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 43 | '../../third_party', |
| 44 | '../../third_party/webrtc', |
henrike@webrtc.org | 9de257d | 2013-07-17 14:42:53 +0000 | [diff] [blame] | 45 | '../../webrtc', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 46 | ], |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 47 | 'conditions': [ |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 48 | ['OS=="linux"', { |
| 49 | 'defines': [ |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 50 | 'WEBRTC_LINUX', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 51 | ], |
Henrik Kjellander | 4cd6940 | 2015-05-15 09:10:30 +0200 | [diff] [blame] | 52 | # Remove Chromium's disabling of the -Wformat warning. |
| 53 | 'cflags!': [ |
| 54 | '-Wno-format', |
| 55 | ], |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 56 | 'conditions': [ |
| 57 | ['clang==1', { |
| 58 | 'cflags': [ |
pbos@webrtc.org | 174a674 | 2014-06-02 07:58:30 +0000 | [diff] [blame] | 59 | '-Wall', |
| 60 | '-Wextra', |
Henrik Kjellander | 4cd6940 | 2015-05-15 09:10:30 +0200 | [diff] [blame] | 61 | '-Wformat', |
| 62 | '-Wformat-security', |
Henrik Kjellander | 7c027b6 | 2015-04-22 13:21:30 +0200 | [diff] [blame] | 63 | '-Wimplicit-fallthrough', |
| 64 | '-Wmissing-braces', |
| 65 | '-Wreorder', |
pbos@webrtc.org | 174a674 | 2014-06-02 07:58:30 +0000 | [diff] [blame] | 66 | '-Wunused-variable', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 67 | # TODO(ronghuawu): Fix the warning caused by |
| 68 | # LateBindingSymbolTable::TableInfo from |
| 69 | # latebindingsymboltable.cc.def and remove below flag. |
| 70 | '-Wno-address-of-array-temporary', |
pbos@webrtc.org | d60d79a | 2014-09-24 07:10:57 +0000 | [diff] [blame] | 71 | '-Wthread-safety', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 72 | ], |
Henrik Kjellander | 24d4485 | 2015-04-23 14:51:18 +0200 | [diff] [blame] | 73 | 'cflags_cc': [ |
| 74 | '-Wunused-private-field', |
| 75 | ], |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 76 | }], |
| 77 | ], |
| 78 | }], |
| 79 | ['OS=="mac"', { |
| 80 | 'defines': [ |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 81 | 'WEBRTC_MAC', |
| 82 | ], |
| 83 | }], |
| 84 | ['OS=="win"', { |
| 85 | 'defines': [ |
| 86 | 'WEBRTC_WIN', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 87 | ], |
fbarchard@google.com | 48305f5 | 2014-07-30 00:16:20 +0000 | [diff] [blame] | 88 | 'msvs_disabled_warnings': [ |
| 89 | # https://code.google.com/p/chromium/issues/detail?id=372451#c20 |
| 90 | # Warning 4702 ("Unreachable code") should be re-enabled once |
| 91 | # users are updated to VS2013 Update 2. |
| 92 | 4702, |
| 93 | ], |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 94 | }], |
| 95 | ['OS=="ios"', { |
| 96 | 'defines': [ |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 97 | 'WEBRTC_MAC', |
| 98 | 'WEBRTC_IOS', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 99 | ], |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 100 | }], |
fischman@webrtc.org | e3de6b1 | 2013-08-26 19:31:21 +0000 | [diff] [blame] | 101 | ['OS=="ios" or (OS=="mac" and target_arch!="ia32")', { |
henrike@webrtc.org | 723d683 | 2013-07-12 16:04:50 +0000 | [diff] [blame] | 102 | 'defines': [ |
| 103 | 'CARBON_DEPRECATED=YES', |
| 104 | ], |
| 105 | }], |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 106 | ['os_posix==1', { |
fischman@webrtc.org | b25576a | 2014-03-26 21:53:47 +0000 | [diff] [blame] | 107 | 'configurations': { |
| 108 | 'Debug_Base': { |
| 109 | 'defines': [ |
| 110 | # Chromium's build/common.gypi defines this for all posix _except_ |
| 111 | # for ios & mac. We want it there as well, e.g. because ASSERT |
| 112 | # and friends trigger off of it. |
| 113 | '_DEBUG', |
| 114 | ], |
| 115 | }, |
| 116 | }, |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 117 | 'defines': [ |
| 118 | 'HASH_NAMESPACE=__gnu_cxx', |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 119 | 'WEBRTC_POSIX', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 120 | 'DISABLE_DYNAMIC_CAST', |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 121 | # The POSIX standard says we have to define this. |
| 122 | '_REENTRANT', |
| 123 | ], |
| 124 | }], |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 125 | ], |
| 126 | }, # target_defaults |
| 127 | } |