diff options
Diffstat (limited to 'mojo/edk/system/BUILD.gn')
-rw-r--r-- | mojo/edk/system/BUILD.gn | 208 |
1 files changed, 208 insertions, 0 deletions
diff --git a/mojo/edk/system/BUILD.gn b/mojo/edk/system/BUILD.gn new file mode 100644 index 0000000..b2df53a --- /dev/null +++ b/mojo/edk/system/BUILD.gn @@ -0,0 +1,208 @@ +# 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("../mojo_edk.gni") +import("//testing/test.gni") +import("../../../third_party/mojo/src/mojo/public/tools/bindings/mojom.gni") + +if (is_android) { + import("//build/config/android/config.gni") + import("//build/config/android/rules.gni") +} + +config("system_config") { + defines = [ + # Ensures that dependent projects import the core functions on Windows. + "MOJO_USE_SYSTEM_IMPL", + ] +} + +mojom("master") { + sources = [ + "master.mojom", + ] +} + +static_library("system") { +# TODO(use_chrome_edk): this should be a component to match third_party, +# but since third_party includes it, we either make it a static library +# or we have to change the export macros to be different than third_party. +#component("system") { + # TODO(use_chrome_edk): remove "2" + output_name = "mojo_system_impl2" + + sources = [ + "async_waiter.cc", + "async_waiter.h", + "awakable.h", + "awakable_list.cc", + "awakable_list.h", + "configuration.cc", + "configuration.h", + "core.cc", + "core.h", + "data_pipe.cc", + "data_pipe.h", + "data_pipe_consumer_dispatcher.cc", + "data_pipe_consumer_dispatcher.h", + "data_pipe_producer_dispatcher.cc", + "data_pipe_producer_dispatcher.h", + "dispatcher.cc", + "dispatcher.h", + "handle_signals_state.h", + "handle_table.cc", + "handle_table.h", + "mapping_table.cc", + "mapping_table.h", + "master_impl.cc", + "master_impl.h", + "message_in_transit.cc", + "message_in_transit.h", + "message_in_transit_queue.cc", + "message_in_transit_queue.h", + "message_pipe_dispatcher.cc", + "message_pipe_dispatcher.h", + "options_validation.h", + "platform_handle_dispatcher.cc", + "platform_handle_dispatcher.h", + "raw_channel.cc", + "raw_channel.h", + "raw_channel_posix.cc", + "raw_channel_win.cc", + "shared_buffer_dispatcher.cc", + "shared_buffer_dispatcher.h", + "simple_dispatcher.cc", + "simple_dispatcher.h", + "transport_data.cc", + "transport_data.h", + "waiter.cc", + "waiter.h", + ] + + defines = [ + "MOJO_SYSTEM_IMPL_IMPLEMENTATION", + "MOJO_SYSTEM_IMPLEMENTATION", + ] + + all_dependent_configs = [ ":system_config" ] + + public_deps = [ + "../embedder", + "../embedder:delegates", + "../embedder:platform", + "../../../third_party/mojo/src/mojo/public/c/system", + "../../../third_party/mojo/src/mojo/public/cpp/system", + ] + + deps = [ + "//base", + "//base/third_party/dynamic_annotations", + ":master", + ] + + if (is_win) { + cflags = [ "/wd4324" ] # Structure was padded due to __declspec(align()), + # which is uninteresting. + } + + allow_circular_includes_from = [ "../embedder" ] +} + +group("tests") { + testonly = true + deps = [ + # TODO(use_chrome_edk): remove "2" + ":mojo_system_unittests2", + ":mojo_message_pipe_perftests2", + ] +} + +mojo_edk_source_set("test_utils") { + testonly = true + + sources = [ + "test_utils.cc", + "test_utils.h", + ] + + public_deps = [ + "//third_party/mojo/src/mojo/public/c/system", + "//third_party/mojo/src/mojo/public/cpp/system", + ] + + deps = [ + "//base", + "//base/test:test_support", + "//mojo/edk/test:test_support", + "//testing/gtest:gtest", + ] +} + +# TODO(use_chrome_edk): remove "2" +test("mojo_system_unittests2") { + sources = [ + "../test/multiprocess_test_helper_unittest.cc", + "awakable_list_unittest.cc", + "core_test_base.cc", + "core_test_base.h", + "core_unittest.cc", + "data_pipe_unittest.cc", + "dispatcher_unittest.cc", + "master_impl_unittest.cc", + + "message_in_transit_queue_unittest.cc", + "message_in_transit_test_utils.cc", + "message_in_transit_test_utils.h", + "message_pipe_test_utils.cc", + "message_pipe_test_utils.h", + "message_pipe_unittest.cc", + "multiprocess_message_pipe_unittest.cc", + "options_validation_unittest.cc", + "platform_handle_dispatcher_unittest.cc", + + "raw_channel_unittest.cc", + "run_all_unittests.cc", + "shared_buffer_dispatcher_unittest.cc", + "simple_dispatcher_unittest.cc", + "waiter_test_utils.cc", + "waiter_test_utils.h", + "waiter_unittest.cc", + ] + + deps = [ + ":system", + ":test_utils", + + # TODO(use_chrome_edk): remove "2" + "../embedder:embedder_unittests2", + "../../../third_party/mojo/src/mojo/public/cpp/environment:standalone", + "../test:test_support", + "//base", + "//base/test:test_support", + "//testing/gtest", + ] + + # TODO(use_chrome_edk): remove "2" + allow_circular_includes_from = [ "../embedder:embedder_unittests2" ] +} + +# TODO(use_chrome_edk): remove "2" +test("mojo_message_pipe_perftests2") { + sources = [ + "message_pipe_perftest.cc", + "message_pipe_test_utils.cc", + "message_pipe_test_utils.h", + ] + + deps = [ + ":system", + ":test_utils", + "../test:test_support", + "../test:run_all_perftests", + "../../../third_party/mojo/src/mojo/public/cpp/environment:standalone", + "//base", + "//base/test:test_support", + "//testing/gtest", + ] +} |