| OLD | NEW |
| (Empty) | |
| 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 |
| 3 # found in the LICENSE file. |
| 4 |
| 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 |
| 7 # |
| 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 |
| 10 # only wtf/ can refer the contents in platform/wtf/. |
| 11 # |
| 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" |
| 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 |
| 16 # #include a header in this directory from core/ or modules/). |
| 17 # |
| 18 # The following configurations are mostly copied from wtf/BUILD.gn, so we |
| 19 # can build the source files in the same way. |
| 20 # |
| 21 # When we finish moving all the files, "platform_wtf" target will take over |
| 22 # the role of "wtf". |
| 23 # |
| 24 # TODO(yutak): Set up platform_wtf_unittests in the similar manner. |
| 25 |
| 26 assert(!is_ios) |
| 27 |
| 28 import("//third_party/WebKit/Source/config.gni") |
| 29 |
| 30 visibility = [ "//third_party/WebKit/Source/wtf/*" ] |
| 31 |
| 32 config("wtf_config") { |
| 33 if (is_win) { |
| 34 defines = [ |
| 35 "__STD_C", |
| 36 "_CRT_SECURE_NO_DEPRECATE", |
| 37 "_SCL_SECURE_NO_DEPRECATE", |
| 38 ] |
| 39 include_dirs = [ "os-win32" ] |
| 40 |
| 41 cflags = [ |
| 42 # Don't complain about calling specific versions of templatized |
| 43 # functions (e.g. in RefPtrHashMap.h). |
| 44 "/wd4344", |
| 45 |
| 46 # dtoa, icu, etc. like doing assignment within conditional. |
| 47 "/wd4706", |
| 48 ] |
| 49 |
| 50 if (is_component_build) { |
| 51 # Chromium windows multi-dll build enables C++ exceptions and this causes |
| 52 # wtf to generate 4291 warning due to operator new/delete |
| 53 # implementations. Disable the warning for chromium windows multi-dll |
| 54 # build. |
| 55 cflags += [ "/wd4291" ] |
| 56 } |
| 57 } |
| 58 } |
| 59 |
| 60 component("platform_wtf") { |
| 61 sources = [ |
| 62 "CryptographicallyRandomNumber.cpp", |
| 63 "CryptographicallyRandomNumber.h", |
| 64 "WTFExport.h", |
| 65 ] |
| 66 |
| 67 configs += [ |
| 68 "//third_party/WebKit/Source:config", |
| 69 "//third_party/WebKit/Source:non_test_config", |
| 70 "//third_party/WebKit/Source:blink_pch", |
| 71 ] |
| 72 |
| 73 defines = [ "WTF_IMPLEMENTATION=1" ] |
| 74 |
| 75 public_configs = [ |
| 76 ":wtf_config", |
| 77 |
| 78 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 79 "//build/config/compiler:no_size_t_to_int_warning", |
| 80 "//third_party/WebKit/Source:features", |
| 81 ] |
| 82 |
| 83 public_deps = [ |
| 84 "//base", |
| 85 "//third_party/icu", |
| 86 ] |
| 87 |
| 88 # Rules changing the |sources| list are temporarily commented out, until |
| 89 # those files are actually moved to here. |
| 90 |
| 91 if (is_win) { |
| 92 # sources -= [ "ThreadingPthreads.cpp" ] |
| 93 |
| 94 cflags = [ "/wd4068" ] # Unknown pragma. |
| 95 } else { |
| 96 # Non-Windows. |
| 97 # sources -= [ |
| 98 # "ThreadSpecificWin.cpp", |
| 99 # "ThreadingWin.cpp", |
| 100 # ] |
| 101 } |
| 102 |
| 103 if (is_android) { |
| 104 libs = [ "log" ] |
| 105 } |
| 106 if (is_linux) { |
| 107 libs = [ "dl" ] |
| 108 } |
| 109 |
| 110 if (is_mac) { |
| 111 libs = [ |
| 112 "CoreFoundation.framework", |
| 113 "Foundation.framework", |
| 114 ] |
| 115 } else { |
| 116 # sources -= [ |
| 117 # "text/AtomicStringCF.cpp", |
| 118 # "text/StringImplCF.cpp", |
| 119 # ] |
| 120 } |
| 121 |
| 122 if (remove_webcore_debug_symbols) { |
| 123 configs -= [ "//build/config/compiler:default_symbols" ] |
| 124 configs += [ "//build/config/compiler:no_symbols" ] |
| 125 } |
| 126 } |
| OLD | NEW |