Thu, 15 Jan 2015 15:59:08 +0100
Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
michael@0 | 2 | # Use of this source code is governed by a BSD-style license that can be |
michael@0 | 3 | # found in the LICENSE file. |
michael@0 | 4 | |
michael@0 | 5 | { |
michael@0 | 6 | 'targets': [ |
michael@0 | 7 | { |
michael@0 | 8 | 'target_name': 'gtest', |
michael@0 | 9 | 'type': 'static_library', |
michael@0 | 10 | 'sources': [ |
michael@0 | 11 | 'gtest/include/gtest/gtest-death-test.h', |
michael@0 | 12 | 'gtest/include/gtest/gtest-message.h', |
michael@0 | 13 | 'gtest/include/gtest/gtest-param-test.h', |
michael@0 | 14 | 'gtest/include/gtest/gtest-printers.h', |
michael@0 | 15 | 'gtest/include/gtest/gtest-spi.h', |
michael@0 | 16 | 'gtest/include/gtest/gtest-test-part.h', |
michael@0 | 17 | 'gtest/include/gtest/gtest-typed-test.h', |
michael@0 | 18 | 'gtest/include/gtest/gtest.h', |
michael@0 | 19 | 'gtest/include/gtest/gtest_pred_impl.h', |
michael@0 | 20 | 'gtest/include/gtest/internal/gtest-death-test-internal.h', |
michael@0 | 21 | 'gtest/include/gtest/internal/gtest-filepath.h', |
michael@0 | 22 | 'gtest/include/gtest/internal/gtest-internal.h', |
michael@0 | 23 | 'gtest/include/gtest/internal/gtest-linked_ptr.h', |
michael@0 | 24 | 'gtest/include/gtest/internal/gtest-param-util-generated.h', |
michael@0 | 25 | 'gtest/include/gtest/internal/gtest-param-util.h', |
michael@0 | 26 | 'gtest/include/gtest/internal/gtest-port.h', |
michael@0 | 27 | 'gtest/include/gtest/internal/gtest-string.h', |
michael@0 | 28 | 'gtest/include/gtest/internal/gtest-tuple.h', |
michael@0 | 29 | 'gtest/include/gtest/internal/gtest-type-util.h', |
michael@0 | 30 | 'gtest/src/gtest-all.cc', |
michael@0 | 31 | 'gtest/src/gtest-death-test.cc', |
michael@0 | 32 | 'gtest/src/gtest-filepath.cc', |
michael@0 | 33 | 'gtest/src/gtest-internal-inl.h', |
michael@0 | 34 | 'gtest/src/gtest-port.cc', |
michael@0 | 35 | 'gtest/src/gtest-printers.cc', |
michael@0 | 36 | 'gtest/src/gtest-test-part.cc', |
michael@0 | 37 | 'gtest/src/gtest-typed-test.cc', |
michael@0 | 38 | 'gtest/src/gtest.cc', |
michael@0 | 39 | 'multiprocess_func_list.cc', |
michael@0 | 40 | 'multiprocess_func_list.h', |
michael@0 | 41 | 'platform_test.h', |
michael@0 | 42 | ], |
michael@0 | 43 | 'sources!': [ |
michael@0 | 44 | 'gtest/src/gtest-all.cc', # Not needed by our build. |
michael@0 | 45 | ], |
michael@0 | 46 | 'include_dirs': [ |
michael@0 | 47 | 'gtest', |
michael@0 | 48 | 'gtest/include', |
michael@0 | 49 | ], |
michael@0 | 50 | 'dependencies': [ |
michael@0 | 51 | 'gtest_prod', |
michael@0 | 52 | ], |
michael@0 | 53 | 'conditions': [ |
michael@0 | 54 | ['OS == "mac"', { |
michael@0 | 55 | 'sources': [ |
michael@0 | 56 | 'gtest_mac.h', |
michael@0 | 57 | 'gtest_mac.mm', |
michael@0 | 58 | 'platform_test_mac.mm' |
michael@0 | 59 | ], |
michael@0 | 60 | 'link_settings': { |
michael@0 | 61 | 'libraries': [ |
michael@0 | 62 | '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', |
michael@0 | 63 | ], |
michael@0 | 64 | }, |
michael@0 | 65 | 'conditions': [ |
michael@0 | 66 | ['build_with_mozilla==1', { |
michael@0 | 67 | 'defines': [ |
michael@0 | 68 | 'GTEST_USE_OWN_TR1_TUPLE=1', |
michael@0 | 69 | ], |
michael@0 | 70 | 'direct_dependent_settings': { |
michael@0 | 71 | 'defines': [ |
michael@0 | 72 | 'GTEST_USE_OWN_TR1_TUPLE=1', |
michael@0 | 73 | ], |
michael@0 | 74 | }, |
michael@0 | 75 | }], |
michael@0 | 76 | ], |
michael@0 | 77 | }], |
michael@0 | 78 | ['OS == "win"', { |
michael@0 | 79 | 'defines': [ |
michael@0 | 80 | '_VARIADIC_MAX=10', |
michael@0 | 81 | ], |
michael@0 | 82 | 'direct_dependent_settings': { |
michael@0 | 83 | 'defines': [ |
michael@0 | 84 | '_VARIADIC_MAX=10', |
michael@0 | 85 | ], |
michael@0 | 86 | }, |
michael@0 | 87 | }], |
michael@0 | 88 | ['os_posix == 1', { |
michael@0 | 89 | 'defines': [ |
michael@0 | 90 | # gtest isn't able to figure out when RTTI is disabled for gcc |
michael@0 | 91 | # versions older than 4.3.2, and assumes it's enabled. Our Mac |
michael@0 | 92 | # and Linux builds disable RTTI, and cannot guarantee that the |
michael@0 | 93 | # compiler will be 4.3.2. or newer. The Mac, for example, uses |
michael@0 | 94 | # 4.2.1 as that is the latest available on that platform. gtest |
michael@0 | 95 | # must be instructed that RTTI is disabled here, and for any |
michael@0 | 96 | # direct dependents that might include gtest headers. |
michael@0 | 97 | 'GTEST_HAS_RTTI=0', |
michael@0 | 98 | ], |
michael@0 | 99 | 'direct_dependent_settings': { |
michael@0 | 100 | 'defines': [ |
michael@0 | 101 | 'GTEST_HAS_RTTI=0', |
michael@0 | 102 | ], |
michael@0 | 103 | }, |
michael@0 | 104 | }], |
michael@0 | 105 | ['clang==1 or OS=="android"', { |
michael@0 | 106 | # We want gtest features that use tr1::tuple, but we currently |
michael@0 | 107 | # don't support the variadic templates used by libstdc++'s |
michael@0 | 108 | # implementation. gtest supports this scenario by providing its |
michael@0 | 109 | # own implementation but we must opt in to it. |
michael@0 | 110 | 'defines': [ |
michael@0 | 111 | 'GTEST_USE_OWN_TR1_TUPLE=1', |
michael@0 | 112 | ], |
michael@0 | 113 | 'direct_dependent_settings': { |
michael@0 | 114 | 'defines': [ |
michael@0 | 115 | 'GTEST_USE_OWN_TR1_TUPLE=1', |
michael@0 | 116 | ], |
michael@0 | 117 | }, |
michael@0 | 118 | }], |
michael@0 | 119 | ], |
michael@0 | 120 | 'direct_dependent_settings': { |
michael@0 | 121 | 'defines': [ |
michael@0 | 122 | 'UNIT_TEST', |
michael@0 | 123 | ], |
michael@0 | 124 | 'include_dirs': [ |
michael@0 | 125 | 'gtest/include', # So that gtest headers can find themselves. |
michael@0 | 126 | ], |
michael@0 | 127 | 'target_conditions': [ |
michael@0 | 128 | ['_type=="executable"', { |
michael@0 | 129 | 'test': 1, |
michael@0 | 130 | 'conditions': [ |
michael@0 | 131 | ['OS=="mac"', { |
michael@0 | 132 | 'run_as': { |
michael@0 | 133 | 'action????': ['${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}'], |
michael@0 | 134 | }, |
michael@0 | 135 | }], |
michael@0 | 136 | ['OS=="win"', { |
michael@0 | 137 | 'run_as': { |
michael@0 | 138 | 'action????': ['$(TargetPath)', '--gtest_print_time'], |
michael@0 | 139 | }, |
michael@0 | 140 | }], |
michael@0 | 141 | ], |
michael@0 | 142 | }], |
michael@0 | 143 | ], |
michael@0 | 144 | 'msvs_disabled_warnings': [4800], |
michael@0 | 145 | }, |
michael@0 | 146 | }, |
michael@0 | 147 | { |
michael@0 | 148 | 'target_name': 'gtest_main', |
michael@0 | 149 | 'type': 'static_library', |
michael@0 | 150 | 'dependencies': [ |
michael@0 | 151 | 'gtest', |
michael@0 | 152 | ], |
michael@0 | 153 | 'sources': [ |
michael@0 | 154 | 'gtest/src/gtest_main.cc', |
michael@0 | 155 | ], |
michael@0 | 156 | }, |
michael@0 | 157 | { |
michael@0 | 158 | 'target_name': 'gtest_prod', |
michael@0 | 159 | 'toolsets': ['host', 'target'], |
michael@0 | 160 | 'type': 'none', |
michael@0 | 161 | 'sources': [ |
michael@0 | 162 | 'gtest/include/gtest/gtest_prod.h', |
michael@0 | 163 | ], |
michael@0 | 164 | }, |
michael@0 | 165 | ], |
michael@0 | 166 | } |