| 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 import("../../../mojo/public/tools/bindings/mojom.gni") | 6 import("../../../mojo/public/tools/bindings/mojom.gni") |
| 7 | 7 |
| 8 if (is_android) { | 8 if (is_android) { |
| 9 import("//build/config/android/config.gni") | 9 import("//build/config/android/config.gni") |
| 10 import("//build/config/android/rules.gni") | 10 import("//build/config/android/rules.gni") |
| 11 } | 11 } |
| 12 | 12 |
| 13 config("system_config") { | 13 config("system_config") { |
| 14 defines = [ | 14 defines = [ |
| 15 # Ensures that dependent projects import the core functions on Windows. | 15 # Ensures that dependent projects import the core functions on Windows. |
| 16 "MOJO_USE_SYSTEM_IMPL", | 16 "MOJO_USE_SYSTEM_IMPL", |
| 17 ] | 17 ] |
| 18 } | 18 } |
| 19 | 19 |
| 20 static_library("system") { | 20 component("system") { |
| 21 # TODO(use_chrome_edk): this should be a component to match third_party, | 21 output_name = "mojo_system_impl" |
| 22 # but since third_party includes it, we either make it a static library | |
| 23 # or we have to change the export macros to be different than third_party. | |
| 24 #component("system") { | |
| 25 # TODO(use_chrome_edk): remove "2" | |
| 26 output_name = "mojo_system_impl2" | |
| 27 | 22 |
| 28 sources = [ | 23 sources = [ |
| 29 "async_waiter.cc", | 24 "async_waiter.cc", |
| 30 "async_waiter.h", | 25 "async_waiter.h", |
| 31 "awakable.h", | 26 "awakable.h", |
| 32 "awakable_list.cc", | 27 "awakable_list.cc", |
| 33 "awakable_list.h", | 28 "awakable_list.h", |
| 34 "broker.h", | 29 "broker.h", |
| 35 "broker_host.h", | 30 "broker_host.h", |
| 36 "broker_host_posix.cc", | 31 "broker_host_posix.cc", |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 ] | 73 ] |
| 79 | 74 |
| 80 defines = [ | 75 defines = [ |
| 81 "MOJO_SYSTEM_IMPL_IMPLEMENTATION", | 76 "MOJO_SYSTEM_IMPL_IMPLEMENTATION", |
| 82 "MOJO_SYSTEM_IMPLEMENTATION", | 77 "MOJO_SYSTEM_IMPLEMENTATION", |
| 83 ] | 78 ] |
| 84 | 79 |
| 85 all_dependent_configs = [ ":system_config" ] | 80 all_dependent_configs = [ ":system_config" ] |
| 86 | 81 |
| 87 public_deps = [ | 82 public_deps = [ |
| 88 "../../../mojo/public/c/system", | 83 "//mojo/edk/embedder", |
| 89 "../../../mojo/public/cpp/system", | 84 "//mojo/edk/embedder:delegates", |
| 90 "../embedder", | 85 "//mojo/edk/embedder:platform", |
| 91 "../embedder:delegates", | 86 "//mojo/edk/system/ports", |
| 92 "../embedder:platform", | 87 "//mojo/public/c/system", |
| 93 "ports", | 88 "//mojo/public/cpp/system", |
| 94 ] | 89 ] |
| 95 | 90 |
| 96 deps = [ | 91 deps = [ |
| 97 "//base", | 92 "//base", |
| 98 "//base/third_party/dynamic_annotations", | 93 "//base/third_party/dynamic_annotations", |
| 99 "//crypto", | 94 "//crypto", |
| 100 ] | 95 ] |
| 101 | 96 |
| 102 if (is_win) { | 97 if (is_win) { |
| 103 cflags = [ "/wd4324" ] # Structure was padded due to __declspec(align()), | 98 cflags = [ "/wd4324" ] # Structure was padded due to __declspec(align()), |
| 104 # which is uninteresting. | 99 # which is uninteresting. |
| 105 } | 100 } |
| 106 | 101 |
| 107 allow_circular_includes_from = [ "../embedder" ] | 102 allow_circular_includes_from = [ "//mojo/edk/embedder" ] |
| 108 } | 103 } |
| 109 | 104 |
| 110 group("tests") { | 105 group("tests") { |
| 111 testonly = true | 106 testonly = true |
| 112 deps = [ | 107 deps = [ |
| 113 # TODO(use_chrome_edk): remove "2" | 108 ":mojo_message_pipe_perftests", |
| 114 ":mojo_message_pipe_perftests2", | 109 ":mojo_system_unittests", |
| 115 ":mojo_system_unittests2", | |
| 116 ] | 110 ] |
| 117 } | 111 } |
| 118 | 112 |
| 119 source_set("test_utils") { | 113 source_set("test_utils") { |
| 120 testonly = true | 114 testonly = true |
| 121 | 115 |
| 122 sources = [ | 116 sources = [ |
| 123 "test_utils.cc", | 117 "test_utils.cc", |
| 124 "test_utils.h", | 118 "test_utils.h", |
| 125 ] | 119 ] |
| 126 | 120 |
| 127 public_deps = [ | 121 public_deps = [ |
| 128 "//mojo/public/c/system", | 122 "//mojo/public/c/system", |
| 129 "//mojo/public/cpp/system", | 123 "//mojo/public/cpp/system", |
| 130 ] | 124 ] |
| 131 | 125 |
| 132 deps = [ | 126 deps = [ |
| 133 "//base", | 127 "//base", |
| 134 "//base/test:test_support", | 128 "//base/test:test_support", |
| 135 "//mojo/edk/test:test_support", | 129 "//mojo/edk/test:test_support", |
| 136 "//testing/gtest:gtest", | 130 "//testing/gtest:gtest", |
| 137 ] | 131 ] |
| 138 } | 132 } |
| 139 | 133 |
| 140 # TODO(use_chrome_edk): remove "2" | 134 test("mojo_system_unittests") { |
| 141 test("mojo_system_unittests2") { | |
| 142 sources = [ | 135 sources = [ |
| 143 "awakable_list_unittest.cc", | 136 "awakable_list_unittest.cc", |
| 144 "core_test_base.cc", | 137 "core_test_base.cc", |
| 145 "core_test_base.h", | 138 "core_test_base.h", |
| 146 "core_unittest.cc", | 139 "core_unittest.cc", |
| 147 "data_pipe_unittest.cc", | 140 "data_pipe_unittest.cc", |
| 148 "message_pipe_test_utils.cc", | |
| 149 "message_pipe_test_utils.h", | |
| 150 "message_pipe_unittest.cc", | 141 "message_pipe_unittest.cc", |
| 151 "multiprocess_message_pipe_unittest.cc", | |
| 152 "options_validation_unittest.cc", | 142 "options_validation_unittest.cc", |
| 153 "platform_handle_dispatcher_unittest.cc", | 143 "platform_handle_dispatcher_unittest.cc", |
| 154 "shared_buffer_dispatcher_unittest.cc", | 144 "shared_buffer_dispatcher_unittest.cc", |
| 155 "shared_buffer_unittest.cc", | 145 "shared_buffer_unittest.cc", |
| 156 "wait_set_dispatcher_unittest.cc", | 146 "wait_set_dispatcher_unittest.cc", |
| 157 "waiter_test_utils.cc", | 147 "waiter_test_utils.cc", |
| 158 "waiter_test_utils.h", | 148 "waiter_test_utils.h", |
| 159 "waiter_unittest.cc", | 149 "waiter_unittest.cc", |
| 160 ] | 150 ] |
| 161 | 151 |
| 152 if (!is_ios) { |
| 153 sources += [ "multiprocess_message_pipe_unittest.cc" ] |
| 154 } |
| 155 |
| 156 deps = [ |
| 157 ":test_utils", |
| 158 "//base", |
| 159 "//base/test:test_support", |
| 160 "//mojo/edk/embedder:embedder_unittests", |
| 161 "//mojo/edk/system", |
| 162 "//mojo/edk/test:run_all_unittests", |
| 163 "//mojo/edk/test:test_support", |
| 164 "//mojo/public/cpp/environment:standalone", |
| 165 "//testing/gtest", |
| 166 ] |
| 167 |
| 168 allow_circular_includes_from = [ "//mojo/edk/embedder:embedder_unittests" ] |
| 169 } |
| 170 |
| 171 test("mojo_message_pipe_perftests") { |
| 172 sources = [ |
| 173 "message_pipe_perftest.cc", |
| 174 ] |
| 175 |
| 162 deps = [ | 176 deps = [ |
| 163 ":test_utils", | 177 ":test_utils", |
| 164 | |
| 165 # TODO(use_chrome_edk): remove "2" | |
| 166 "../../../mojo/public/cpp/environment:standalone", | |
| 167 "../embedder:embedder_unittests2", | |
| 168 "../test:test_support", | |
| 169 "//base", | 178 "//base", |
| 170 "//base/test:test_support", | 179 "//base/test:test_support", |
| 171 "//mojo/edk/test:run_all_unittests", | 180 "//mojo/edk/system", |
| 181 "//mojo/edk/test:run_all_perftests", |
| 182 "//mojo/edk/test:test_support", |
| 183 "//mojo/public/cpp/environment:standalone", |
| 172 "//testing/gtest", | 184 "//testing/gtest", |
| 173 | |
| 174 # TODO(use_chrome_edk): temporary since the Mojo wrapper primitives are | |
| 175 # declared in third party only for now. | |
| 176 "//third_party/mojo/src/mojo/edk/system", | |
| 177 ] | |
| 178 | |
| 179 # TODO(use_chrome_edk): remove "2" | |
| 180 allow_circular_includes_from = [ "../embedder:embedder_unittests2" ] | |
| 181 } | |
| 182 | |
| 183 # TODO(use_chrome_edk): remove "2" | |
| 184 test("mojo_message_pipe_perftests2") { | |
| 185 sources = [ | |
| 186 "message_pipe_perftest.cc", | |
| 187 "message_pipe_test_utils.cc", | |
| 188 "message_pipe_test_utils.h", | |
| 189 ] | |
| 190 | |
| 191 deps = [ | |
| 192 ":test_utils", | |
| 193 "../../../mojo/public/cpp/environment:standalone", | |
| 194 "../test:run_all_perftests", | |
| 195 "../test:test_support", | |
| 196 "//base", | |
| 197 "//base/test:test_support", | |
| 198 "//testing/gtest", | |
| 199 | |
| 200 # TODO(use_chrome_edk): temporary since the Mojo wrapper primitives are | |
| 201 # declared in third party only for now. | |
| 202 "//third_party/mojo/src/mojo/edk/system", | |
| 203 ] | 185 ] |
| 204 } | 186 } |
| OLD | NEW |