diff options
-rw-r--r-- | BUILD.gn | 12 | ||||
-rw-r--r-- | content/BUILD.gn | 36 | ||||
-rw-r--r-- | content/app/BUILD.gn | 62 | ||||
-rw-r--r-- | content/content.gni | 12 | ||||
-rw-r--r-- | content/gpu/BUILD.gn | 73 | ||||
-rw-r--r-- | content/plugin/BUILD.gn | 44 | ||||
-rw-r--r-- | content/ppapi_plugin/BUILD.gn | 34 | ||||
-rw-r--r-- | content/public/app/BUILD.gn | 25 | ||||
-rw-r--r-- | content/public/plugin/BUILD.gn | 9 | ||||
-rw-r--r-- | content/public/utility/BUILD.gn | 21 | ||||
-rw-r--r-- | content/utility/BUILD.gn | 24 | ||||
-rw-r--r-- | content/worker/BUILD.gn | 34 | ||||
-rw-r--r-- | courgette/BUILD.gn | 137 | ||||
-rw-r--r-- | third_party/libva/BUILD.gn | 8 | ||||
-rw-r--r-- | third_party/lzma_sdk/BUILD.gn | 56 |
15 files changed, 578 insertions, 9 deletions
@@ -35,12 +35,7 @@ group("root") { "//components/translate:translate_core_browser", "//components/translate:translate_core_common", "//components/url_matcher", - "//content/public/browser", - "//content/public/child", - "//content/public/common", - "//content/public/renderer", - "//content/browser/service_worker:database_proto", - "//content/browser/speech/proto", + "//content", "//crypto", "//extensions/common/api:extensions_api", "//dbus", @@ -75,6 +70,7 @@ group("root") { "//third_party/libwebp", "//third_party/libxslt", "//third_party/libyuv", + "//third_party/lzma_sdk", "//third_party/mesa", "//third_party/ots", "//third_party/protobuf:protobuf_lite", @@ -134,9 +130,7 @@ group("root") { if (is_android) { deps -= [ "//cc", - "//content/public/browser", - "//content/public/common", - "//content/public/renderer", + "//content", "//dbus", "//extensions/common/api:extensions_api", "//pdf", # Not compiled on Android in GYP yet, either. diff --git a/content/BUILD.gn b/content/BUILD.gn index e3f779be..b4f81b3 100644 --- a/content/BUILD.gn +++ b/content/BUILD.gn @@ -9,10 +9,46 @@ config("content_implementation") { defines = [ "CONTENT_IMPLEMENTATION" ] } +content_components = [ + "//content/app", + "//content/browser", + "//content/child", + "//content/gpu", + "//content/plugin", + "//content/ppapi_plugin", + "//content/public/app", + "//content/public/browser", + "//content/public/child", + "//content/public/plugin", + "//content/public/renderer", + "//content/renderer", + "//content/utility", + "//content/worker", +] + +if (is_component_build) { + shared_library("content") { + deps = content_components + } +} else { + group("content") { + deps = content_components + } +} + grit("resources") { source = "content_resources.grd" } +# This target exists to "hold" the content_export header so we can do proper +# inclusion testing of it. +source_set("export") { + visibility = "//content/*" + sources = [ + "content/common/content_export.h" + ] +} + # Stubs ------------------------------------------------------------------------ # TODO(brettw) remove this and add a proper dependency on libjingle once that diff --git a/content/app/BUILD.gn b/content/app/BUILD.gn new file mode 100644 index 0000000..13efa00 --- /dev/null +++ b/content/app/BUILD.gn @@ -0,0 +1,62 @@ +# Copyright 2014 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. + +source_set("app") { + sources = [ + "android/app_jni_registrar.cc", + "android/app_jni_registrar.h", + "android/child_process_service.cc", + "android/child_process_service.h", + "android/content_main.cc", + "android/content_main.h", + "android/library_loader_hooks.cc", + "content_main.cc", + "content_main_runner.cc", + "mojo/mojo_init.cc", + "mojo/mojo_init.h", + "startup_helper_win.cc", + ] + + configs += [ "//content:content_implementation" ] + + deps = [ + "//base", + "//base:i18n", + # This is needed by app/content_main_runner.cc + # TODO(brettw) this shouldn't be here, only final executables should be + # picking the allocator. + "//base/allocator", + "//content:export", + "//crypto", + "//ui/base", + "//ui/gfx", + "//ui/gfx/geometry", + ] + + if (is_win) { + deps += [ "//sandbox" ] + } else if (is_android) { + sources -= [ "content_main.cc" ] + deps += [ + "//content:content_jni_headers", + "//skia", + "//third_party/android_tools:cpu_features" + ] + } + + if (is_ios) { + sources -= [ + "content_main.cc", + "mojo/mojo_init.cc", + "mojo/mojo_init.h", + ] + } else { + deps += [ + "//mojo/environment:chromium", + "//mojo/public/interfaces/service_provider:service_provider", + "//mojo/service_manager", + "//mojo/system", + ] + } +} diff --git a/content/content.gni b/content/content.gni new file mode 100644 index 0000000..cd1b86e --- /dev/null +++ b/content/content.gni @@ -0,0 +1,12 @@ +# Copyright 2014 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. + +if (is_win) { + directxsdk_exists = + (exec_script("//build/dir_exists.py", + [ rebase_path("//third_party/directxsdk", root_build_dir) ], + "trim string") == "True") +} else { + directxsdk_exists = false +} diff --git a/content/gpu/BUILD.gn b/content/gpu/BUILD.gn new file mode 100644 index 0000000..6a47b73 --- /dev/null +++ b/content/gpu/BUILD.gn @@ -0,0 +1,73 @@ +# Copyright 2014 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. + +import("//content/content.gni") + +# We don't support x64 prior to Win7 and D3DCompiler_43.dll is not needed on +# Vista+. +need_d3dcompiler = (is_win && cpu_arch == "x86" && directxsdk_exists) + +source_set("gpu") { + visibility = "//content/*" + sources = [ + "gpu_main.cc", + "gpu_process.cc", + "gpu_process.h", + "gpu_child_thread.cc", + "gpu_child_thread.h", + "gpu_watchdog_thread.cc", + "gpu_watchdog_thread.h", + "in_process_gpu_thread.cc", + "in_process_gpu_thread.h", + ] + + configs += [ "//content:content_implementation" ] + + deps = [ + "//base", + "//content:export", + "//mojo/public/interfaces/service_provider", + "//skia", + "//ui/gl", + ] + + if (is_win) { + configs += [ + "//third_party/khronos:khronos_headers", + "//third_party/wtl:wtl_includes", + ] + libs = [ "setupapi.lib" ] + deps += [ + "//third_party/angle:libEGL", + "//third_party/angle:libGLESv2", + ] + } + + if (need_d3dcompiler) { + deps += [ ":extract_d3dcompiler" ] + } + + if (is_chromeos && cpu_arch != "arm") { + configs += [ "//third_party/libva/libva_config" ] + } +} + +if (need_d3dcompiler) { + action("extract_d3dcompiler") { + visibility = ":*" + script = "//build/extract_from_cab.py" + + cabfile = "//third_party/directxsdk/files/Redist/Jun2010_D3DCompiler_43_x86.cab" + dllfile = "D3DCompiler_43.dll" + + source_prereqs = [ cabfile ] + outputs = [ "$root_out_dir/$dllfile" ] + + args = [ + rebase_path(cabfile, root_build_dir), + dllfile, + rebase_path(root_out_dir, root_build_dir), + ] + } +} diff --git a/content/plugin/BUILD.gn b/content/plugin/BUILD.gn new file mode 100644 index 0000000..6235dbf --- /dev/null +++ b/content/plugin/BUILD.gn @@ -0,0 +1,44 @@ +# Copyright 2014 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. + +import("//build/config/features.gni") + +# This is the NPAPI plugin process. It isn't used on Linux. +if (enable_plugins && !is_linux) { + source_set("plugin") { + visibility = "//content/*" + sources = [ + "plugin_channel.cc", + "plugin_channel.h", + "plugin_interpose_util_mac.mm", + "plugin_interpose_util_mac.h", + "plugin_main.cc", + "plugin_main_mac.mm", + "plugin_thread.cc", + "plugin_thread.h", + "webplugin_accelerated_surface_proxy_mac.cc", + "webplugin_accelerated_surface_proxy_mac.h", + "webplugin_delegate_stub.cc", + "webplugin_delegate_stub.h", + "webplugin_proxy.cc", + "webplugin_proxy.h", + ] + + configs += [ "//content:content_implementation" ] + + deps = [ + "//content:export", + "//mojo/public/interfaces/service_provider", + "//skia", + "//third_party/npapi", + #"//third_party/WebKit/public:blink", TODO(GYP) + # TODO(GYP) remove this when blink is enabled: + "//third_party/WebKit/public:blink_headers", + ] + } +} else { + # This way it can be unconditionally depended on. + group("plugin") { + } +} diff --git a/content/ppapi_plugin/BUILD.gn b/content/ppapi_plugin/BUILD.gn new file mode 100644 index 0000000..b39141c --- /dev/null +++ b/content/ppapi_plugin/BUILD.gn @@ -0,0 +1,34 @@ +# Copyright 2014 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. + +source_set("ppapi_plugin") { + sources = [ + "broker_process_dispatcher.cc", + "broker_process_dispatcher.h", + "plugin_process_dispatcher.cc", + "plugin_process_dispatcher.h", + "ppapi_broker_main.cc", + "ppapi_plugin_main.cc", + "ppapi_thread.cc", + "ppapi_thread.h", + "ppapi_webkitplatformsupport_impl.cc", + "ppapi_webkitplatformsupport_impl.h", + ] + + configs += [ "//content:content_implementation" ] + + deps = [ + "//base", + "//content:export", + "//mojo/public/interfaces/service_provider", + "//ppapi:ppapi_ipc", + "//third_party/icu", + #"//third_party/WebKit/public:blink", TODO(GYP) + # TODO(GYP) remove this when blink is enabled: + "//third_party/WebKit/public:blink_headers", + "//ui/base", + "//ui/gfx", + "//ui/gfx/geometry", + ] +} diff --git a/content/public/app/BUILD.gn b/content/public/app/BUILD.gn new file mode 100644 index 0000000..37d2847 --- /dev/null +++ b/content/public/app/BUILD.gn @@ -0,0 +1,25 @@ +# Copyright 2014 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. + +source_set("app") { + sources = [ + "android_library_loader_hooks.h", + "content_main.h", + "content_main_delegate.cc", + "content_main_delegate.h", + "content_main_runner.h", + "startup_helper_win.h", + ] + + configs += [ "//content:content_implementation" ] + + deps = [ + "//base", + "//base:i18n", + "//content:export", + "//content/public/plugin", + "//content/public/renderer", + "//content/public/utility", + ] +} diff --git a/content/public/plugin/BUILD.gn b/content/public/plugin/BUILD.gn new file mode 100644 index 0000000..059aea6 --- /dev/null +++ b/content/public/plugin/BUILD.gn @@ -0,0 +1,9 @@ +# Copyright 2014 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. + +source_set("plugin") { + sources = [ + "content_plugin_client.h", + ] +} diff --git a/content/public/utility/BUILD.gn b/content/public/utility/BUILD.gn new file mode 100644 index 0000000..f61994b --- /dev/null +++ b/content/public/utility/BUILD.gn @@ -0,0 +1,21 @@ +# Copyright 2014 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. + +source_set("utility") { + sources = [ + "content_utility_client.cc", + "content_utility_client.h", + "utility_thread.cc", + "utility_thread.h", + ] + + configs += [ "//content:content_implementation" ] + + deps = [ + "//base", + "//content:export", + "//ipc", + ] +} + diff --git a/content/utility/BUILD.gn b/content/utility/BUILD.gn new file mode 100644 index 0000000..1cc0ead --- /dev/null +++ b/content/utility/BUILD.gn @@ -0,0 +1,24 @@ +# Copyright 2014 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. + +source_set("utility") { + sources = [ + "in_process_utility_thread.cc", + "in_process_utility_thread.h", + "utility_main.cc", + "utility_thread_impl.cc", + "utility_thread_impl.h", + ] + + configs += [ "//content:content_implementation" ] + + deps = [ + "//base", + "//content:export", + "//courgette:courgette_lib", + "//mojo/public/interfaces/service_provider", + "//third_party/WebKit/public:blink_headers", + ] +} + diff --git a/content/worker/BUILD.gn b/content/worker/BUILD.gn new file mode 100644 index 0000000..23cfcff --- /dev/null +++ b/content/worker/BUILD.gn @@ -0,0 +1,34 @@ +# Copyright 2014 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. + +source_set("worker") { + visibility = "//content/*" + sources = [ + "websharedworker_stub.cc", + "websharedworker_stub.h", + "websharedworkerclient_proxy.cc", + "websharedworkerclient_proxy.h", + "worker_main.cc", + "shared_worker_permission_client_proxy.cc", + "shared_worker_permission_client_proxy.h", + "worker_thread.cc", + "worker_thread.h", + "worker_webapplicationcachehost_impl.cc", + "worker_webapplicationcachehost_impl.h", + "worker_webkitplatformsupport_impl.cc", + "worker_webkitplatformsupport_impl.h", + ] + + configs += [ "//content:content_implementation" ] + + deps = [ + "//base", + "//mojo/public/interfaces/service_provider", + "//skia", + #"//third_party/WebKit/public:blink", TODO(GYP) + # TODO(GYP) remove this when blink is enabled: + "//third_party/WebKit/public:blink_headers", + ] +} + diff --git a/courgette/BUILD.gn b/courgette/BUILD.gn new file mode 100644 index 0000000..b4bbd2b --- /dev/null +++ b/courgette/BUILD.gn @@ -0,0 +1,137 @@ +# Copyright 2014 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. + +static_library("courgette_lib") { + sources = [ + "adjustment_method.cc", + "adjustment_method_2.cc", + "adjustment_method.h", + "assembly_program.cc", + "assembly_program.h", + "third_party/bsdiff.h", + "third_party/bsdiff_apply.cc", + "third_party/bsdiff_create.cc", + "third_party/paged_array.h", + "courgette.h", + "crc.cc", + "crc.h", + "difference_estimator.cc", + "difference_estimator.h", + "disassembler.cc", + "disassembler.h", + "disassembler_elf_32.cc", + "disassembler_elf_32.h", + "disassembler_elf_32_arm.cc", + "disassembler_elf_32_arm.h", + "disassembler_elf_32_x86.cc", + "disassembler_elf_32_x86.h", + "disassembler_win32_x86.cc", + "disassembler_win32_x86.h", + "disassembler_win32_x64.cc", + "disassembler_win32_x64.h", + "encoded_program.cc", + "encoded_program.h", + "ensemble.cc", + "ensemble.h", + "ensemble_apply.cc", + "ensemble_create.cc", + "memory_allocator.cc", + "memory_allocator.h", + "region.h", + "simple_delta.cc", + "simple_delta.h", + "streams.cc", + "streams.h", + "types_elf.h", + "types_win_pe.h", + "patch_generator_x86_32.h", + "patcher_x86_32.h", + ] + + deps = [ + "//base", + "//third_party/lzma_sdk", + ] +} + +executable("courgette") { + if (is_win && cpu_arch == "x64") { + # The build infrastructure needs courgette to be named courgette64. + output_name = "courgette64" + } + + sources = [ + "courgette_tool.cc", + ] + + if (is_win) { + ldflags = [ "/LARGEADDRESSAWARE" ] + } + + deps = [ + ":courgette_lib", + "//base", + ] +} + +executable("courgette_minimal_tool") { + sources = [ + "courgette_minimal_tool.cc", + ] + + deps = [ + ":courgette_lib", + "//base", + ] +} + +test("courgette_unittests") { + sources = [ + "adjustment_method_unittest.cc", + "bsdiff_memory_unittest.cc", + "base_test_unittest.cc", + "base_test_unittest.h", + "difference_estimator_unittest.cc", + "disassembler_elf_32_x86_unittest.cc", + "disassembler_win32_x86_unittest.cc", + "disassembler_win32_x64_unittest.cc", + "encoded_program_unittest.cc", + "encode_decode_unittest.cc", + "ensemble_unittest.cc", + "streams_unittest.cc", + "typedrva_unittest.cc", + "versioning_unittest.cc", + "third_party/paged_array_unittest.cc" + ] + + if (is_win) { + # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. + cflags += [ "/wd4267" ] + } + + deps = [ + ":courgette_lib", + "//base", + "//base:i18n", + "//base/allocator", + "//base/test:run_all_unittests", + "//base/test:test_support", + "//testing/gtest", + ] +} + +test("courgette_fuzz") { + sources = [ + "base_test_unittest.cc", + "base_test_unittest.h", + "encoded_program_fuzz_unittest.cc", + ] + deps = [ + ":courgette_lib", + "//base", + "//base:i18n", + "//base/test:test_support", + "//testing/gtest", + ] +} diff --git a/third_party/libva/BUILD.gn b/third_party/libva/BUILD.gn new file mode 100644 index 0000000..61e7098 --- /dev/null +++ b/third_party/libva/BUILD.gn @@ -0,0 +1,8 @@ +# Copyright 2014 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. + +# Add this config to targets that need to use the libva headers. +config("libva_config") { + include_dirs = [ "." ] +} diff --git a/third_party/lzma_sdk/BUILD.gn b/third_party/lzma_sdk/BUILD.gn new file mode 100644 index 0000000..38a07e1 --- /dev/null +++ b/third_party/lzma_sdk/BUILD.gn @@ -0,0 +1,56 @@ +# Copyright 2014 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. + +config("lzma_sdk_config") { + include_dirs = [ "." ] +} + +static_library("lzma_sdk") { + sources = [ + "7z.h", + "7zAlloc.c", + "7zAlloc.h", + "7zBuf.c", + "7zBuf.h", + "7zCrc.c", + "7zCrc.h", + "7zCrcOpt.c", + "7zDec.c", + "7zFile.c", + "7zFile.h", + "7zIn.c", + "7zStream.c", + "Alloc.c", + "Alloc.h", + "Bcj2.c", + "Bcj2.h", + "Bra.c", + "Bra.h", + "Bra86.c", + "CpuArch.c", + "CpuArch.h", + "LzFind.c", + "LzFind.h", + "LzHash.h", + "Lzma2Dec.c", + "Lzma2Dec.h", + "LzmaEnc.c", + "LzmaEnc.h", + "LzmaDec.c", + "LzmaDec.h", + "LzmaLib.c", + "LzmaLib.h", + "Types.h", + ] + + defines = [ + "_7ZIP_ST", + "_LZMA_PROB32", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + + direct_dependent_configs = [ ":lzma_sdk_config" ] +} |