This is liable to change in the future.A halide_library() rule represents a set of Halide sources, along with the "compiler" code needed to compile them into object format (see the Halide site for information about Halide and about static compilation of Halide pipelines). The object code will be generated for the target architecture.
The short name for this build target.
The set of halide sources to compile for this rule. The sources will be compiled and linked for the host architecture, and the resulting binary will be run to produce the object code for the Halide pipeline.
The dependencies of the generated halide pipeline code. This is useful if, for exmaple, your pipeline calls an external function using Halide::Func::define_extern.
The dependencies of the halide compiler itself. Targets that depend on the halide_library rule will not include or link the outputs of these targets.
Flags to use when compiling any of the above sources (which require compilation).
Platform specific compiler flags. These should be specified as a list of pairs where the first element is an un-anchored regex (in java.util.regex.Pattern syntax) against which the platform name is matched, and the second element is a list of flags to use when compiling the target's sources. See
compiler_flagsfor more information.
Flags to add to the linker command line whenever the output from this rule is used in a link operation, such as linked into an executable or a shared library.
Platform-specific linker flags. This argument is specified as a list of pairs where the first element in each pair is an un-anchored regex against which the platform name is matched. The regex should use
java.util.regex.Patternsyntax. The second element in each pair is a list of linker flags. If the regex matches the platform, these flags are added to the linker command line when the output from this rule is used in a link operation.
If present, an un-anchored regex (in java.util.regex.Pattern syntax) that matches all platforms that this library supports. It will not be built for other platforms.
List of build target patterns that identify the build rules that can include this rule as a dependency, for example, by listing it in their
exported_depsattributes. For more information, see visibility.
Set of license files for this library. To get the list of license files for a given build rule and all of its dependencies, you can use
Set of arbitrary strings which allow you to annotate a build rule with tags that can be searched for over an entire dependency tree using
buck query attrfilter().
halide_library( # Your library name. name = 'brighter', # Your pipeline + compiler sources. srcs = ['halide/main.cpp'], # Any dependencies for your compiler. Note that targets that depend on # this rule WILL NOT include or link the output(s) of these targets. compiler_deps = [ # You'll need libHalide to use this rule; in our example, we assume it's # located in the 'third-party/halide' directory. '//third-party/halide:halide' ], # Any dependencies for your generated shader. Targets that depend on this # rule will include and/or link the output(s) of these targets. deps = [ # ... ], )