Chromium Code Reviews| 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 import("//testing/test.gni") | 5 import("//testing/test.gni") |
| 6 | 6 |
| 7 declare_args() { | |
| 8 # Forces assertions to be disabled. | |
| 9 disable_wtf_assertions = false | |
| 10 } | |
| 11 | |
| 7 # The list of files is kept in the .gypi. | 12 # The list of files is kept in the .gypi. |
| 8 gypi_values = exec_script("//build/gypi_to_gn.py", | 13 gypi_values = exec_script("//build/gypi_to_gn.py", |
| 9 [ rebase_path("wtf.gypi") ], | 14 [ rebase_path("wtf.gypi") ], |
| 10 "scope", | 15 "scope", |
| 11 [ "wtf.gypi" ]) | 16 [ "wtf.gypi" ]) |
| 12 | 17 |
| 13 visibility = [ "//third_party/WebKit/*" ] | 18 visibility = [ "//third_party/WebKit/*" ] |
| 14 | 19 |
| 15 config("wtf_config") { | 20 config("wtf_config") { |
| 21 defines = [] | |
| 22 | |
| 16 if (is_win) { | 23 if (is_win) { |
| 17 defines = [ | 24 defines = [ |
|
slan
2015/12/17 02:44:12
This needs to be defines += or GN will yell at you
| |
| 18 "__STD_C", | 25 "__STD_C", |
| 19 "_CRT_SECURE_NO_DEPRECATE", | 26 "_CRT_SECURE_NO_DEPRECATE", |
| 20 "_SCL_SECURE_NO_DEPRECATE", | 27 "_SCL_SECURE_NO_DEPRECATE", |
| 21 ] | 28 ] |
| 22 include_dirs = [ "os-win32" ] | 29 include_dirs = [ "os-win32" ] |
| 23 | 30 |
| 24 cflags = [ | 31 cflags = [ |
| 25 # Don't complain about calling specific versions of templatized | 32 # Don't complain about calling specific versions of templatized |
| 26 # functions (e.g. in RefPtrHashMap.h). | 33 # functions (e.g. in RefPtrHashMap.h). |
| 27 "/wd4344", | 34 "/wd4344", |
| 28 | 35 |
| 29 # dtoa, icu, etc. like doing assignment within conditional. | 36 # dtoa, icu, etc. like doing assignment within conditional. |
| 30 "/wd4706", | 37 "/wd4706", |
| 31 ] | 38 ] |
| 32 | 39 |
| 33 if (is_component_build) { | 40 if (is_component_build) { |
| 34 # Chromium windows multi-dll build enables C++ exceptions and this causes | 41 # Chromium windows multi-dll build enables C++ exceptions and this causes |
| 35 # wtf to generate 4291 warning due to operator new/delete | 42 # wtf to generate 4291 warning due to operator new/delete |
| 36 # implementations. Disable the warning for chromium windows multi-dll | 43 # implementations. Disable the warning for chromium windows multi-dll |
| 37 # build. | 44 # build. |
| 38 cflags += [ "/wd4291" ] | 45 cflags += [ "/wd4291" ] |
| 39 } | 46 } |
| 40 } | 47 } |
| 48 | |
| 49 if (disable_wtf_assertions) { | |
| 50 defines += [ "ENABLE_ASSERT=0" ] | |
|
slan
2015/12/17 02:44:12
Any target that has this macro in *.h files should
| |
| 51 } | |
| 41 } | 52 } |
| 42 | 53 |
| 43 component("wtf") { | 54 component("wtf") { |
| 44 sources = gypi_values.wtf_files | 55 sources = gypi_values.wtf_files |
| 45 | 56 |
| 46 configs += [ | 57 configs += [ |
| 47 "//third_party/WebKit/Source:config", | 58 "//third_party/WebKit/Source:config", |
| 48 "//third_party/WebKit/Source:non_test_config", | 59 "//third_party/WebKit/Source:non_test_config", |
| 49 ] | 60 ] |
| 50 | 61 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 143 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | 154 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 144 "//build/config/compiler:no_size_t_to_int_warning", | 155 "//build/config/compiler:no_size_t_to_int_warning", |
| 145 "//third_party/WebKit/Source:config", | 156 "//third_party/WebKit/Source:config", |
| 146 "//third_party/WebKit/Source:non_test_config", | 157 "//third_party/WebKit/Source:non_test_config", |
| 147 ] | 158 ] |
| 148 | 159 |
| 149 deps = [ | 160 deps = [ |
| 150 ":wtf", | 161 ":wtf", |
| 151 ] | 162 ] |
| 152 } | 163 } |
| OLD | NEW |