naiveproxy/third_party/blink/renderer/platform/wtf/BUILD.gn

367 lines
9.2 KiB
Plaintext
Raw Normal View History

2018-08-11 08:35:24 +03:00
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
assert(!is_ios)
import("//build/config/jumbo.gni")
import("//testing/test.gni")
import("//third_party/blink/renderer/config.gni")
visibility = [
":*",
"//mojo/public/cpp/bindings/*",
"//third_party/blink/*",
]
config("wtf_config") {
if (is_win) {
defines = [
"__STD_C",
"_CRT_SECURE_NO_DEPRECATE",
"_SCL_SECURE_NO_DEPRECATE",
]
include_dirs = [ "os-win32" ]
cflags = [
# Don't complain about calling specific versions of templatized
# functions (e.g. in RefPtrHashMap.h).
"/wd4344",
# dtoa, icu, etc. like doing assignment within conditional.
"/wd4706",
]
if (is_component_build) {
# Chromium windows multi-dll build enables C++ exceptions and this causes
# wtf to generate 4291 warning due to operator new/delete
# implementations. Disable the warning for chromium windows multi-dll
# build.
cflags += [ "/wd4291" ]
}
}
}
jumbo_component("wtf") {
sources = [
"address_sanitizer.h",
"alignment.h",
"allocator.h",
"allocator/partition_allocator.cc",
"allocator/partition_allocator.h",
"allocator/partitions.cc",
"allocator/partitions.h",
"ascii_ctype.cc",
"ascii_ctype.h",
"assertions.cc",
"assertions.h",
"atomics.h",
"bit_vector.cc",
"bit_vector.h",
"bloom_filter.h",
"byte_order.h",
"byte_swap.h",
"checked_numeric.h",
"compiler.h",
"conditional_destructor.h",
"container_annotations.h",
"cpu.h",
"date_math.cc",
"date_math.h",
"deque.h",
"doubly_linked_list.h",
"dtoa.cc",
"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",
"dynamic_annotations.cc",
"dynamic_annotations.h",
"experimental/container_type_operations.h",
"forward.h",
"functional.h",
"get_ptr.h",
"hash_counted_set.h",
"hash_functions.h",
"hash_iterators.h",
"hash_map.h",
"hash_set.h",
"hash_table.cc",
"hash_table.h",
"hash_table_deleted_value_type.h",
"hash_traits.h",
"hex_number.h",
"leak_annotations.h",
"linked_hash_set.h",
"list_hash_set.h",
"locker.h",
"math_extras.h",
"noncopyable.h",
"not_found.h",
"process_metrics.h",
"ref_counted.h",
"ref_vector.h",
"retain_ptr.h",
"saturated_arithmetic.h",
"saturated_arithmetic_arm.h",
"scoped_logger.cc",
"scoped_logger.h",
"size_assertions.h",
"size_limits.cc",
"stack_util.cc",
"stack_util.h",
"static_constructors.h",
"std_lib_extras.h",
"string_extras.h",
"string_hasher.h",
"terminated_array.h",
"terminated_array_builder.h",
"text/ascii_fast_path.h",
"text/atomic_string.cc",
"text/atomic_string.h",
"text/atomic_string_cf.cc",
"text/atomic_string_hash.h",
"text/atomic_string_table.cc",
"text/atomic_string_table.h",
"text/base64.cc",
"text/base64.h",
"text/character_names.h",
"text/collator.h",
"text/cstring.cc",
"text/cstring.h",
"text/icu/collator_icu.cc",
"text/icu/unicode_icu.h",
"text/integer_to_string_conversion.h",
"text/number_parsing_options.h",
"text/parsing_utilities.h",
"text/string_buffer.h",
"text/string_builder.cc",
"text/string_builder.h",
"text/string_concatenate.cc",
"text/string_concatenate.h",
"text/string_hash.h",
"text/string_impl.cc",
"text/string_impl.h",
"text/string_impl_cf.cc",
"text/string_impl_mac.mm",
"text/string_mac.mm",
"text/string_operators.h",
"text/string_statics.cc",
"text/string_statics.h",
"text/string_statics.h",
"text/string_to_number.cc",
"text/string_to_number.h",
"text/string_utf8_adaptor.h",
"text/string_view.cc",
"text/string_view.h",
"text/text_codec.cc",
"text/text_codec.h",
"text/text_codec_ascii_fast_path.h",
"text/text_codec_icu.cc",
"text/text_codec_icu.h",
"text/text_codec_latin1.cc",
"text/text_codec_latin1.h",
"text/text_codec_replacement.cc",
"text/text_codec_replacement.h",
"text/text_codec_user_defined.cc",
"text/text_codec_user_defined.h",
"text/text_codec_utf16.cc",
"text/text_codec_utf16.h",
"text/text_codec_utf8.cc",
"text/text_codec_utf8.h",
"text/text_encoding.cc",
"text/text_encoding.h",
"text/text_encoding_registry.cc",
"text/text_encoding_registry.h",
"text/text_position.cc",
"text/text_position.h",
"text/text_stream.cc",
"text/text_stream.h",
"text/unicode.h",
"text/utf8.cc",
"text/utf8.h",
"text/wtf_string.cc",
"text/wtf_string.h",
"thread_restriction_verifier.h",
"thread_safe_ref_counted.h",
"thread_specific.h",
"threading.h",
"threading_primitives.h",
"threading_pthreads.cc",
"threading_win.cc",
"time.cc",
"time.h",
"tree_node.h",
"type_traits.h",
"typed_arrays/array_buffer.cc",
"typed_arrays/array_buffer.h",
"typed_arrays/array_buffer_builder.cc",
"typed_arrays/array_buffer_builder.h",
"typed_arrays/array_buffer_contents.cc",
"typed_arrays/array_buffer_contents.h",
"typed_arrays/array_buffer_view.cc",
"typed_arrays/array_buffer_view.h",
"typed_arrays/array_piece.cc",
"typed_arrays/array_piece.h",
"typed_arrays/bigint64_array.h",
"typed_arrays/biguint64_array.h",
"typed_arrays/float32_array.h",
"typed_arrays/float64_array.h",
"typed_arrays/int16_array.h",
"typed_arrays/int32_array.h",
"typed_arrays/int8_array.h",
"typed_arrays/integral_typed_array_base.h",
"typed_arrays/typed_array_base.h",
"typed_arrays/uint16_array.h",
"typed_arrays/uint32_array.h",
"typed_arrays/uint8_array.h",
"typed_arrays/uint8_clamped_array.h",
"vector.h",
"vector_traits.h",
"wtf.cc",
"wtf.h",
"wtf_export.h",
"wtf_thread_data.cc",
"wtf_thread_data.h",
]
configs += [
"//third_party/blink/renderer:config",
"//third_party/blink/renderer:non_test_config",
"//third_party/blink/renderer:blink_pch",
]
defines = [ "WTF_IMPLEMENTATION=1" ]
public_configs = [
":wtf_config",
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
"//build/config/compiler:no_size_t_to_int_warning",
"//third_party/blink/renderer:features",
]
public_deps = [
"//base",
"//third_party/icu",
]
# Rules changing the |sources| list are temporarily commented out, until
# those files are actually moved to here.
if (is_win) {
sources -= [ "threading_pthreads.cc" ]
cflags = [ "/wd4068" ] # Unknown pragma.
# Inject Visual Studio debug visualizers for our types into all targets
# that reference this.
all_dependent_configs = [ "//tools/win/DebugVisualizers:webkit" ]
}
if (is_android) {
libs = [ "log" ]
}
if (is_linux) {
libs = [ "dl" ]
}
if (is_mac) {
libs = [
"CoreFoundation.framework",
"Foundation.framework",
]
} else {
sources -= [
"text/atomic_string_cf.cc",
"text/string_impl_cf.cc",
]
}
configs -= [ "//build/config/compiler:default_symbols" ]
configs += blink_symbols_config
}
test("wtf_unittests") {
deps = [
":wtf_unittests_sources",
]
}
jumbo_source_set("wtf_unittests_sources") {
visibility = [] # Allow re-assignment of list.
visibility = [ "*" ]
testonly = true
sources = [
"ascii_ctype_test.cc",
"assertions_test.cc",
"deque_test.cc",
"dtoa_test.cc",
"experimental/container_type_operations_test.cc",
"functional_test.cc",
"hash_map_test.cc",
"hash_set_test.cc",
"list_hash_set_test.cc",
"math_extras_test.cc",
"ref_ptr_test.cc",
"saturated_arithmetic_test.cc",
"scoped_logger_test.cc",
"string_hasher_test.cc",
"testing/run_all_tests.cc",
"text/atomic_string_test.cc",
"text/cstring_test.cc",
"text/integer_to_string_conversion_test.cc",
"text/string_buffer_test.cc",
"text/string_builder_test.cc",
"text/string_impl_test.cc",
"text/string_to_number_test.cc",
"text/string_view_test.cc",
"text/text_codec_icu_test.cc",
"text/text_codec_replacement_test.cc",
"text/text_codec_test.cc",
"text/text_codec_utf8_test.cc",
"text/text_encoding_test.cc",
"text/wtf_string_test.cc",
"tree_node_test.cc",
"type_traits_test.cc",
"typed_arrays/array_buffer_builder_test.cc",
"vector_test.cc",
]
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
if (is_win) {
cflags = [ "/wd4068" ] # Unknown pragma.
}
configs += [
"//third_party/blink/renderer:config",
"//third_party/blink/renderer:blink_pch",
]
deps = [
":wtf",
"//base",
"//base/test:test_support",
"//testing/gmock",
"//testing/gtest",
]
}