| # Copyright 2019 The Fuchsia 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.gni") |
| import("//build/config/fuchsia/rules.gni") |
| import("//build/dist/resource.gni") |
| |
| import("//src/connectivity/weave/weavestack/weavestack_package.gni") |
| |
| template("weavestack_lib") { |
| source_set(target_name) { |
| sources = [ |
| "app.cc", |
| "app.h", |
| "fidl/bootstrap_impl.cc", |
| "fidl/bootstrap_impl.h", |
| "fidl/stack_impl.cc", |
| "fidl/stack_impl.h", |
| "fidl/stack_provider_impl.cc", |
| "fidl/stack_provider_impl.h", |
| "fidl/stack_utils.cc", |
| "fidl/stack_utils.h", |
| ] |
| |
| public_deps = [ |
| "//sdk/fidl/fuchsia.net.interfaces", |
| "//sdk/fidl/fuchsia.weave", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/syslog/cpp", |
| "//src/lib/files", |
| "//src/lib/fsl", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| |
| if (invoker.is_shared) { |
| public_deps += [ "//src/connectivity/weave/adaptation:adaptation.shared" ] |
| } else { |
| public_deps += |
| [ "//src/connectivity/weave/adaptation:adaptation.sources" ] |
| } |
| |
| # TODO(66404): UBSan has found an instance of undefined behavior in this target. |
| # Disable UBSan for this target temporarily until it is migrated into CI/CQ. |
| configs += [ "//build/config:temporarily_disable_ubsan_do_not_use" ] |
| } |
| } |
| |
| weavestack_lib("lib.static") { |
| is_shared = false |
| } |
| |
| weavestack_lib("lib.shared") { |
| is_shared = true |
| } |
| |
| executable("bin") { |
| output_name = "weavestack" |
| sources = [ "main.cc" ] |
| deps = [ ":lib.shared" ] |
| } |
| |
| resource("default_environment_schema") { |
| sources = [ "data/default_environment_schema.json" ] |
| outputs = [ "data/default_environment_schema.json" ] |
| } |
| |
| # The default weavestack package contains no applets. |
| weavestack_package("weavestack") { |
| } |
| |
| config_data("config") { |
| for_pkg = "weavestack" |
| sources = [ |
| "config/default_environment.json", |
| "config/device_info.json", |
| ] |
| } |
| |
| config_data("sysmgr_config") { |
| for_pkg = "sysmgr" |
| sources = [ "config/weavestack_sysmgr.config" ] |
| outputs = [ "weavestack.config" ] |
| } |