xref: /aosp_15_r20/external/boringssl/src/util/build/build.go (revision 8fb009dc861624b67b6cdb62ea21f0f22d0c584b)
1// Copyright (c) 2024, Google Inc.
2//
3// Permission to use, copy, modify, and/or distribute this software for any
4// purpose with or without fee is hereby granted, provided that the above
5// copyright notice and this permission notice appear in all copies.
6//
7// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
10// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
12// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
13// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14
15package build
16
17// A Target is a build target for consumption by the downstream build systems.
18// All pre-generated files are baked input its source lists.
19type Target struct {
20	// Srcs is the list of C or C++ files (determined by file extension) that are
21	// built into the target.
22	Srcs []string `json:"srcs,omitempty"`
23	// Hdrs is the list public headers that should be available to external
24	// projects using this target.
25	Hdrs []string `json:"hdrs,omitempty"`
26	// InternalHdrs is the list of internal headers that should be available to
27	// this target, as well as any internal targets using this target.
28	InternalHdrs []string `json:"internal_hdrs,omitempty"`
29	// Asm is the a list of assembly files to be passed to a gas-compatible
30	// assembler.
31	Asm []string `json:"asm,omitempty"`
32	// Nasm is the a list of assembly files to be passed to a nasm-compatible
33	// assembler.
34	Nasm []string `json:"nasm,omitempty"`
35	// Data is a list of test data files that should be available when the test is
36	// run.
37	Data []string `json:"data,omitempty"`
38}
39