Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(426)

Side by Side Diff: third_party/WebKit/Source/platform/wtf/BUILD.gn

Issue 2774333002: Revert "Move files in wtf/ to platform/wtf/" (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2017 The Chromium Authors. All rights reserved. 1 # Copyright 2017 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 # The below is a temporary setup during the WTF migration project: 5 # The below is a temporary setup during the WTF migration project:
6 # https://groups.google.com/a/chromium.org/d/msg/blink-dev/tLdAZCTlcAA/bYXVT8gYC AAJ 6 # https://groups.google.com/a/chromium.org/d/msg/blink-dev/tLdAZCTlcAA/bYXVT8gYC AAJ
7 # 7 #
8 # We are moving wtf/ files to platform/wtf/ incrementally, thus, conceptually, 8 # We are moving wtf/ files to platform/wtf/ incrementally, thus, conceptually,
9 # the "wtf" target in wtf/BUILD.gn is being split into two, in a way that 9 # the "wtf" target in wtf/BUILD.gn is being split into two, in a way that
10 # only wtf/ can refer the contents in platform/wtf/. 10 # only wtf/ can refer the contents in platform/wtf/.
11 # 11 #
12 # To achieve this, we introduce a new target "platform_wtf" here, and configure 12 # To achieve this, we introduce a new target "platform_wtf" here, and configure
13 # it so the source files are compiled in the same way as the original "wtf" 13 # it so the source files are compiled in the same way as the original "wtf"
14 # target. This gn file should only be used from wtf/BUILD.gn, and this 14 # target. This gn file should only be used from wtf/BUILD.gn, and this
15 # restriction is enforced by the visibility rule below (but it's okay to 15 # restriction is enforced by the visibility rule below (but it's okay to
16 # #include a header in this directory from core/ or modules/). 16 # #include a header in this directory from core/ or modules/).
17 # 17 #
18 # The following configurations are mostly copied from wtf/BUILD.gn, so we 18 # The following configurations are mostly copied from wtf/BUILD.gn, so we
19 # can build the source files in the same way. 19 # can build the source files in the same way.
20 # 20 #
21 # When we finish moving all the files, "platform_wtf" target will take over 21 # When we finish moving all the files, "platform_wtf" target will take over
22 # the role of "wtf". 22 # the role of "wtf".
23 #
24 # TODO(yutak): Set up platform_wtf_unittests in the similar manner.
23 25
24 assert(!is_ios) 26 assert(!is_ios)
25 27
26 import("//testing/test.gni")
27 import("//third_party/WebKit/Source/config.gni") 28 import("//third_party/WebKit/Source/config.gni")
28 29
29 visibility = [ 30 visibility = [ "//third_party/WebKit/Source/wtf/*" ]
30 ":*",
31 "//third_party/WebKit/Source/wtf/*",
32 ]
33 31
34 config("wtf_config") { 32 config("wtf_config") {
35 if (is_win) { 33 if (is_win) {
36 defines = [ 34 defines = [
37 "__STD_C", 35 "__STD_C",
38 "_CRT_SECURE_NO_DEPRECATE", 36 "_CRT_SECURE_NO_DEPRECATE",
39 "_SCL_SECURE_NO_DEPRECATE", 37 "_SCL_SECURE_NO_DEPRECATE",
40 ] 38 ]
41 include_dirs = [ "os-win32" ] 39 include_dirs = [ "os-win32" ]
42 40
43 cflags = [ 41 cflags = [
44 # Don't complain about calling specific versions of templatized 42 # Don't complain about calling specific versions of templatized
45 # functions (e.g. in RefPtrHashMap.h). 43 # functions (e.g. in RefPtrHashMap.h).
46 "/wd4344", 44 "/wd4344",
47 45
48 # dtoa, icu, etc. like doing assignment within conditional. 46 # dtoa, icu, etc. like doing assignment within conditional.
49 "/wd4706", 47 "/wd4706",
50 ] 48 ]
51 49
52 if (is_component_build) { 50 if (is_component_build) {
53 # Chromium windows multi-dll build enables C++ exceptions and this causes 51 # Chromium windows multi-dll build enables C++ exceptions and this causes
54 # wtf to generate 4291 warning due to operator new/delete 52 # wtf to generate 4291 warning due to operator new/delete
55 # implementations. Disable the warning for chromium windows multi-dll 53 # implementations. Disable the warning for chromium windows multi-dll
56 # build. 54 # build.
57 cflags += [ "/wd4291" ] 55 cflags += [ "/wd4291" ]
58 } 56 }
59 } 57 }
60 } 58 }
61 59
62 component("platform_wtf") { 60 source_set("platform_wtf") {
63 sources = [ 61 sources = [
64 "ASCIICType.cpp", 62 "ASCIICType.cpp",
65 "ASCIICType.h", 63 "ASCIICType.h",
66 "AddressSanitizer.h", 64 "AddressSanitizer.h",
67 "Alignment.h", 65 "Alignment.h",
68 "Allocator.h", 66 "Allocator.h",
69 "Assertions.cpp", 67 "Assertions.cpp",
70 "Assertions.h", 68 "Assertions.h",
71 "Atomics.h", 69 "Atomics.h",
72 "AutoReset.h", 70 "AutoReset.h",
73 "BitVector.cpp", 71 "BitVector.cpp",
74 "BitVector.h", 72 "BitVector.h",
75 "BitwiseOperations.h", 73 "BitwiseOperations.h",
76 "BloomFilter.h",
77 "ByteOrder.h",
78 "ByteSwap.h", 74 "ByteSwap.h",
79 "CPU.h", 75 "CPU.h",
80 "CheckedNumeric.h", 76 "CheckedNumeric.h",
81 "Compiler.h", 77 "Compiler.h",
82 "ConditionalDestructor.h", 78 "ConditionalDestructor.h",
83 "ContainerAnnotations.h", 79 "ContainerAnnotations.h",
84 "CryptographicallyRandomNumber.cpp", 80 "CryptographicallyRandomNumber.cpp",
85 "CryptographicallyRandomNumber.h", 81 "CryptographicallyRandomNumber.h",
86 "CurrentTime.cpp", 82 "CurrentTime.cpp",
87 "CurrentTime.h", 83 "CurrentTime.h",
88 "DataLog.cpp", 84 "DataLog.cpp",
89 "DataLog.h", 85 "DataLog.h",
90 "DateMath.cpp",
91 "DateMath.h",
92 "Deque.h", 86 "Deque.h",
93 "DoublyLinkedList.h", 87 "DoublyLinkedList.h",
94 "DynamicAnnotations.cpp", 88 "DynamicAnnotations.cpp",
95 "DynamicAnnotations.h", 89 "DynamicAnnotations.h",
96 "FilePrintStream.cpp",
97 "FilePrintStream.h", 90 "FilePrintStream.h",
98 "Forward.h", 91 "Forward.h",
99 "Functional.h", 92 "Functional.h",
100 "GetPtr.h", 93 "GetPtr.h",
101 "HashCountedSet.h", 94 "HashCountedSet.h",
102 "HashFunctions.h", 95 "HashFunctions.h",
103 "HashIterators.h", 96 "HashIterators.h",
104 "HashMap.h", 97 "HashMap.h",
105 "HashSet.h", 98 "HashSet.h",
106 "HashTable.cpp", 99 "HashTable.cpp",
107 "HashTable.h", 100 "HashTable.h",
108 "HashTableDeletedValueType.h", 101 "HashTableDeletedValueType.h",
109 "HashTraits.h", 102 "HashTraits.h",
110 "HexNumber.h", 103 "HexNumber.h",
111 "InstanceCounter.cpp",
112 "InstanceCounter.h", 104 "InstanceCounter.h",
113 "LeakAnnotations.h", 105 "LeakAnnotations.h",
114 "LinkedHashSet.h", 106 "LinkedHashSet.h",
115 "ListHashSet.h", 107 "ListHashSet.h",
116 "Locker.h", 108 "Locker.h",
117 "MathExtras.h", 109 "MathExtras.h",
118 "NonCopyingSort.h", 110 "NonCopyingSort.h",
119 "Noncopyable.h", 111 "Noncopyable.h",
120 "NotFound.h", 112 "NotFound.h",
121 "Optional.h", 113 "Optional.h",
122 "PassRefPtr.h", 114 "PassRefPtr.h",
123 "PrintStream.cpp",
124 "PrintStream.h", 115 "PrintStream.h",
125 "PtrUtil.h", 116 "PtrUtil.h",
126 "RefCounted.h", 117 "RefCounted.h",
127 "RefPtr.h", 118 "RefPtr.h",
128 "RefVector.h",
129 "RetainPtr.h", 119 "RetainPtr.h",
130 "SaturatedArithmetic.h",
131 "SizeAssertions.h", 120 "SizeAssertions.h",
132 "SizeLimits.cpp",
133 "SpinLock.h", 121 "SpinLock.h",
134 "StackUtil.cpp",
135 "StackUtil.h", 122 "StackUtil.h",
136 "StaticConstructors.h", 123 "StaticConstructors.h",
137 "StdLibExtras.h", 124 "StdLibExtras.h",
138 "StringExtras.h", 125 "StringExtras.h",
139 "StringHasher.h", 126 "StringHasher.h",
140 "TerminatedArray.h",
141 "TerminatedArrayBuilder.h",
142 "ThreadRestrictionVerifier.h", 127 "ThreadRestrictionVerifier.h",
143 "ThreadSafeRefCounted.h", 128 "ThreadSafeRefCounted.h",
144 "ThreadSpecific.h", 129 "ThreadSpecific.h",
145 "ThreadSpecificWin.cpp",
146 "Threading.h", 130 "Threading.h",
147 "ThreadingPrimitives.h", 131 "ThreadingPrimitives.h",
148 "ThreadingPthreads.cpp",
149 "ThreadingWin.cpp",
150 "Time.h", 132 "Time.h",
151 "TreeNode.h", 133 "TreeNode.h",
152 "TriState.h", 134 "TriState.h",
153 "TypeTraits.h", 135 "TypeTraits.h",
154 "Vector.h", 136 "Vector.h",
155 "VectorTraits.h", 137 "VectorTraits.h",
156 "WTF.cpp",
157 "WTF.h", 138 "WTF.h",
158 "WTFExport.h", 139 "WTFExport.h",
159 "WTFThreadData.cpp",
160 "WTFThreadData.h", 140 "WTFThreadData.h",
161 "WeakPtr.h", 141 "WeakPtr.h",
162 "allocator/PartitionAllocator.cpp", 142 "allocator/PartitionAllocator.cpp",
163 "allocator/PartitionAllocator.h", 143 "allocator/PartitionAllocator.h",
164 "allocator/Partitions.cpp", 144 "allocator/Partitions.cpp",
165 "allocator/Partitions.h", 145 "allocator/Partitions.h",
166 "build_config.h", 146 "build_config.h",
167 "debug/Alias.h",
168 "debug/CrashLogging.h",
169 "dtoa.cpp", 147 "dtoa.cpp",
170 "dtoa.h", 148 "dtoa.h",
171 "dtoa/bignum-dtoa.cc", 149 "dtoa/bignum-dtoa.cc",
172 "dtoa/bignum-dtoa.h", 150 "dtoa/bignum-dtoa.h",
173 "dtoa/bignum.cc", 151 "dtoa/bignum.cc",
174 "dtoa/bignum.h", 152 "dtoa/bignum.h",
175 "dtoa/cached-powers.cc", 153 "dtoa/cached-powers.cc",
176 "dtoa/cached-powers.h", 154 "dtoa/cached-powers.h",
177 "dtoa/diy-fp.cc", 155 "dtoa/diy-fp.cc",
178 "dtoa/diy-fp.h", 156 "dtoa/diy-fp.h",
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 268
291 public_deps = [ 269 public_deps = [
292 "//base", 270 "//base",
293 "//third_party/icu", 271 "//third_party/icu",
294 ] 272 ]
295 273
296 # Rules changing the |sources| list are temporarily commented out, until 274 # Rules changing the |sources| list are temporarily commented out, until
297 # those files are actually moved to here. 275 # those files are actually moved to here.
298 276
299 if (is_win) { 277 if (is_win) {
300 sources -= [ "ThreadingPthreads.cpp" ] 278 # sources -= [ "ThreadingPthreads.cpp" ]
301 279
302 cflags = [ "/wd4068" ] # Unknown pragma. 280 cflags = [ "/wd4068" ] # Unknown pragma.
303 } else { 281 } else {
304 # Non-Windows. 282 # Non-Windows.
305 sources -= [ 283 # sources -= [
306 "ThreadSpecificWin.cpp", 284 # "ThreadSpecificWin.cpp",
307 "ThreadingWin.cpp", 285 # "ThreadingWin.cpp",
308 ] 286 # ]
309 } 287 }
310 288
311 if (is_android) { 289 if (is_android) {
312 libs = [ "log" ] 290 libs = [ "log" ]
313 } 291 }
314 if (is_linux) { 292 if (is_linux) {
315 libs = [ "dl" ] 293 libs = [ "dl" ]
316 } 294 }
317 295
318 if (is_mac) { 296 if (is_mac) {
319 libs = [ 297 libs = [
320 "CoreFoundation.framework", 298 "CoreFoundation.framework",
321 "Foundation.framework", 299 "Foundation.framework",
322 ] 300 ]
323 } else { 301 } else {
324 sources -= [ 302 sources -= [
325 "text/AtomicStringCF.cpp", 303 "text/AtomicStringCF.cpp",
326 "text/StringImplCF.cpp", 304 "text/StringImplCF.cpp",
327 ] 305 ]
328 } 306 }
329 307
330 if (remove_webcore_debug_symbols) { 308 if (remove_webcore_debug_symbols) {
331 configs -= [ "//build/config/compiler:default_symbols" ] 309 configs -= [ "//build/config/compiler:default_symbols" ]
332 configs += [ "//build/config/compiler:no_symbols" ] 310 configs += [ "//build/config/compiler:no_symbols" ]
333 } 311 }
334 } 312 }
335
336 test("wtf_unittests") {
337 visibility = [] # Allow re-assignment of list.
338 visibility = [ "*" ]
339
340 sources = [
341 "ASCIICTypeTest.cpp",
342 "AssertionsTest.cpp",
343 "DequeTest.cpp",
344 "FunctionalTest.cpp",
345 "HashMapTest.cpp",
346 "HashSetTest.cpp",
347 "ListHashSetTest.cpp",
348 "MathExtrasTest.cpp",
349 "OptionalTest.cpp",
350 "PassRefPtrTest.cpp",
351 "RefPtrTest.cpp",
352 "StringExtrasTest.cpp",
353 "StringHasherTest.cpp",
354 "TimeTest.cpp",
355 "TreeNodeTest.cpp",
356 "TypeTraitsTest.cpp",
357 "VectorTest.cpp",
358 "dtoa_test.cpp",
359 "testing/RunAllTests.cpp",
360 "text/AtomicStringTest.cpp",
361 "text/CStringTest.cpp",
362 "text/IntegerToStringConversionTest.cpp",
363 "text/StringBufferTest.cpp",
364 "text/StringBuilderTest.cpp",
365 "text/StringImplTest.cpp",
366 "text/StringOperatorsTest.cpp",
367 "text/StringToNumberTest.cpp",
368 "text/StringViewTest.cpp",
369 "text/TextCodecICUTest.cpp",
370 "text/TextCodecLatin1Test.cpp",
371 "text/TextCodecReplacementTest.cpp",
372 "text/TextCodecTest.cpp",
373 "text/TextCodecUTF8Test.cpp",
374 "text/TextCodecUserDefinedTest.cpp",
375 "text/TextEncodingTest.cpp",
376 "text/WTFStringTest.cpp",
377 "typed_arrays/ArrayBufferBuilderTest.cpp",
378 ]
379
380 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
381 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
382
383 if (is_win) {
384 cflags = [ "/wd4068" ] # Unknown pragma.
385 }
386
387 configs += [
388 "//third_party/WebKit/Source:config",
389 "//third_party/WebKit/Source:blink_pch",
390 ]
391
392 deps = [
393 ":platform_wtf",
394 "//base",
395 "//base/test:test_support",
396 "//testing/gmock",
397 "//testing/gtest",
398 ]
399 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/wtf/AssertionsTest.cpp ('k') | third_party/WebKit/Source/platform/wtf/BloomFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698