Chromium Code Reviews| Index: tools/gn/secondary/third_party/WebKit/Source/wtf/BUILD.gn |
| diff --git a/tools/gn/secondary/third_party/WebKit/Source/wtf/BUILD.gn b/tools/gn/secondary/third_party/WebKit/Source/wtf/BUILD.gn |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d1f2a704473ccc2699038e3d7f64bc0e22601644 |
| --- /dev/null |
| +++ b/tools/gn/secondary/third_party/WebKit/Source/wtf/BUILD.gn |
| @@ -0,0 +1,376 @@ |
| +config("wtf-config") { |
| + includes = [ ".." ] |
| + if (is_win) { |
| + includes += [ "os-win32" ] |
| + defines += [ |
| + "__STD_C", |
| + "_CRT_SECURE_NO_DEPRECATE", |
| + "_SCL_SECURE_NO_DEPRECATE", |
| + "CRASH=__debugbreak", |
| + ] |
| +# # Chromium windows multi-dll build enables c++ exception and this |
| +# # causes wtf generates 4291 warning due to operator new/delete |
| +# # implementations. Disable the warning for chromium windows |
| +# # multi-dll build. |
| +# 'msvs_disabled_warnings': [4291], |
|
jamesr
2013/10/02 09:07:02
what does msvs_disabled_warnings map to?
Nico
2013/10/02 15:56:30
winja gyp translates it to /wd4291 in the compiler
brettw
2013/10/18 17:38:54
Remember that this is executed multiple times, onc
|
| +# 'direct_dependent_settings': { |
| +# 'msvs_disabled_warnings': [4291], |
| +# }, |
| + } |
| + |
| +# if (gcc_version >= 46) { |
|
jamesr
2013/10/02 09:07:02
do we have a way to query this? i tried to read ab
Nico
2013/10/02 15:56:30
Brett?
|
| +# # Disable warnings about c++0x compatibility, as some names (such as |
| +# # nullptr) conflict with upcoming c++0x types. |
| +# cflags_cc += [ "-Wno-c++0x-compat" ] |
| +# } |
| + |
| +# # Some warnings occur in WTF headers, so they must also be disabled |
| +# # in targets that use WTF. |
| +# 'msvs_disabled_warnings': [ |
| +# # Don't complain about calling specific versions of templatized |
| +# # functions (e.g. in RefPtrHashMap.h). |
| +# 4344, |
| +# # Don't complain about using "this" in an initializer list |
| +# # (e.g. in StringImpl.h). |
| +# 4355, |
| +# # Disable c4267 warnings until we fix size_t to int truncations. |
| +# 4267, |
| +# ], |
| + |
| +} |
| + |
| +component("wtf") { |
| + configs -= [ "//build/config/compiler:chromium_code" ] |
| + configs += [ |
| + "//build/config/compiler:no_chromium_code", |
| + ":wtf-config" |
|
Nico
2013/10/02 15:56:30
Is the order here important? You put ":wtf-config"
|
| + ] |
| + |
| + defines = [ "WTF_IMPLEMENTATION=1" ] |
| + deps = [ |
| + "//third_party/icu:icui18n", |
| + "//third_party/icu:icuuc", |
| + ] |
| + |
| + sources = [ |
| + "ASCIICType.h", |
| + "Alignment.h", |
| + "ArrayBuffer.cpp", |
| + "ArrayBuffer.h", |
| + "ArrayBufferContents.cpp", |
| + "ArrayBufferContents.h", |
| + "ArrayBufferDeallocationObserver.h", |
| + "ArrayBufferView.cpp", |
| + "ArrayBufferView.h", |
| + "Assertions.cpp", |
| + "Assertions.h", |
| + "Atomics.h", |
| + "AutodrainedPool.h", |
| + "BitArray.h", |
| + "BitVector.cpp", |
| + "BitVector.h", |
| + "BloomFilter.h", |
| + "ByteOrder.h", |
| + "CPU.h", |
| + "CheckedArithmetic.h", |
| + "Compiler.h", |
| + "Complex.h", |
| + "CryptographicallyRandomNumber.cpp", |
| + "CryptographicallyRandomNumber.h", |
| + "CurrentTime.cpp", |
| + "CurrentTime.h", |
| + "DataLog.cpp", |
| + "DataLog.h", |
| + "DateMath.cpp", |
| + "DateMath.h", |
| + "DecimalNumber.cpp", |
| + "DecimalNumber.h", |
| + "Deque.h", |
| + "DoublyLinkedList.h", |
| + "DynamicAnnotations.cpp", |
| + "DynamicAnnotations.h", |
| + "FastAllocBase.h", |
| + "FastMalloc.cpp", |
| + "FastMalloc.h", |
| + "FilePrintStream.cpp", |
| + "FilePrintStream.h", |
| + "Float32Array.h", |
| + "Float64Array.h", |
| + "Forward.h", |
| + "Functional.h", |
| + "GetPtr.h", |
| + "GregorianDateTime.cpp", |
| + "GregorianDateTime.h", |
| + "HashCountedSet.h", |
| + "HashFunctions.h", |
| + "HashIterators.h", |
| + "HashMap.h", |
| + "HashSet.h", |
| + "HashTable.cpp", |
| + "HashTable.h", |
| + "HashTableDeletedValueType.h", |
| + "HashTraits.h", |
| + "HexNumber.h", |
| + "Int16Array.h", |
| + "Int32Array.h", |
| + "Int8Array.h", |
| + "IntegralTypedArrayBase.h", |
| + "LeakAnnotations.h", |
| + "LinkedStack.h", |
| + "ListHashSet.h", |
| + "Locker.h", |
| + "MainThread.cpp", |
| + "MainThread.h", |
| + "MallocZoneSupport.h", |
| + "MathExtras.h", |
| + "MessageQueue.h", |
| + "NonCopyingSort.h", |
| + "Noncopyable.h", |
| + "NotFound.h", |
| + "NullPtr.cpp", |
| + "NullPtr.h", |
| + "NumberOfCores.cpp", |
| + "NumberOfCores.h", |
| + "OwnArrayPtr.h", |
| + "OwnPtr.h", |
| + "OwnPtrCommon.h", |
| + "PageAllocator.cpp", |
| + "PageAllocator.h", |
| + "ParallelJobs.h", |
| + "ParallelJobsGeneric.cpp", |
| + "ParallelJobsGeneric.h", |
| + "ParallelJobsLibdispatch.h", |
| + "PartitionAlloc.cpp", |
| + "PartitionAlloc.h", |
| + "PassOwnArrayPtr.h", |
| + "PassOwnPtr.h", |
| + "PassRefPtr.h", |
| + "PassTraits.h", |
| + "PrintStream.cpp", |
| + "PrintStream.h", |
| + "ProcessID.h", |
| + "QuantizedAllocation.cpp", |
| + "QuantizedAllocation.h", |
| + "RandomNumber.cpp", |
| + "RandomNumber.h", |
| + "RandomNumberSeed.h", |
| + "RefCounted.h", |
| + "RefCountedLeakCounter.cpp", |
| + "RefCountedLeakCounter.h", |
| + "RefPtr.h", |
| + "RefPtrHashMap.h", |
| + "RetainPtr.h", |
| + "SHA1.cpp", |
| + "SHA1.h", |
| + "SaturatedArithmetic.h", |
| + "SizeLimits.cpp", |
| + "SpinLock.h", |
| + "StaticConstructors.h", |
| + "StdLibExtras.h", |
| + "StringExtras.h", |
| + "StringHasher.h", |
| + "TemporaryChange.h", |
| + "ThreadFunctionInvocation.h", |
| + "ThreadRestrictionVerifier.h", |
| + "ThreadSafeRefCounted.h", |
| + "ThreadSpecific.h", |
| + "Threading.cpp", |
| + "Threading.h", |
| + "ThreadingPrimitives.h", |
| + "TypeTraits.cpp", |
| + "TypeTraits.h", |
| + "TypedArrayBase.h", |
| + "Uint16Array.h", |
| + "Uint32Array.h", |
| + "Uint8Array.h", |
| + "UnusedParam.h", |
| + "VMTags.h", |
| + "Vector.h", |
| + "VectorTraits.h", |
| + "WTF.cpp", |
| + "WTF.h", |
| + "WTFExport.h", |
| + "WTFThreadData.cpp", |
| + "WTFThreadData.h", |
| + "WeakPtr.h", |
| + "dtoa.cpp", |
| + "dtoa.h", |
| + "dtoa/bignum-dtoa.cc", |
| + "dtoa/bignum-dtoa.h", |
| + "dtoa/bignum.cc", |
| + "dtoa/bignum.h", |
| + "dtoa/cached-powers.cc", |
| + "dtoa/cached-powers.h", |
| + "dtoa/diy-fp.cc", |
| + "dtoa/diy-fp.h", |
| + "dtoa/double-conversion.cc", |
| + "dtoa/double-conversion.h", |
| + "dtoa/double.h", |
| + "dtoa/fast-dtoa.cc", |
| + "dtoa/fast-dtoa.h", |
| + "dtoa/fixed-dtoa.cc", |
| + "dtoa/fixed-dtoa.h", |
| + "dtoa/strtod.cc", |
| + "dtoa/strtod.h", |
| + "dtoa/utils.h", |
| + "text/ASCIIFastPath.h", |
| + "text/AtomicString.cpp", |
| + "text/AtomicString.h", |
| + "text/AtomicStringHash.h", |
| + "text/Base64.cpp", |
| + "text/Base64.h", |
| + "text/CString.cpp", |
| + "text/CString.h", |
| + "text/IntegerToStringConversion.h", |
| + "text/StringBuffer.h", |
| + "text/StringBuilder.cpp", |
| + "text/StringBuilder.h", |
| + "text/StringConcatenate.h", |
| + "text/StringHash.h", |
| + "text/StringImpl.cpp", |
| + "text/StringImpl.h", |
| + "text/StringOperators.h", |
| + "text/StringStatics.cpp", |
| + "text/StringUTF8Adaptor.h", |
| + "text/StringView.h", |
| + "text/TextCodec.cpp", |
| + "text/TextCodecASCIIFastPath.h", |
| + "text/TextCodecICU.cpp", |
| + "text/TextCodecLatin1.cpp", |
| + "text/TextCodecUTF16.cpp", |
| + "text/TextCodecUTF8.cpp", |
| + "text/TextCodecUTF8.h", |
| + "text/TextCodecUserDefined.cpp", |
| + "text/TextEncoding.cpp", |
| + "text/TextEncodingRegistry.cpp", |
| + "text/TextPosition.cpp", |
| + "text/TextPosition.h", |
| + "text/WTFString.cpp", |
| + "text/WTFString.h", |
| + "unicode/CharacterNames.h", |
| + "unicode/Collator.h", |
| + "unicode/UTF8.cpp", |
| + "unicode/UTF8.h", |
| + "unicode/Unicode.h", |
| + "unicode/icu/CollatorICU.cpp", |
| + "unicode/icu/UnicodeIcu.h", |
| + ] |
| + |
| +# # Disable c4267 warnings until we fix size_t to int truncations. |
| +# 'msvs_disabled_warnings': [4127, 4355, 4510, 4512, 4610, 4706, 4068, 4267], |
| + |
| + if (is_android) { |
| + ldflags += [ "-llog" ] |
| + } |
| + |
| + if (is_mac) { |
| +# 'link_settings': { |
| +# 'libraries': [ |
| +# '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework', |
|
jamesr
2013/10/02 09:07:02
i dunno what this does, so i dunno what it's suppo
|
| +# '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', |
| +# ] |
| +# } |
| + sources += [ |
| + # mac is the only OS that uses WebKit's copy of TCMalloc. |
| + "TCPackedCache.h", |
| + "TCPageMap.h", |
| + "TCSpinLock.h", |
| + "TCSystemAlloc.cpp", |
| + "TCSystemAlloc.h", |
| + |
| + "AutodrainedPoolMac.mm", |
| + "text/AtomicStringCF.cpp", |
| + "text/StringCF.cpp", |
| + "text/StringImplCF.cpp", |
| + "text/StringImplMac.mm", |
| + "text/StringMac.mm", |
| + ] |
| + } |
| + |
| + if (is_win) { |
| + sources += [ |
| + "ThreadSpecificWin.cpp", |
| + "ThreadingWin.cpp", |
| + ] |
| + includes -= [ |
| +# "<(SHARED_INTERMEDIATE_DIR)/blink', |
|
jamesr
2013/10/02 09:07:02
<(SHARED_INTERMEDIATE_DIR) is replaced with rebase
|
| + ] |
| + if (is_component_build) { |
|
jamesr
2013/10/02 09:07:02
whoops, no idea why this is here
|
| + } |
| + } else { |
| + sources += [ |
| + "ThreadIdentifierDataPthreads.cpp", |
| + "ThreadIdentifierDataPthreads.h", |
| + "ThreadingPthreads.cpp", |
| + ] |
| + } |
| +} |
| + |
| +static_library("run_all_tests") { |
| + configs -= [ "//build/config/compiler:chromium_code" ] |
| + configs += [ |
| + "//build/config/compiler:no_chromium_code", |
| + ":wtf-config" |
|
Nico
2013/10/02 15:56:30
indent
|
| + ] |
| + |
| + deps = [ |
| + "//base:test_support_base", |
| + "//testing:gmock", |
| + "//testing:gtest", |
| + ":wtf" |
| + ] |
| + |
| + direct_dependent_configs = [ |
| + "//testing:gtest_config" |
| + ] |
| + |
| + sources = [ |
| + "testing/RunAllTests.cpp", |
| + ] |
| +} |
| + |
| +executable("wtf_unittests") { |
| + configs -= [ "//build/config/compiler:chromium_code" ] |
| + configs += [ |
| + ":wtf-config" |
|
Nico
2013/10/02 15:56:30
indent
|
| + "//build/config/compiler:no_chromium_code", |
| + "//third_party/icu:icu_config", |
| + ] |
| + |
| + deps = [ |
| + ":run_all_tests" |
| + ] |
| + |
| + sources = [ |
| + "CheckedArithmeticTest.cpp", |
| + "FunctionalTest.cpp", |
| + "HashMapTest.cpp", |
| + "HashSetTest.cpp", |
| + "ListHashSetTest.cpp", |
| + "MathExtrasTest.cpp", |
| + "PartitionAllocTest.cpp", |
| + "SHA1Test.cpp", |
| + "SaturatedArithmeticTest.cpp", |
| + "SpinLockTest.cpp", |
| + "StringExtrasTest.cpp", |
| + "StringHasherTest.cpp", |
| + "TemporaryChangeTest.cpp", |
| + "VectorTest.cpp", |
| + "testing/WTFTestHelpers.h", |
| + "text/CStringTest.cpp", |
| + "text/StringBuilderTest.cpp", |
| + "text/StringImplTest.cpp", |
| + "text/StringOperatorsTest.cpp", |
| + "text/WTFStringTest.cpp", |
| + ] |
| + |
| +# # Disable c4267 warnings until we fix size_t to int truncations. |
| +# 'msvs_disabled_warnings': [4127, 4355, 4510, 4512, 4610, 4706, 4068, 4267], |
| + |
| +# if (is_linux && use_tcmalloc) { |
|
jamesr
2013/10/02 09:07:02
it looks like we don't have the tcmalloc targets s
|
| +# deps += [ |
| +# "//base:base", |
| +# "//base/allocator:allocator", |
| +# ], |
| +# } |
| +} |