| # Copyright 2017 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. |
| |
| assert(current_os == "fuchsia") |
| |
| # Declare a driver module target. |
| # |
| # This target allows you to create an object file that can be used as a driver |
| # that is loaded at runtime. |
| # |
| # Flags: cflags, cflags_c, cflags_cc, asmflags, defines, include_dirs, |
| # ldflags, lib_dirs, libs, |
| # Deps: data_deps, deps, public_deps |
| # Dependent configs: all_dependent_configs, public_configs |
| # General: check_includes, configs, data, inputs, output_name, |
| # output_extension, public, sources, testonly, visibility |
| template("driver_module") { |
| loadable_module(target_name) { |
| _target_type = "driver_module" |
| |
| # Explicitly forward visibility, implicitly forward everything else. |
| # See comment in //build/config/BUILDCONFIG.gn for details on this pattern. |
| forward_variables_from(invoker, [ "visibility" ]) |
| forward_variables_from(invoker, "*", [ "visibility" ]) |
| } |
| } |
| |
| set_defaults("driver_module") { |
| # Sets the default configs for driver_module, which can be modified later |
| # by the invoker. This overrides the loadable_module default. |
| configs = default_shared_library_configs |
| } |