diff options
32 files changed, 202 insertions, 621 deletions
diff --git a/mojo/edk/embedder/BUILD.gn b/mojo/edk/embedder/BUILD.gn index feb1b63..4b29824 100644 --- a/mojo/edk/embedder/BUILD.gn +++ b/mojo/edk/embedder/BUILD.gn @@ -2,9 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("../mojo_edk.gni") - -mojo_edk_source_set("embedder") { +source_set("embedder") { # This isn't really a standalone target; it must be linked into the # mojo_system_impl component. visibility = [ @@ -32,7 +30,7 @@ mojo_edk_source_set("embedder") { "MOJO_SYSTEM_IMPLEMENTATION", ] - configs = [ "//mojo/edk/system:system_config" ] + configs += [ "//mojo/edk/system:system_config" ] public_deps = [ ":delegates", @@ -45,7 +43,7 @@ mojo_edk_source_set("embedder") { ] } -mojo_edk_source_set("platform") { +source_set("platform") { # This isn't really a standalone target; it must be linked into the # mojo_system_impl component. visibility = [ @@ -80,7 +78,7 @@ mojo_edk_source_set("platform") { defines = [ "MOJO_SYSTEM_IMPL_IMPLEMENTATION" ] - configs = [ "//mojo/edk/system:system_config" ] + configs += [ "//mojo/edk/system:system_config" ] public_deps = [ "//mojo/public/cpp/system", @@ -95,7 +93,7 @@ mojo_edk_source_set("platform") { } } -mojo_edk_source_set("delegates") { +source_set("delegates") { # This isn't really a standalone target; it must be linked into the # mojo_system_impl component. visibility = [ @@ -109,7 +107,7 @@ mojo_edk_source_set("delegates") { defines = [ "MOJO_SYSTEM_IMPL_IMPLEMENTATION" ] - configs = [ "//mojo/edk/system:system_config" ] + configs += [ "//mojo/edk/system:system_config" ] public_deps = [ "//mojo/public/cpp/system", @@ -117,7 +115,7 @@ mojo_edk_source_set("delegates") { } # TODO(use_chrome_edk): remove "2" -mojo_edk_source_set("embedder_unittests2") { +source_set("embedder_unittests2") { testonly = true # TODO(use_chrome_edk): remove "2". Also enable this visibility check when we diff --git a/mojo/edk/js/BUILD.gn b/mojo/edk/js/BUILD.gn index 0c3f6ad..9acb481 100644 --- a/mojo/edk/js/BUILD.gn +++ b/mojo/edk/js/BUILD.gn @@ -2,8 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("../mojo_edk.gni") - # TODO(hansmuller): The organization of tests in this directory is weird: # * Really, js_unittests tests public stuff, so that should live in public # and be reworked as some sort of apptest. @@ -19,7 +17,7 @@ group("tests") { ] } -mojo_edk_source_set("js") { +source_set("js") { sources = [ "core.cc", "core.h", @@ -50,7 +48,7 @@ mojo_edk_source_set("js") { ] } -mojo_edk_source_set("js_unittests") { +source_set("js_unittests") { testonly = true sources = [ "handle_unittest.cc", diff --git a/mojo/edk/js/tests/BUILD.gn b/mojo/edk/js/tests/BUILD.gn index 8d4a959..f58f3c3 100644 --- a/mojo/edk/js/tests/BUILD.gn +++ b/mojo/edk/js/tests/BUILD.gn @@ -2,10 +2,9 @@ # 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("../../../../mojo/public/tools/bindings/mojom.gni") -mojo_edk_source_set("js_to_cpp_tests") { +source_set("js_to_cpp_tests") { testonly = true deps = [ diff --git a/mojo/edk/mojo_edk.gni b/mojo/edk/mojo_edk.gni deleted file mode 100644 index 60d6e9f..0000000 --- a/mojo/edk/mojo_edk.gni +++ /dev/null @@ -1,59 +0,0 @@ -# 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/public/mojo_sdk.gni") - -# A mojo_edk_source_set is a mojo_sdk_source_set that does not restrict -# external dependencies and understands the following additional variables, all -# of which admit a list of the relevant elements specified relative to the -# location of the Mojo EDK: -template("mojo_edk_source_set") { - mojo_sdk_source_set(target_name) { - if (defined(invoker.public_deps) || defined(invoker.deps)) { - restrict_external_deps = false - } - - if (defined(invoker.visibility)) { - visibility = invoker.visibility - } - if (defined(invoker.testonly)) { - testonly = invoker.testonly - } - if (defined(invoker.sources)) { - sources = invoker.sources - } - if (defined(invoker.defines)) { - defines = invoker.defines - } - if (defined(invoker.public_configs)) { - public_configs = invoker.public_configs - } - - configs = [] - if (defined(invoker.configs)) { - configs = invoker.configs - } - - allow_circular_includes_from = [] - if (defined(invoker.allow_circular_includes_from)) { - allow_circular_includes_from += invoker.allow_circular_includes_from - } - - if (defined(invoker.public_deps)) { - public_deps = invoker.public_deps - } - mojo_sdk_public_deps = [] - if (defined(invoker.mojo_sdk_public_deps)) { - mojo_sdk_public_deps += invoker.mojo_sdk_public_deps - } - - if (defined(invoker.deps)) { - deps = invoker.deps - } - mojo_sdk_deps = [] - if (defined(invoker.mojo_sdk_deps)) { - mojo_sdk_deps += invoker.mojo_sdk_deps - } - } -} diff --git a/mojo/edk/system/BUILD.gn b/mojo/edk/system/BUILD.gn index 358a9fa..11a3a8f 100644 --- a/mojo/edk/system/BUILD.gn +++ b/mojo/edk/system/BUILD.gn @@ -2,7 +2,6 @@ # 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("../../../mojo/public/tools/bindings/mojom.gni") @@ -122,7 +121,7 @@ group("tests") { ] } -mojo_edk_source_set("test_utils") { +source_set("test_utils") { testonly = true sources = [ diff --git a/mojo/edk/test/BUILD.gn b/mojo/edk/test/BUILD.gn index 5f8ec77..9a52c99 100644 --- a/mojo/edk/test/BUILD.gn +++ b/mojo/edk/test/BUILD.gn @@ -2,10 +2,9 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//mojo/edk/mojo_edk.gni") import("//testing/test.gni") -mojo_edk_source_set("test_support") { +source_set("test_support") { testonly = true sources = [ "multiprocess_test_helper.cc", @@ -29,7 +28,7 @@ mojo_edk_source_set("test_support") { ] } -mojo_edk_source_set("run_all_unittests") { +source_set("run_all_unittests") { testonly = true sources = [ "run_all_unittests.cc", @@ -49,7 +48,7 @@ mojo_edk_source_set("run_all_unittests") { ] } -mojo_edk_source_set("run_all_perftests") { +source_set("run_all_perftests") { testonly = true deps = [ ":test_support_impl", @@ -67,7 +66,7 @@ mojo_edk_source_set("run_all_perftests") { ] } -mojo_edk_source_set("test_support_impl") { +source_set("test_support_impl") { testonly = true deps = [ "//base", diff --git a/mojo/public/c/environment/BUILD.gn b/mojo/public/c/environment/BUILD.gn index 3fd1689..26e8256 100644 --- a/mojo/public/c/environment/BUILD.gn +++ b/mojo/public/c/environment/BUILD.gn @@ -2,13 +2,13 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("../../mojo_sdk.gni") - -mojo_sdk_source_set("environment") { +source_set("environment") { sources = [ "async_waiter.h", "logger.h", ] - mojo_sdk_deps = [ "mojo/public/c/system" ] + deps = [ + "//mojo/public/c/system", + ] } diff --git a/mojo/public/c/gles2/BUILD.gn b/mojo/public/c/gles2/BUILD.gn index eb7a6f2..a009d00 100644 --- a/mojo/public/c/gles2/BUILD.gn +++ b/mojo/public/c/gles2/BUILD.gn @@ -2,13 +2,11 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("../../mojo_sdk.gni") - config("gles2_config") { defines = [ "GLES2_USE_MOJO" ] } -mojo_sdk_source_set("gles2") { +source_set("gles2") { sources = [ "chromium_extension.h", "gles2.h", @@ -20,8 +18,8 @@ mojo_sdk_source_set("gles2") { public_configs = [ ":gles2_config" ] - mojo_sdk_public_deps = [ - "mojo/public/c/environment", - "mojo/public/c/system", + public_deps = [ + "//mojo/public/c/environment", + "//mojo/public/c/system", ] } diff --git a/mojo/public/c/gpu/BUILD.gn b/mojo/public/c/gpu/BUILD.gn index c12b92a..07e00d1 100644 --- a/mojo/public/c/gpu/BUILD.gn +++ b/mojo/public/c/gpu/BUILD.gn @@ -2,8 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("../../mojo_sdk.gni") - config("gpu_configs") { include_dirs = [ "." ] defines = [ "GLES2_USE_MOJO" ] @@ -30,16 +28,18 @@ group("gpu_onscreen") { ] } -mojo_sdk_source_set("MGL") { +source_set("MGL") { sources = [ "MGL/mgl.h", "MGL/mgl_types.h", ] - mojo_sdk_public_deps = [ "mojo/public/c/system" ] + public_deps = [ + "//mojo/public/c/system", + ] } -mojo_sdk_source_set("MGL_onscreen") { +source_set("MGL_onscreen") { sources = [ "MGL/mgl_onscreen.h", ] diff --git a/mojo/public/c/system/BUILD.gn b/mojo/public/c/system/BUILD.gn index 51fc58d..f31964a 100644 --- a/mojo/public/c/system/BUILD.gn +++ b/mojo/public/c/system/BUILD.gn @@ -2,13 +2,11 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("../../mojo_sdk.gni") - # Depend on this target to use the types etc defined in the system without # linking against a specific implementation of the system. To link against a # particular implementation, use the :for_component or # :for_shared_library targets, depending on the type of target you are. -mojo_sdk_source_set("system") { +source_set("system") { sources = [ "buffer.h", "core.h", diff --git a/mojo/public/c/system/tests/BUILD.gn b/mojo/public/c/system/tests/BUILD.gn index bb3cc5e..9f55259 100644 --- a/mojo/public/c/system/tests/BUILD.gn +++ b/mojo/public/c/system/tests/BUILD.gn @@ -2,9 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("../../../mojo_sdk.gni") - -mojo_sdk_source_set("tests") { +source_set("tests") { testonly = true visibility = [ @@ -19,16 +17,13 @@ mojo_sdk_source_set("tests") { ] deps = [ + "//mojo/public/c/environment", + "//mojo/public/c/system", "//testing/gtest", ] - - mojo_sdk_deps = [ - "mojo/public/c/environment", - "mojo/public/c/system", - ] } -mojo_sdk_source_set("perftests") { +source_set("perftests") { testonly = true sources = [ @@ -36,14 +31,11 @@ mojo_sdk_source_set("perftests") { ] deps = [ + "//mojo/public/c/environment", + "//mojo/public/cpp/environment:standalone", + "//mojo/public/cpp/system", + "//mojo/public/cpp/test_support:test_utils", + "//mojo/public/cpp/utility", "//testing/gtest", ] - - mojo_sdk_deps = [ - "mojo/public/c/environment", - "mojo/public/cpp/environment:standalone", - "mojo/public/cpp/system", - "mojo/public/cpp/test_support:test_utils", - "mojo/public/cpp/utility", - ] } diff --git a/mojo/public/cpp/bindings/BUILD.gn b/mojo/public/cpp/bindings/BUILD.gn index 89679f2..6438960 100644 --- a/mojo/public/cpp/bindings/BUILD.gn +++ b/mojo/public/cpp/bindings/BUILD.gn @@ -2,9 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("../../mojo_sdk.gni") - -mojo_sdk_source_set("bindings") { +source_set("bindings") { sources = [ "array.h", "associated_interface_ptr_info.h", @@ -67,19 +65,16 @@ mojo_sdk_source_set("bindings") { public_deps = [ ":callback", + "//mojo/public/cpp/system", ] - mojo_sdk_public_deps = [ - "mojo/public/cpp/system", - ] - - mojo_sdk_deps = [ - "mojo/public/cpp/environment", - "mojo/public/interfaces/bindings:bindings_cpp_sources", + deps = [ + "//mojo/public/cpp/environment", + "//mojo/public/interfaces/bindings:bindings_cpp_sources", ] } -mojo_sdk_source_set("callback") { +source_set("callback") { sources = [ "callback.h", "lib/callback_internal.h", @@ -91,5 +86,7 @@ mojo_sdk_source_set("callback") { "lib/thread_checker_posix.h", ] - mojo_sdk_deps = [ "mojo/public/cpp/system" ] + deps = [ + "//mojo/public/cpp/system", + ] } diff --git a/mojo/public/cpp/bindings/tests/BUILD.gn b/mojo/public/cpp/bindings/tests/BUILD.gn index 1bc018c..30b631ba 100644 --- a/mojo/public/cpp/bindings/tests/BUILD.gn +++ b/mojo/public/cpp/bindings/tests/BUILD.gn @@ -3,9 +3,8 @@ # found in the LICENSE file. import("../../../mojo_application.gni") -import("../../../mojo_sdk.gni") -mojo_sdk_source_set("tests") { +source_set("tests") { testonly = true sources = [ @@ -39,22 +38,19 @@ mojo_sdk_source_set("tests") { ":mojo_public_bindings_test_utils", "//mojo/environment:chromium", "//mojo/message_pump", + "//mojo/public/cpp/bindings", + "//mojo/public/cpp/bindings:callback", + "//mojo/public/cpp/system", + "//mojo/public/cpp/test_support:test_utils", + "//mojo/public/cpp/utility", + "//mojo/public/interfaces/bindings/tests:test_associated_interfaces", + "//mojo/public/interfaces/bindings/tests:test_interfaces", + "//mojo/public/interfaces/bindings/tests:test_interfaces_experimental", "//testing/gtest", ] - - mojo_sdk_deps = [ - "mojo/public/cpp/bindings", - "mojo/public/cpp/bindings:callback", - "mojo/public/cpp/system", - "mojo/public/cpp/test_support:test_utils", - "mojo/public/cpp/utility", - "mojo/public/interfaces/bindings/tests:test_associated_interfaces", - "mojo/public/interfaces/bindings/tests:test_interfaces", - "mojo/public/interfaces/bindings/tests:test_interfaces_experimental", - ] } -mojo_sdk_source_set("perftests") { +source_set("perftests") { testonly = true sources = [ @@ -62,25 +58,24 @@ mojo_sdk_source_set("perftests") { ] deps = [ + "//mojo/public/cpp/bindings", + "//mojo/public/cpp/bindings:callback", + "//mojo/public/cpp/environment:standalone", + "//mojo/public/cpp/system", + "//mojo/public/cpp/test_support:test_utils", + "//mojo/public/cpp/utility", + "//mojo/public/interfaces/bindings/tests:test_interfaces", "//testing/gtest", ] - - mojo_sdk_deps = [ - "mojo/public/cpp/bindings", - "mojo/public/cpp/bindings:callback", - "mojo/public/cpp/environment:standalone", - "mojo/public/cpp/system", - "mojo/public/cpp/test_support:test_utils", - "mojo/public/cpp/utility", - "mojo/public/interfaces/bindings/tests:test_interfaces", - ] } -mojo_sdk_source_set("mojo_public_bindings_test_utils") { +source_set("mojo_public_bindings_test_utils") { sources = [ "validation_test_input_parser.cc", "validation_test_input_parser.h", ] - mojo_sdk_deps = [ "mojo/public/c/system" ] + deps = [ + "//mojo/public/c/system", + ] } diff --git a/mojo/public/cpp/environment/BUILD.gn b/mojo/public/cpp/environment/BUILD.gn index fe3a011..e2dfc91 100644 --- a/mojo/public/cpp/environment/BUILD.gn +++ b/mojo/public/cpp/environment/BUILD.gn @@ -2,9 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("../../mojo_sdk.gni") - -mojo_sdk_source_set("environment") { +source_set("environment") { sources = [ "async_waiter.h", "environment.h", @@ -12,15 +10,17 @@ mojo_sdk_source_set("environment") { "task_tracker.h", ] - mojo_sdk_public_deps = [ "mojo/public/c/environment" ] + public_deps = [ + "//mojo/public/c/environment", + ] - mojo_sdk_deps = [ - "mojo/public/cpp/bindings:callback", - "mojo/public/cpp/system", + deps = [ + "//mojo/public/cpp/bindings:callback", + "//mojo/public/cpp/system", ] } -mojo_sdk_source_set("standalone") { +source_set("standalone") { sources = [ "lib/async_waiter.cc", "lib/default_async_waiter.cc", @@ -39,9 +39,9 @@ mojo_sdk_source_set("standalone") { ":environment", ] - mojo_sdk_deps = [ - "mojo/public/c/environment", - "mojo/public/cpp/system", - "mojo/public/cpp/utility", + deps = [ + "//mojo/public/c/environment", + "//mojo/public/cpp/system", + "//mojo/public/cpp/utility", ] } diff --git a/mojo/public/cpp/environment/tests/BUILD.gn b/mojo/public/cpp/environment/tests/BUILD.gn index 10fd056..717c657 100644 --- a/mojo/public/cpp/environment/tests/BUILD.gn +++ b/mojo/public/cpp/environment/tests/BUILD.gn @@ -2,9 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("../../../mojo_sdk.gni") - -mojo_sdk_source_set("tests") { +source_set("tests") { testonly = true sources = [ @@ -15,15 +13,12 @@ mojo_sdk_source_set("tests") { ] deps = [ + "//mojo/public/c/environment", + "//mojo/public/cpp/bindings:callback", + "//mojo/public/cpp/environment:standalone", + "//mojo/public/cpp/system", + "//mojo/public/cpp/test_support:test_utils", + "//mojo/public/cpp/utility", "//testing/gtest", ] - - mojo_sdk_deps = [ - "mojo/public/c/environment", - "mojo/public/cpp/bindings:callback", - "mojo/public/cpp/environment:standalone", - "mojo/public/cpp/system", - "mojo/public/cpp/test_support:test_utils", - "mojo/public/cpp/utility", - ] } diff --git a/mojo/public/cpp/system/BUILD.gn b/mojo/public/cpp/system/BUILD.gn index e120462..91b8b28 100644 --- a/mojo/public/cpp/system/BUILD.gn +++ b/mojo/public/cpp/system/BUILD.gn @@ -2,9 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("../../mojo_sdk.gni") - -mojo_sdk_source_set("system") { +source_set("system") { sources = [ "buffer.h", "core.h", @@ -15,5 +13,7 @@ mojo_sdk_source_set("system") { "message_pipe.h", ] - mojo_sdk_public_deps = [ "mojo/public/c/system" ] + public_deps = [ + "//mojo/public/c/system", + ] } diff --git a/mojo/public/cpp/system/tests/BUILD.gn b/mojo/public/cpp/system/tests/BUILD.gn index 3b6058c..068f009 100644 --- a/mojo/public/cpp/system/tests/BUILD.gn +++ b/mojo/public/cpp/system/tests/BUILD.gn @@ -2,9 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("../../../mojo_sdk.gni") - -mojo_sdk_source_set("tests") { +source_set("tests") { testonly = true sources = [ @@ -13,13 +11,10 @@ mojo_sdk_source_set("tests") { ] deps = [ + "//mojo/public/c/system/tests", + "//mojo/public/cpp/environment:standalone", + "//mojo/public/cpp/system", + "//mojo/public/cpp/test_support:test_utils", "//testing/gtest", ] - - mojo_sdk_deps = [ - "mojo/public/c/system/tests", - "mojo/public/cpp/environment:standalone", - "mojo/public/cpp/system", - "mojo/public/cpp/test_support:test_utils", - ] } diff --git a/mojo/public/cpp/test_support/BUILD.gn b/mojo/public/cpp/test_support/BUILD.gn index a1f7d31..308b803 100644 --- a/mojo/public/cpp/test_support/BUILD.gn +++ b/mojo/public/cpp/test_support/BUILD.gn @@ -2,10 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("../../mojo_sdk.gni") - # GYP version: mojo/public/mojo_public.gyp:mojo_public_test_utils -mojo_sdk_source_set("test_utils") { +source_set("test_utils") { testonly = true sources = [ @@ -15,11 +13,8 @@ mojo_sdk_source_set("test_utils") { ] deps = [ + "//mojo/public/c/test_support", + "//mojo/public/cpp/system", "//testing/gtest", ] - - mojo_sdk_deps = [ - "mojo/public/c/test_support", - "mojo/public/cpp/system", - ] } diff --git a/mojo/public/cpp/utility/BUILD.gn b/mojo/public/cpp/utility/BUILD.gn index 96c1d11..c95efac 100644 --- a/mojo/public/cpp/utility/BUILD.gn +++ b/mojo/public/cpp/utility/BUILD.gn @@ -2,9 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("../../mojo_sdk.gni") - -mojo_sdk_source_set("utility") { +source_set("utility") { sources = [ "lib/mutex.cc", "lib/run_loop.cc", @@ -18,9 +16,9 @@ mojo_sdk_source_set("utility") { "thread.h", ] - mojo_sdk_deps = [ - "mojo/public/cpp/bindings:callback", - "mojo/public/cpp/system", + deps = [ + "//mojo/public/cpp/bindings:callback", + "//mojo/public/cpp/system", ] if (is_win) { diff --git a/mojo/public/cpp/utility/tests/BUILD.gn b/mojo/public/cpp/utility/tests/BUILD.gn index acbbc9f..d324a57 100644 --- a/mojo/public/cpp/utility/tests/BUILD.gn +++ b/mojo/public/cpp/utility/tests/BUILD.gn @@ -2,9 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("../../../mojo_sdk.gni") - -mojo_sdk_source_set("tests") { +source_set("tests") { testonly = true sources = [ @@ -12,16 +10,13 @@ mojo_sdk_source_set("tests") { ] deps = [ + "//mojo/public/cpp/environment:standalone", + "//mojo/public/cpp/system", + "//mojo/public/cpp/test_support:test_utils", + "//mojo/public/cpp/utility", "//testing/gtest", ] - mojo_sdk_deps = [ - "mojo/public/cpp/environment:standalone", - "mojo/public/cpp/system", - "mojo/public/cpp/test_support:test_utils", - "mojo/public/cpp/utility", - ] - # crbug.com/342893 if (!is_win) { sources += [ diff --git a/mojo/public/js/BUILD.gn b/mojo/public/js/BUILD.gn index 1cb1a60..4b86e6eb 100644 --- a/mojo/public/js/BUILD.gn +++ b/mojo/public/js/BUILD.gn @@ -2,9 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("../mojo_sdk.gni") - -mojo_sdk_source_set("js") { +source_set("js") { sources = [ "constants.cc", "constants.h", diff --git a/mojo/public/mojo_sdk.gni b/mojo/public/mojo_sdk.gni deleted file mode 100644 index 1c5d9d3..0000000 --- a/mojo/public/mojo_sdk.gni +++ /dev/null @@ -1,153 +0,0 @@ -# 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. - -# Takes as input a "source_set" that includes dependencies that are relative to -# the parent directory of the Mojo public SDK (given in |mojo_sdk_deps|). -# Generates a source_set that has the mojo_sdk_deps added as ordinary deps -# rebased to the current directory. -# By default, restricts the entries that are given in invoker.deps and -# invoker.public_deps to be only within the same file and on a small set of -# whitelisted external dependencies. This check can be elided by setting -# restrict_external_deps to false in the invoker. DO NOT DO THIS in -# //mojo/public. -# -# Example of a mojo_sdk_source_set: -# -# mojo_sdk_source_set("foo") { -# sources = [ -# "foo.h", -# "foo.cc", -# ] -# -# # Same-file deps are specified in the ordinary way. Any external -# dependencies are specified the same way (although in general there should -# be very few of these). -# deps = [ -# ":bar", -# ] -# -# # Mojo SDK deps are specified relative to the containing directory of the -# SDK via mojo_sdk_deps. -# mojo_sdk_deps = [ -# "mojo/public/cpp/bindings", -# "mojo/public/cpp/environment", -# "mojo/public/cpp/system", -# ] -# } -# -template("mojo_sdk_source_set") { - source_set(target_name) { - if (defined(invoker.visibility)) { - visibility = invoker.visibility - } else { - visibility = [ "*" ] - } - if (defined(invoker.mojo_edk_visibility)) { - foreach(edk_target, invoker.mojo_edk_visibility) { - # Check that the EDK target was not mistakenly given as an absolute - # path. - assert(get_path_info(edk_target, "abspath") != edk_target) - visibility += [ rebase_path(edk_target, ".", "//third_party/mojo/src") ] - } - } - - if (defined(invoker.testonly)) { - testonly = invoker.testonly - } - - if (defined(invoker.sources)) { - sources = invoker.sources - } - - if (defined(invoker.defines)) { - defines = invoker.defines - } - - if (defined(invoker.libs)) { - libs = invoker.libs - } - - public_configs = [] - if (defined(invoker.public_configs)) { - public_configs += invoker.public_configs - } - - if (defined(invoker.configs)) { - configs += invoker.configs - } - - if (defined(invoker.allow_circular_includes_from)) { - allow_circular_includes_from = invoker.allow_circular_includes_from - } - - if (defined(invoker.public_deps) || defined(invoker.deps)) { - restrict_external_deps = true - if (defined(invoker.restrict_external_deps)) { - restrict_external_deps = invoker.restrict_external_deps - } - } - - public_deps = [] - if (defined(invoker.public_deps)) { - foreach(dep, invoker.public_deps) { - if (restrict_external_deps) { - # The only deps that are not specified relative to the location of - # the Mojo SDK should be on targets within the same file or on a - # whitelisted set of external dependencies. - assert(get_path_info(dep, "dir") == ".") - } - public_deps += [ dep ] - } - } - if (defined(invoker.mojo_edk_public_deps)) { - foreach(edk_dep, invoker.mojo_edk_public_deps) { - # Check that the EDK dep was not mistakenly given as an absolute path. - assert(get_path_info(edk_dep, "abspath") != edk_dep) - public_deps += [ rebase_path(edk_dep, ".", "//third_party/mojo/src") ] - } - } - if (defined(invoker.mojo_sdk_public_deps)) { - foreach(sdk_dep, invoker.mojo_sdk_public_deps) { - # Check that the SDK dep was not mistakenly given as an absolute path. - assert(get_path_info(sdk_dep, "abspath") != sdk_dep) - public_deps += [ rebase_path(sdk_dep, ".", "//") ] - } - } - - deps = [] - if (defined(invoker.deps)) { - foreach(dep, invoker.deps) { - if (restrict_external_deps) { - # The only deps that are not specified relative to the location of - # the Mojo SDK should be on targets within the same file or on a - # whitelisted set of external dependencies. - dep_dir = get_path_info(dep, "dir") - assert(dep_dir == "." || dep == "//testing/gtest" || - dep == "//mojo/environment:chromium" || - dep == "//mojo/message_pump") - } - deps += [ dep ] - } - } - if (defined(invoker.mojo_edk_deps)) { - foreach(edk_dep, invoker.mojo_edk_deps) { - # Check that the EDK dep was not mistakenly given as an absolute path. - assert(get_path_info(edk_dep, "abspath") != edk_dep) - deps += [ rebase_path(edk_dep, ".", "//third_party/mojo/src") ] - } - } - if (defined(invoker.mojo_sdk_deps)) { - foreach(sdk_dep, invoker.mojo_sdk_deps) { - # Check that the SDK dep was not mistakenly given as an absolute path. - assert(get_path_info(sdk_dep, "abspath") != sdk_dep) - deps += [ rebase_path(sdk_dep, ".", "//") ] - } - } - - data_deps = [] - if (defined(invoker.data_deps)) { - data_deps = invoker.data_deps - } - } -} diff --git a/mojo/public/platform/nacl/BUILD.gn b/mojo/public/platform/nacl/BUILD.gn index 17edf32..ba29a79 100644 --- a/mojo/public/platform/nacl/BUILD.gn +++ b/mojo/public/platform/nacl/BUILD.gn @@ -4,28 +4,28 @@ assert(is_nacl) -import("../../mojo_sdk.gni") - # Untrusted code if (is_nacl) { # Thunk mapping the Mojo public API onto NaCl syscalls. - mojo_sdk_source_set("mojo") { + source_set("mojo") { sources = [ "libmojo.cc", "mojo_irt.h", ] - mojo_sdk_deps = [ "mojo/public/c/system" ] + deps = [ + "//mojo/public/c/system", + ] } - mojo_sdk_source_set("system") { + source_set("system") { sources = [ "mojo_initial_handle.h", "mojo_main_thunk.cc", ] - mojo_sdk_deps = [ - "mojo/public/c/system", - "mojo/public/platform/nacl:mojo", + deps = [ + "//mojo/public/c/system", + "//mojo/public/platform/nacl:mojo", ] } } diff --git a/mojo/public/platform/native/BUILD.gn b/mojo/public/platform/native/BUILD.gn index aded499..f7d31f5 100644 --- a/mojo/public/platform/native/BUILD.gn +++ b/mojo/public/platform/native/BUILD.gn @@ -4,15 +4,15 @@ assert(!defined(is_nacl) || !is_nacl) -import("../../mojo_sdk.gni") - -mojo_sdk_source_set("system") { +source_set("system") { sources = [ "system_thunks.cc", "system_thunks.h", ] defines = [ "MOJO_SYSTEM_IMPLEMENTATION" ] - mojo_sdk_deps = [ "mojo/public/c/system" ] + deps = [ + "//mojo/public/c/system", + ] # The GYP target analogous to this one builds this code into a # static library. When building for Android, both the GYP and GN @@ -24,7 +24,7 @@ mojo_sdk_source_set("system") { # source_set here, this flag change is not needed. } -mojo_sdk_source_set("gles2") { +source_set("gles2") { sources = [ "gles2_impl_chromium_extension_thunks.cc", "gles2_impl_chromium_extension_thunks.h", @@ -36,12 +36,12 @@ mojo_sdk_source_set("gles2") { defines = [ "MOJO_GLES2_IMPLEMENTATION" ] - configs = [ "//third_party/khronos:khronos_headers" ] + configs += [ "//third_party/khronos:khronos_headers" ] - mojo_sdk_deps = [ - "mojo/public/c/gles2", - "mojo/public/c/environment", - "mojo/public/c/system", + deps = [ + "//mojo/public/c/gles2", + "//mojo/public/c/environment", + "//mojo/public/c/system", ] if (is_mac) { @@ -50,24 +50,28 @@ mojo_sdk_source_set("gles2") { } } -mojo_sdk_source_set("gpu_thunks") { +source_set("gpu_thunks") { sources = [] } -mojo_sdk_source_set("mgl_thunks") { +source_set("mgl_thunks") { sources = [ "mgl_thunks.c", "mgl_thunks.h", ] - mojo_sdk_deps = [ "mojo/public/c/gpu:MGL" ] + deps = [ + "//mojo/public/c/gpu:MGL", + ] } -mojo_sdk_source_set("mgl_onscreen_thunks") { +source_set("mgl_onscreen_thunks") { sources = [ "mgl_onscreen_thunks.c", "mgl_onscreen_thunks.h", ] - mojo_sdk_deps = [ "mojo/public/c/gpu:MGL_onscreen" ] + deps = [ + "//mojo/public/c/gpu:MGL_onscreen", + ] } diff --git a/mojo/public/tools/bindings/mojom.gni b/mojo/public/tools/bindings/mojom.gni index 7143ef8..cd0b390 100644 --- a/mojo/public/tools/bindings/mojom.gni +++ b/mojo/public/tools/bindings/mojom.gni @@ -2,18 +2,10 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("../../mojo_sdk.gni") - # Generate C++/JavaScript/Java source files from mojom files. The output files # will go under the generated file directory tree with the same path as each # input file. # -# If a mojom target is intended for use in a client repo where the location of -# the Mojo SDK will be different than its location in the Mojo repo, -# dependencies on the SDK should be specified relative to the parent directory -# of the Mojo public SDK in |mojo_sdk_deps| rather than via absolute paths in -# |deps|. -# # Parameters: # # sources (optional if one of the deps sets listed below is present) @@ -22,19 +14,9 @@ import("../../mojo_sdk.gni") # deps (optional) # Note: this can contain only other mojom targets. # -# mojo_sdk_deps (optional) -# List of deps specified relative to the parent directory of the Mojo -# public SDK. These deps will be added as ordinary deps rebased to the -# current directory. -# # public_deps (optional) # Note: this can contain only other mojom targets. # -# mojo_sdk_public_deps (optional) -# List of public deps specified relative to the parent directory of the -# Mojo public SDK. These deps will be added as ordinary public deps -# rebased to the current directory. -# # import_dirs (optional) # List of import directories that will get added when processing sources. # @@ -49,8 +31,7 @@ import("../../mojo_sdk.gni") template("mojom") { assert( defined(invoker.sources) || defined(invoker.deps) || - defined(invoker.public_deps) || defined(invoker.mojo_sdk_deps) || - defined(invoker.mojo_sdk_public_deps), + defined(invoker.public_deps), "\"sources\" or \"deps\" must be defined for the $target_name template.") cpp_sources_suffix = "cpp_sources" @@ -132,24 +113,6 @@ template("mojom") { [ "{{source_gen_dir}}/{{source_name_part}}.mojom.srcjar" ] } - rebased_mojo_sdk_public_deps = [] - if (defined(invoker.mojo_sdk_public_deps)) { - foreach(sdk_dep, invoker.mojo_sdk_public_deps) { - # Check that the SDK dep was not mistakenly given as an absolute path. - assert(get_path_info(sdk_dep, "abspath") != sdk_dep) - rebased_mojo_sdk_public_deps += [ rebase_path(sdk_dep, ".", "//") ] - } - } - - rebased_mojo_sdk_deps = [] - if (defined(invoker.mojo_sdk_deps)) { - foreach(sdk_dep, invoker.mojo_sdk_deps) { - # Check that the SDK dep was not mistakenly given as an absolute path. - assert(get_path_info(sdk_dep, "abspath") != sdk_dep) - rebased_mojo_sdk_deps += [ rebase_path(sdk_dep, ".", "//") ] - } - } - if (defined(invoker.sources)) { generator_target_name = target_name + "__generator" action_foreach(generator_target_name) { @@ -197,7 +160,6 @@ template("mojom") { if (defined(invoker.sources)) { public_deps += [ ":${cpp_sources_target_name}" ] } - public_deps += rebased_mojo_sdk_public_deps if (defined(invoker.public_deps)) { public_deps += invoker.public_deps } @@ -206,20 +168,12 @@ template("mojom") { if (defined(invoker.sources)) { public_deps += [ ":$generator_target_name" ] } - deps += rebased_mojo_sdk_deps if (defined(invoker.deps)) { deps += invoker.deps } - if (defined(invoker.mojo_sdk_deps)) { - foreach(sdk_dep, invoker.mojo_sdk_deps) { - # Check that the SDK dep was not mistakenly given as an absolute path. - assert(get_path_info(sdk_dep, "abspath") != sdk_dep) - deps += [ rebase_path(sdk_dep, ".", "//") ] - } - } } - all_deps = rebased_mojo_sdk_deps + rebased_mojo_sdk_public_deps + all_deps = [] if (defined(invoker.deps)) { all_deps += invoker.deps } diff --git a/mojo/services/network/public/cpp/BUILD.gn b/mojo/services/network/public/cpp/BUILD.gn index cca613d..80262fc 100644 --- a/mojo/services/network/public/cpp/BUILD.gn +++ b/mojo/services/network/public/cpp/BUILD.gn @@ -2,10 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//mojo/public/mojo_sdk.gni") - -mojo_sdk_source_set("cpp") { - restrict_external_deps = false +source_set("cpp") { public_configs = [ "../../../public/build/config:mojo_services" ] sources = [ "udp_socket_wrapper.cc", diff --git a/third_party/mojo/src/mojo/edk/embedder/BUILD.gn b/third_party/mojo/src/mojo/edk/embedder/BUILD.gn index f54d9cb..94d561f 100644 --- a/third_party/mojo/src/mojo/edk/embedder/BUILD.gn +++ b/third_party/mojo/src/mojo/edk/embedder/BUILD.gn @@ -2,9 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("../mojo_edk.gni") - -mojo_edk_source_set("headers") { +source_set("headers") { sources = [ "channel_info_forward.h", "configuration.h", @@ -13,10 +11,13 @@ mojo_edk_source_set("headers") { ] } -mojo_edk_source_set("embedder") { +source_set("embedder") { # This isn't really a standalone target; it must be linked into the # mojo_system_impl component. - mojo_edk_visibility = [ "mojo/edk/system" ] + visibility = [ + "//components/nacl", + "//third_party/mojo/src/mojo/edk/system", + ] sources = [ "embedder.cc", @@ -35,27 +36,27 @@ mojo_edk_source_set("embedder") { "MOJO_SYSTEM_IMPLEMENTATION", ] - mojo_edk_configs = [ "mojo/edk/system:system_config" ] + configs += [ "//third_party/mojo/src/mojo/edk/system:system_config" ] public_deps = [ ":delegates", ":headers", ":platform", + "//mojo/public/cpp/system", ] - mojo_sdk_public_deps = [ "mojo/public/cpp/system" ] - deps = [ "//base", ] } -mojo_edk_source_set("platform") { +source_set("platform") { # This isn't really a standalone target; it must be linked into the # mojo_system_impl component. - visibility = [ ":embedder" ] - - mojo_edk_visibility = [ "mojo/edk/system" ] + visibility = [ + ":embedder", + "//third_party/mojo/src/mojo/edk/system", + ] sources = [ "platform_channel_pair.cc", @@ -84,9 +85,11 @@ mojo_edk_source_set("platform") { defines = [ "MOJO_SYSTEM_IMPL_IMPLEMENTATION" ] - mojo_edk_configs = [ "mojo/edk/system:system_config" ] + configs += [ "//third_party/mojo/src/mojo/edk/system:system_config" ] - mojo_sdk_public_deps = [ "mojo/public/cpp/system" ] + public_deps = [ + "//mojo/public/cpp/system", + ] deps = [ "//base", @@ -97,12 +100,13 @@ mojo_edk_source_set("platform") { } } -mojo_edk_source_set("delegates") { +source_set("delegates") { # This isn't really a standalone target; it must be linked into the # mojo_system_impl component. - visibility = [ ":embedder" ] - - mojo_edk_visibility = [ "mojo/edk/system" ] + visibility = [ + ":embedder", + "//third_party/mojo/src/mojo/edk/system", + ] sources = [ "master_process_delegate.h", @@ -114,14 +118,15 @@ mojo_edk_source_set("delegates") { defines = [ "MOJO_SYSTEM_IMPL_IMPLEMENTATION" ] - mojo_edk_configs = [ "mojo/edk/system:system_config" ] + configs += [ "//third_party/mojo/src/mojo/edk/system:system_config" ] - mojo_sdk_public_deps = [ "mojo/public/cpp/system" ] + public_deps = [ + "//mojo/public/cpp/system", + ] } -mojo_edk_source_set("embedder_unittests") { +source_set("embedder_unittests") { testonly = true - mojo_edk_visibility = [ "mojo/edk/system:mojo_system_unittests" ] sources = [ "embedder_unittest.cc", @@ -133,11 +138,8 @@ mojo_edk_source_set("embedder_unittests") { "//base", "//base/test:test_support", "//testing/gtest", - ] - - mojo_edk_deps = [ - "mojo/edk/test:test_support", - "mojo/edk/system", - "mojo/edk/system:test_utils", + "//third_party/mojo/src/mojo/edk/test:test_support", + "//third_party/mojo/src/mojo/edk/system", + "//third_party/mojo/src/mojo/edk/system:test_utils", ] } diff --git a/third_party/mojo/src/mojo/edk/js/BUILD.gn b/third_party/mojo/src/mojo/edk/js/BUILD.gn index ed1b81f..057c4e8 100644 --- a/third_party/mojo/src/mojo/edk/js/BUILD.gn +++ b/third_party/mojo/src/mojo/edk/js/BUILD.gn @@ -2,8 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("../mojo_edk.gni") - # TODO(hansmuller): The organization of tests in this directory is weird: # * Really, js_unittests tests public stuff, so that should live in public # and be reworked as some sort of apptest. @@ -18,7 +16,7 @@ group("tests") { ] } -mojo_edk_source_set("js") { +source_set("js") { sources = [ "core.cc", "core.h", @@ -43,26 +41,22 @@ mojo_edk_source_set("js") { "//v8", ] - mojo_sdk_deps = [ - "mojo/public/cpp/environment", - "mojo/public/cpp/system", + deps = [ + "//mojo/public/cpp/environment", + "//mojo/public/cpp/system", ] } -mojo_edk_source_set("js_unittests") { +source_set("js_unittests") { testonly = true sources = [ "handle_unittest.cc", ] deps = [ + "//mojo/public/cpp/system", "//testing/gtest", + "//third_party/mojo/src/mojo/edk/js", + "//third_party/mojo/src/mojo/edk/test:test_support", ] - - mojo_edk_deps = [ - "mojo/edk/js", - "mojo/edk/test:test_support", - ] - - mojo_sdk_deps = [ "mojo/public/cpp/system" ] } diff --git a/third_party/mojo/src/mojo/edk/js/tests/BUILD.gn b/third_party/mojo/src/mojo/edk/js/tests/BUILD.gn index d372a68..883cf4e 100644 --- a/third_party/mojo/src/mojo/edk/js/tests/BUILD.gn +++ b/third_party/mojo/src/mojo/edk/js/tests/BUILD.gn @@ -2,27 +2,20 @@ # 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("//mojo/public/tools/bindings/mojom.gni") -mojo_edk_source_set("js_to_cpp_tests") { +source_set("js_to_cpp_tests") { testonly = true deps = [ ":js_to_cpp_bindings", "//gin:gin_test", - ] - - mojo_edk_deps = [ - "mojo/edk/js", - "mojo/edk/test:test_support", - ] - - mojo_sdk_deps = [ - "mojo/public/cpp/bindings", - "mojo/public/cpp/system", - "mojo/public/interfaces/bindings/tests:test_interfaces", - "mojo/public/interfaces/bindings/tests:test_interfaces_experimental", + "//mojo/public/cpp/bindings", + "//mojo/public/cpp/system", + "//mojo/public/interfaces/bindings/tests:test_interfaces", + "//mojo/public/interfaces/bindings/tests:test_interfaces_experimental", + "//third_party/mojo/src/mojo/edk/js", + "//third_party/mojo/src/mojo/edk/test:test_support", ] sources = [ diff --git a/third_party/mojo/src/mojo/edk/mojo_edk.gni b/third_party/mojo/src/mojo/edk/mojo_edk.gni deleted file mode 100644 index 19133a9..0000000 --- a/third_party/mojo/src/mojo/edk/mojo_edk.gni +++ /dev/null @@ -1,93 +0,0 @@ -# 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/public/mojo_sdk.gni") - -# A mojo_edk_source_set is a mojo_sdk_source_set that does not restrict -# external dependencies and understands the following additional variables, all -# of which admit a list of the relevant elements specified relative to the -# location of the Mojo EDK: -# mojo_edk_configs -# mojo_edk_public_deps -# mojo_edk_deps - -# Note that it is assumed that the Mojo EDK is a sibling of the Mojo SDK in a -# client repo; the distinctions made above are for the sake of clarity in -# writing targets. -template("mojo_edk_source_set") { - mojo_sdk_source_set(target_name) { - if (defined(invoker.public_deps) || defined(invoker.deps)) { - restrict_external_deps = false - } - - if (defined(invoker.visibility)) { - visibility = invoker.visibility - } - if (defined(invoker.mojo_edk_visibility)) { - mojo_edk_visibility = invoker.mojo_edk_visibility - } - if (defined(invoker.testonly)) { - testonly = invoker.testonly - } - if (defined(invoker.sources)) { - sources = invoker.sources - } - if (defined(invoker.defines)) { - defines = invoker.defines - } - if (defined(invoker.public_configs)) { - public_configs = invoker.public_configs - } - - configs = [] - if (defined(invoker.configs)) { - configs = invoker.configs - } - if (defined(invoker.mojo_edk_configs)) { - foreach(edk_config, invoker.mojo_edk_configs) { - # Check that the EDK config was not mistakenly given as an absolute - # path. - assert(get_path_info(edk_config, "abspath") != edk_config) - configs += [ rebase_path(edk_config, ".", "//third_party/mojo/src") ] - } - } - - allow_circular_includes_from = [] - if (defined(invoker.allow_circular_includes_from)) { - allow_circular_includes_from += invoker.allow_circular_includes_from - } - - if (defined(invoker.public_deps)) { - public_deps = invoker.public_deps - } - mojo_edk_public_deps = [] - if (defined(invoker.mojo_edk_public_deps)) { - mojo_edk_public_deps += invoker.mojo_edk_public_deps - } - mojo_sdk_public_deps = [] - if (defined(invoker.mojo_sdk_public_deps)) { - mojo_sdk_public_deps += invoker.mojo_sdk_public_deps - } - - if (defined(invoker.deps)) { - deps = invoker.deps - } - mojo_edk_deps = [] - if (defined(invoker.mojo_edk_deps)) { - # The EDK is required to be a sibling of the SDK, so the relative - # dependencies are rewritten in the same way. - mojo_edk_deps += invoker.mojo_edk_deps - } - mojo_sdk_deps = [] - if (defined(invoker.mojo_sdk_deps)) { - mojo_sdk_deps += invoker.mojo_sdk_deps - } - } -} - -# Build EDK things with static thread annotation analysis enabled. -# TODO(vtl): Should we set this at a higher level? -if (is_clang) { - cflags = [ "-Wthread-safety" ] -} diff --git a/third_party/mojo/src/mojo/edk/system/BUILD.gn b/third_party/mojo/src/mojo/edk/system/BUILD.gn index 961eec0..c782a78 100644 --- a/third_party/mojo/src/mojo/edk/system/BUILD.gn +++ b/third_party/mojo/src/mojo/edk/system/BUILD.gn @@ -2,7 +2,6 @@ # 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") if (is_android) { @@ -151,7 +150,7 @@ group("tests") { ] } -mojo_edk_source_set("test_utils") { +source_set("test_utils") { testonly = true sources = [ @@ -159,9 +158,9 @@ mojo_edk_source_set("test_utils") { "test_utils.h", ] - mojo_sdk_public_deps = [ - "mojo/public/c/system", - "mojo/public/cpp/system", + public_deps = [ + "//mojo/public/c/system", + "//mojo/public/cpp/system", ] deps = [ diff --git a/third_party/mojo/src/mojo/edk/test/BUILD.gn b/third_party/mojo/src/mojo/edk/test/BUILD.gn index 73351a0..05e5904 100644 --- a/third_party/mojo/src/mojo/edk/test/BUILD.gn +++ b/third_party/mojo/src/mojo/edk/test/BUILD.gn @@ -2,10 +2,9 @@ # 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") -mojo_edk_source_set("test_support") { +source_set("test_support") { testonly = true sources = [ "multiprocess_test_helper.cc", @@ -21,14 +20,15 @@ mojo_edk_source_set("test_support") { "//base", "//base/test:test_support", "//testing/gtest", + "//third_party/mojo/src/mojo/edk/system", ] - mojo_edk_deps = [ "mojo/edk/system" ] - - mojo_sdk_public_deps = [ "mojo/public/cpp/system" ] + public_deps = [ + "//mojo/public/cpp/system", + ] } -mojo_edk_source_set("run_all_unittests") { +source_set("run_all_unittests") { testonly = true sources = [ "run_all_unittests.cc", @@ -38,42 +38,36 @@ mojo_edk_source_set("run_all_unittests") { ":test_support_impl", "//base", "//base/test:test_support", + "//mojo/public/c/test_support", "//testing/gtest", + "//third_party/mojo/src/mojo/edk/system", ] - - mojo_edk_deps = [ "mojo/edk/system" ] - - mojo_sdk_deps = [ "mojo/public/c/test_support" ] } -mojo_edk_source_set("run_all_perftests") { +source_set("run_all_perftests") { testonly = true deps = [ ":test_support_impl", "//base", "//base/test:test_support", + "//mojo/public/c/test_support", + "//third_party/mojo/src/mojo/edk/system", ] - mojo_edk_deps = [ "mojo/edk/system" ] - - mojo_sdk_deps = [ "mojo/public/c/test_support" ] - sources = [ "run_all_perftests.cc", ] } -mojo_edk_source_set("test_support_impl") { +source_set("test_support_impl") { testonly = true deps = [ "//base", "//base/test:test_support", + "//mojo/public/c/test_support", + "//mojo/public/cpp/system", ] - mojo_sdk_deps = [ "mojo/public/c/test_support" ] - - mojo_sdk_public_deps = [ "mojo/public/cpp/system" ] - sources = [ "test_support_impl.cc", "test_support_impl.h", |