OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 assert(!is_ios) | 5 assert(!is_ios) |
6 | 6 |
7 import("//testing/test.gni") | 7 import("//testing/test.gni") |
8 import("//third_party/WebKit/Source/config.gni") | 8 import("//third_party/WebKit/Source/config.gni") |
9 | 9 |
10 # The list of files is kept in the .gypi. | |
11 gypi_values = exec_script("//build/gypi_to_gn.py", | |
12 [ rebase_path("wtf.gypi") ], | |
13 "scope", | |
14 [ "wtf.gypi" ]) | |
15 | |
16 visibility = [ | 10 visibility = [ |
17 "//mojo/public/cpp/bindings/*", | 11 "//mojo/public/cpp/bindings/*", |
18 "//third_party/WebKit/*", | 12 "//third_party/WebKit/*", |
19 ] | 13 ] |
20 | 14 |
21 config("wtf_config") { | 15 config("wtf_config") { |
22 if (is_win) { | 16 if (is_win) { |
23 defines = [ | 17 defines = [ |
24 "__STD_C", | 18 "__STD_C", |
25 "_CRT_SECURE_NO_DEPRECATE", | 19 "_CRT_SECURE_NO_DEPRECATE", |
(...skipping 14 matching lines...) Expand all Loading... |
40 # Chromium windows multi-dll build enables C++ exceptions and this causes | 34 # Chromium windows multi-dll build enables C++ exceptions and this causes |
41 # wtf to generate 4291 warning due to operator new/delete | 35 # wtf to generate 4291 warning due to operator new/delete |
42 # implementations. Disable the warning for chromium windows multi-dll | 36 # implementations. Disable the warning for chromium windows multi-dll |
43 # build. | 37 # build. |
44 cflags += [ "/wd4291" ] | 38 cflags += [ "/wd4291" ] |
45 } | 39 } |
46 } | 40 } |
47 } | 41 } |
48 | 42 |
49 component("wtf") { | 43 component("wtf") { |
50 sources = gypi_values.wtf_files | 44 sources = [ |
| 45 "ASCIICType.cpp", |
| 46 "ASCIICType.h", |
| 47 "AddressSanitizer.h", |
| 48 "Alignment.h", |
| 49 "Allocator.h", |
| 50 "Assertions.cpp", |
| 51 "Assertions.h", |
| 52 "Atomics.h", |
| 53 "AutoReset.h", |
| 54 "BitVector.cpp", |
| 55 "BitVector.h", |
| 56 "BitwiseOperations.h", |
| 57 "BloomFilter.h", |
| 58 "ByteOrder.h", |
| 59 "ByteSwap.h", |
| 60 "CPU.h", |
| 61 "CheckedNumeric.h", |
| 62 "Compiler.h", |
| 63 "ConditionalDestructor.h", |
| 64 "ContainerAnnotations.h", |
| 65 "CryptographicallyRandomNumber.cpp", |
| 66 "CryptographicallyRandomNumber.h", |
| 67 "CurrentTime.cpp", |
| 68 "CurrentTime.h", |
| 69 "DataLog.cpp", |
| 70 "DataLog.h", |
| 71 "DateMath.cpp", |
| 72 "DateMath.h", |
| 73 "Deque.h", |
| 74 "DoublyLinkedList.h", |
| 75 "DynamicAnnotations.cpp", |
| 76 "DynamicAnnotations.h", |
| 77 "FilePrintStream.cpp", |
| 78 "FilePrintStream.h", |
| 79 "Forward.h", |
| 80 "Functional.h", |
| 81 "GetPtr.h", |
| 82 "HashCountedSet.h", |
| 83 "HashFunctions.h", |
| 84 "HashIterators.h", |
| 85 "HashMap.h", |
| 86 "HashSet.h", |
| 87 "HashTable.cpp", |
| 88 "HashTable.h", |
| 89 "HashTableDeletedValueType.h", |
| 90 "HashTraits.h", |
| 91 "HexNumber.h", |
| 92 "InstanceCounter.cpp", |
| 93 "InstanceCounter.h", |
| 94 "LeakAnnotations.h", |
| 95 "LinkedStack.h", |
| 96 "ListHashSet.h", |
| 97 "Locker.h", |
| 98 "MakeCancellable.cpp", |
| 99 "MakeCancellable.h", |
| 100 "MathExtras.h", |
| 101 "NonCopyingSort.h", |
| 102 "Noncopyable.h", |
| 103 "NotFound.h", |
| 104 "Optional.h", |
| 105 "PassRefPtr.h", |
| 106 "PrintStream.cpp", |
| 107 "PrintStream.h", |
| 108 "PtrUtil.h", |
| 109 "RefCounted.h", |
| 110 "RefPtr.h", |
| 111 "RetainPtr.h", |
| 112 "SaturatedArithmetic.h", |
| 113 "SizeLimits.cpp", |
| 114 "SpinLock.cpp", |
| 115 "SpinLock.h", |
| 116 "StaticConstructors.h", |
| 117 "StdLibExtras.h", |
| 118 "StringExtras.h", |
| 119 "StringHasher.h", |
| 120 "ThreadRestrictionVerifier.h", |
| 121 "ThreadSafeRefCounted.h", |
| 122 "ThreadSpecific.h", |
| 123 "ThreadSpecificWin.cpp", |
| 124 "Threading.h", |
| 125 "ThreadingPrimitives.h", |
| 126 "ThreadingPthreads.cpp", |
| 127 "ThreadingWin.cpp", |
| 128 "TreeNode.h", |
| 129 "TypeTraits.h", |
| 130 "Vector.h", |
| 131 "VectorTraits.h", |
| 132 "WTF.cpp", |
| 133 "WTF.h", |
| 134 "WTFExport.h", |
| 135 "WTFThreadData.cpp", |
| 136 "WTFThreadData.h", |
| 137 "WeakPtr.h", |
| 138 "allocator/AddressSpaceRandomization.cpp", |
| 139 "allocator/AddressSpaceRandomization.h", |
| 140 "allocator/PageAllocator.cpp", |
| 141 "allocator/PageAllocator.h", |
| 142 "allocator/PartitionAlloc.cpp", |
| 143 "allocator/PartitionAlloc.h", |
| 144 "allocator/PartitionAllocator.cpp", |
| 145 "allocator/PartitionAllocator.h", |
| 146 "allocator/Partitions.cpp", |
| 147 "allocator/Partitions.h", |
| 148 "asm/SaturatedArithmeticARM.h", |
| 149 "build_config.h", |
| 150 "debug/Alias.h", |
| 151 "debug/CrashLogging.h", |
| 152 "dtoa.cpp", |
| 153 "dtoa.h", |
| 154 "dtoa/bignum-dtoa.cc", |
| 155 "dtoa/bignum-dtoa.h", |
| 156 "dtoa/bignum.cc", |
| 157 "dtoa/bignum.h", |
| 158 "dtoa/cached-powers.cc", |
| 159 "dtoa/cached-powers.h", |
| 160 "dtoa/diy-fp.cc", |
| 161 "dtoa/diy-fp.h", |
| 162 "dtoa/double-conversion.cc", |
| 163 "dtoa/double-conversion.h", |
| 164 "dtoa/double.h", |
| 165 "dtoa/fast-dtoa.cc", |
| 166 "dtoa/fast-dtoa.h", |
| 167 "dtoa/fixed-dtoa.cc", |
| 168 "dtoa/fixed-dtoa.h", |
| 169 "dtoa/strtod.cc", |
| 170 "dtoa/strtod.h", |
| 171 "dtoa/utils.h", |
| 172 "text/ASCIIFastPath.h", |
| 173 "text/AtomicString.cpp", |
| 174 "text/AtomicString.h", |
| 175 "text/AtomicStringCF.cpp", |
| 176 "text/AtomicStringHash.h", |
| 177 "text/AtomicStringTable.cpp", |
| 178 "text/AtomicStringTable.h", |
| 179 "text/Base64.cpp", |
| 180 "text/Base64.h", |
| 181 "text/CString.cpp", |
| 182 "text/CString.h", |
| 183 "text/CharacterNames.h", |
| 184 "text/Collator.h", |
| 185 "text/IntegerToStringConversion.h", |
| 186 "text/ParsingUtilities.h", |
| 187 "text/StringBuffer.h", |
| 188 "text/StringBuilder.cpp", |
| 189 "text/StringBuilder.h", |
| 190 "text/StringConcatenate.cpp", |
| 191 "text/StringConcatenate.h", |
| 192 "text/StringHash.h", |
| 193 "text/StringImpl.cpp", |
| 194 "text/StringImpl.h", |
| 195 "text/StringImplCF.cpp", |
| 196 "text/StringImplMac.mm", |
| 197 "text/StringMac.mm", |
| 198 "text/StringOperators.h", |
| 199 "text/StringStatics.cpp", |
| 200 "text/StringToNumber.cpp", |
| 201 "text/StringToNumber.h", |
| 202 "text/StringUTF8Adaptor.h", |
| 203 "text/StringView.cpp", |
| 204 "text/StringView.h", |
| 205 "text/TextCodec.cpp", |
| 206 "text/TextCodec.h", |
| 207 "text/TextCodecASCIIFastPath.h", |
| 208 "text/TextCodecICU.cpp", |
| 209 "text/TextCodecLatin1.cpp", |
| 210 "text/TextCodecReplacement.cpp", |
| 211 "text/TextCodecReplacement.h", |
| 212 "text/TextCodecUTF16.cpp", |
| 213 "text/TextCodecUTF8.cpp", |
| 214 "text/TextCodecUTF8.h", |
| 215 "text/TextCodecUserDefined.cpp", |
| 216 "text/TextEncoding.cpp", |
| 217 "text/TextEncodingRegistry.cpp", |
| 218 "text/TextPosition.cpp", |
| 219 "text/TextPosition.h", |
| 220 "text/UTF8.cpp", |
| 221 "text/UTF8.h", |
| 222 "text/Unicode.h", |
| 223 "text/WTFString.cpp", |
| 224 "text/WTFString.h", |
| 225 "text/icu/CollatorICU.cpp", |
| 226 "text/icu/UnicodeIcu.h", |
| 227 "typed_arrays/ArrayBuffer.cpp", |
| 228 "typed_arrays/ArrayBuffer.h", |
| 229 "typed_arrays/ArrayBufferBuilder.cpp", |
| 230 "typed_arrays/ArrayBufferBuilder.h", |
| 231 "typed_arrays/ArrayBufferContents.cpp", |
| 232 "typed_arrays/ArrayBufferContents.h", |
| 233 "typed_arrays/ArrayBufferView.cpp", |
| 234 "typed_arrays/ArrayBufferView.h", |
| 235 "typed_arrays/ArrayPiece.cpp", |
| 236 "typed_arrays/ArrayPiece.h", |
| 237 "typed_arrays/Float32Array.h", |
| 238 "typed_arrays/Float64Array.h", |
| 239 "typed_arrays/Int16Array.h", |
| 240 "typed_arrays/Int32Array.h", |
| 241 "typed_arrays/Int8Array.h", |
| 242 "typed_arrays/IntegralTypedArrayBase.h", |
| 243 "typed_arrays/TypedArrayBase.h", |
| 244 "typed_arrays/Uint16Array.h", |
| 245 "typed_arrays/Uint32Array.h", |
| 246 "typed_arrays/Uint8Array.h", |
| 247 ] |
51 | 248 |
52 configs += [ | 249 configs += [ |
53 "//third_party/WebKit/Source:config", | 250 "//third_party/WebKit/Source:config", |
54 "//third_party/WebKit/Source:non_test_config", | 251 "//third_party/WebKit/Source:non_test_config", |
55 ] | 252 ] |
56 | 253 |
57 defines = [ "WTF_IMPLEMENTATION=1" ] | 254 defines = [ "WTF_IMPLEMENTATION=1" ] |
58 | 255 |
59 public_configs = [ | 256 public_configs = [ |
60 ":wtf_config", | 257 ":wtf_config", |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 if (remove_webcore_debug_symbols) { | 300 if (remove_webcore_debug_symbols) { |
104 configs -= [ "//build/config/compiler:default_symbols" ] | 301 configs -= [ "//build/config/compiler:default_symbols" ] |
105 configs += [ "//build/config/compiler:no_symbols" ] | 302 configs += [ "//build/config/compiler:no_symbols" ] |
106 } | 303 } |
107 } | 304 } |
108 | 305 |
109 test("wtf_unittests") { | 306 test("wtf_unittests") { |
110 visibility = [] # Allow re-assignment of list. | 307 visibility = [] # Allow re-assignment of list. |
111 visibility = [ "*" ] | 308 visibility = [ "*" ] |
112 | 309 |
113 sources = gypi_values.wtf_unittest_files | 310 sources = [ |
114 | 311 "ASCIICTypeTest.cpp", |
115 sources += [ "testing/RunAllTests.cpp" ] | 312 "AssertionsTest.cpp", |
| 313 "DequeTest.cpp", |
| 314 "FunctionalTest.cpp", |
| 315 "HashMapTest.cpp", |
| 316 "HashSetTest.cpp", |
| 317 "ListHashSetTest.cpp", |
| 318 "MakeCancellableTest.cpp", |
| 319 "MathExtrasTest.cpp", |
| 320 "OptionalTest.cpp", |
| 321 "PassRefPtrTest.cpp", |
| 322 "RefPtrTest.cpp", |
| 323 "SaturatedArithmeticTest.cpp", |
| 324 "StringExtrasTest.cpp", |
| 325 "StringHasherTest.cpp", |
| 326 "TreeNodeTest.cpp", |
| 327 "TypeTraitsTest.cpp", |
| 328 "VectorTest.cpp", |
| 329 "allocator/PartitionAllocTest.cpp", |
| 330 "dtoa_test.cpp", |
| 331 "testing/RunAllTests.cpp", |
| 332 "text/AtomicStringTest.cpp", |
| 333 "text/CStringTest.cpp", |
| 334 "text/IntegerToStringConversionTest.cpp", |
| 335 "text/StringBufferTest.cpp", |
| 336 "text/StringBuilderTest.cpp", |
| 337 "text/StringImplTest.cpp", |
| 338 "text/StringOperatorsTest.cpp", |
| 339 "text/StringViewTest.cpp", |
| 340 "text/TextCodecReplacementTest.cpp", |
| 341 "text/TextCodecTest.cpp", |
| 342 "text/TextCodecUTF8Test.cpp", |
| 343 "text/WTFStringTest.cpp", |
| 344 "typed_arrays/ArrayBufferBuilderTest.cpp", |
| 345 ] |
116 | 346 |
117 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | 347 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
118 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | 348 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
119 | 349 |
120 if (is_win) { | 350 if (is_win) { |
121 cflags = [ "/wd4068" ] # Unknown pragma. | 351 cflags = [ "/wd4068" ] # Unknown pragma. |
122 } | 352 } |
123 | 353 |
124 configs += [ "//third_party/WebKit/Source:config" ] | 354 configs += [ "//third_party/WebKit/Source:config" ] |
125 | 355 |
126 deps = [ | 356 deps = [ |
127 ":wtf", | 357 ":wtf", |
128 "//base", | 358 "//base", |
129 "//base/test:test_support", | 359 "//base/test:test_support", |
130 "//testing/gmock", | 360 "//testing/gmock", |
131 "//testing/gtest", | 361 "//testing/gtest", |
132 ] | 362 ] |
133 } | 363 } |
OLD | NEW |