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 name of the rule.
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.
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 in its
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 = [ # ... ], )