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("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 import("//build/config/ui.gni") | 6 import("//build/config/ui.gni") |
7 import("//testing/libfuzzer/fuzzer_test.gni") | 7 import("//testing/libfuzzer/fuzzer_test.gni") |
8 import("//testing/test.gni") | 8 import("//testing/test.gni") |
9 import("//third_party/WebKit/public/public_features.gni") | 9 import("//third_party/WebKit/public/public_features.gni") |
10 import("//third_party/WebKit/Source/build/scripts/scripts.gni") | 10 import("//third_party/WebKit/Source/build/scripts/scripts.gni") |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 public_deps = [ | 193 public_deps = [ |
194 ":blink_common", | 194 ":blink_common", |
195 ":character_data", | 195 ":character_data", |
196 ":color_data", | 196 ":color_data", |
197 ":font_family_names", | 197 ":font_family_names", |
198 ":http_names", | 198 ":http_names", |
199 ":runtime_enabled_features", | 199 ":runtime_enabled_features", |
200 ] | 200 ] |
201 } | 201 } |
202 | 202 |
| 203 import("//build/config/pch.gni") |
| 204 |
| 205 config("blink_platform_pch") { |
| 206 if (enable_precompiled_headers) { |
| 207 if (is_win) { |
| 208 # This is a string rather than a file GN knows about. It has to match |
| 209 # exactly what's in the /FI flag below, and what might appear in the |
| 210 # source code in quotes for an #include directive. |
| 211 precompiled_header = |
| 212 rebase_path("win/Precompile-platform.h", root_build_dir) |
| 213 |
| 214 # This is a file that GN will compile with the above header. It will be |
| 215 # implicitly added to the sources (potentially multiple times, with one |
| 216 # variant for each language used in the target). |
| 217 precompiled_source = |
| 218 "//third_party/WebKit/Source/platform/win/Precompile-platform.cpp" |
| 219 |
| 220 # Force include the header. |
| 221 cflags = [ "/FI$precompiled_header" ] |
| 222 |
| 223 # Disable warning for "this file was empty after preprocessing". This |
| 224 # error is generated only in C mode for ANSI compatibility. It conflicts |
| 225 # with precompiled headers since the source file that's "compiled" for |
| 226 # making the precompiled header is empty. |
| 227 # |
| 228 # This error doesn't happen every time. In VS2013, it seems if the .pch |
| 229 # file doesn't exist, no error will be generated (probably MS tested this |
| 230 # case but forgot the other one?). To reproduce this error, do a build, |
| 231 # then delete the precompile.c.obj file, then build again. |
| 232 cflags_c = [ "/wd4206" ] |
| 233 } |
| 234 } |
| 235 } |
| 236 |
203 component("platform") { | 237 component("platform") { |
204 visibility = [] # Allow re-assignment of list. | 238 visibility = [] # Allow re-assignment of list. |
205 visibility = [ | 239 visibility = [ |
206 "//third_party/WebKit/*", | 240 "//third_party/WebKit/*", |
207 "//url/mojo:url_mojom_origin_blink_cpp_sources", | 241 "//url/mojo:url_mojom_origin_blink_cpp_sources", |
208 "//url/mojo:url_mojom_gurl_blink_cpp_sources", | 242 "//url/mojo:url_mojom_gurl_blink_cpp_sources", |
209 ] | 243 ] |
210 output_name = "blink_platform" | 244 output_name = "blink_platform" |
211 | 245 |
212 sources = [ | 246 sources = [ |
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1372 # Add in the generated files. | 1406 # Add in the generated files. |
1373 sources += get_target_outputs(":character_data") + | 1407 sources += get_target_outputs(":character_data") + |
1374 get_target_outputs(":color_data") + | 1408 get_target_outputs(":color_data") + |
1375 get_target_outputs(":font_family_names") + | 1409 get_target_outputs(":font_family_names") + |
1376 get_target_outputs(":http_names") + | 1410 get_target_outputs(":http_names") + |
1377 get_target_outputs(":runtime_enabled_features") | 1411 get_target_outputs(":runtime_enabled_features") |
1378 | 1412 |
1379 configs += [ | 1413 configs += [ |
1380 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | 1414 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
1381 "//build/config/compiler:no_size_t_to_int_warning", | 1415 "//build/config/compiler:no_size_t_to_int_warning", |
| 1416 ":blink_platform_pch", |
1382 "//third_party/WebKit/Source:config", | 1417 "//third_party/WebKit/Source:config", |
1383 "//third_party/WebKit/Source:non_test_config", | 1418 "//third_party/WebKit/Source:non_test_config", |
1384 ] | 1419 ] |
1385 | 1420 |
1386 defines = [ | 1421 defines = [ |
1387 "BLINK_PLATFORM_IMPLEMENTATION=1", | 1422 "BLINK_PLATFORM_IMPLEMENTATION=1", |
1388 "INSIDE_BLINK", | 1423 "INSIDE_BLINK", |
1389 ] | 1424 ] |
1390 | 1425 |
1391 include_dirs = [ | 1426 include_dirs = [ |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1583 "testing/UnitTestHelpers.h", | 1618 "testing/UnitTestHelpers.h", |
1584 "testing/WebLayerTreeViewImplForTesting.cpp", | 1619 "testing/WebLayerTreeViewImplForTesting.cpp", |
1585 "testing/WebLayerTreeViewImplForTesting.h", | 1620 "testing/WebLayerTreeViewImplForTesting.h", |
1586 "testing/weburl_loader_mock.cc", | 1621 "testing/weburl_loader_mock.cc", |
1587 "testing/weburl_loader_mock.h", | 1622 "testing/weburl_loader_mock.h", |
1588 "testing/weburl_loader_mock_factory_impl.cc", | 1623 "testing/weburl_loader_mock_factory_impl.cc", |
1589 "testing/weburl_loader_mock_factory_impl.h", | 1624 "testing/weburl_loader_mock_factory_impl.h", |
1590 ] | 1625 ] |
1591 | 1626 |
1592 configs += [ | 1627 configs += [ |
| 1628 ":blink_platform_pch", |
1593 "//third_party/WebKit/Source:config", | 1629 "//third_party/WebKit/Source:config", |
1594 "//third_party/WebKit/Source:inside_blink", | 1630 "//third_party/WebKit/Source:inside_blink", |
1595 "//third_party/WebKit/Source:non_test_config", | 1631 "//third_party/WebKit/Source:non_test_config", |
1596 ] | 1632 ] |
1597 | 1633 |
1598 public_deps = [ | 1634 public_deps = [ |
1599 ":platform", | 1635 ":platform", |
1600 "//cc", | 1636 "//cc", |
1601 "//cc:test_support", | 1637 "//cc:test_support", |
1602 "//cc/blink", | 1638 "//cc/blink", |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1787 sources += [ "scroll/ScrollAnimatorTest.cpp" ] | 1823 sources += [ "scroll/ScrollAnimatorTest.cpp" ] |
1788 } | 1824 } |
1789 | 1825 |
1790 if (use_default_render_theme) { | 1826 if (use_default_render_theme) { |
1791 sources += [ "scroll/ScrollbarThemeAuraTest.cpp" ] | 1827 sources += [ "scroll/ScrollbarThemeAuraTest.cpp" ] |
1792 } | 1828 } |
1793 | 1829 |
1794 sources += [ "testing/RunAllTests.cpp" ] | 1830 sources += [ "testing/RunAllTests.cpp" ] |
1795 | 1831 |
1796 configs += [ | 1832 configs += [ |
| 1833 ":blink_platform_pch", |
1797 "//third_party/WebKit/Source/wtf:wtf_config", | 1834 "//third_party/WebKit/Source/wtf:wtf_config", |
1798 "//third_party/WebKit/Source:config", | 1835 "//third_party/WebKit/Source:config", |
1799 ] | 1836 ] |
1800 | 1837 |
1801 deps = [ | 1838 deps = [ |
1802 ":blink_common", | 1839 ":blink_common", |
1803 ":platform", | 1840 ":platform", |
1804 ":test_support", | 1841 ":test_support", |
1805 "//base", | 1842 "//base", |
1806 "//base/test:test_support", | 1843 "//base/test:test_support", |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2015 "graphics/ImageDecodingStoreTest.cpp", | 2052 "graphics/ImageDecodingStoreTest.cpp", |
2016 "graphics/ImageFrameGeneratorTest.cpp", | 2053 "graphics/ImageFrameGeneratorTest.cpp", |
2017 "graphics/ImageLayerChromiumTest.cpp", | 2054 "graphics/ImageLayerChromiumTest.cpp", |
2018 "graphics/gpu/DrawingBufferSoftwareRenderingTest.cpp", | 2055 "graphics/gpu/DrawingBufferSoftwareRenderingTest.cpp", |
2019 "graphics/test/FakeGLES2Interface.h", | 2056 "graphics/test/FakeGLES2Interface.h", |
2020 "graphics/test/FakeWebGraphicsContext3DProvider.h", | 2057 "graphics/test/FakeWebGraphicsContext3DProvider.h", |
2021 "graphics/test/MockImageDecoder.h", | 2058 "graphics/test/MockImageDecoder.h", |
2022 ] | 2059 ] |
2023 | 2060 |
2024 configs += [ | 2061 configs += [ |
| 2062 ":blink_platform_pch", |
2025 "//third_party/WebKit/Source:config", | 2063 "//third_party/WebKit/Source:config", |
2026 "//third_party/WebKit/Source:inside_blink", | 2064 "//third_party/WebKit/Source:inside_blink", |
2027 ] | 2065 ] |
2028 | 2066 |
2029 deps = [ | 2067 deps = [ |
2030 ":test_support", | 2068 ":test_support", |
2031 "//cc/surfaces:surface_id", | 2069 "//cc/surfaces:surface_id", |
2032 "//testing/gmock", | 2070 "//testing/gmock", |
2033 "//testing/gtest", | 2071 "//testing/gtest", |
2034 ] | 2072 ] |
2035 } | 2073 } |
OLD | NEW |