xref: /aosp_15_r20/build/soong/doc.go (revision 333d2b3687b3a337dbcca9d65000bca186795e39)
1*333d2b36SAndroid Build Coastguard Worker// Copyright 2015 Google Inc. All rights reserved.
2*333d2b36SAndroid Build Coastguard Worker//
3*333d2b36SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*333d2b36SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*333d2b36SAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*333d2b36SAndroid Build Coastguard Worker//
7*333d2b36SAndroid Build Coastguard Worker//     http://www.apache.org/licenses/LICENSE-2.0
8*333d2b36SAndroid Build Coastguard Worker//
9*333d2b36SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*333d2b36SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*333d2b36SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*333d2b36SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*333d2b36SAndroid Build Coastguard Worker// limitations under the License.
14*333d2b36SAndroid Build Coastguard Worker
15*333d2b36SAndroid Build Coastguard Worker// Soong is a builder for Android that uses Blueprint to parse Blueprints
16*333d2b36SAndroid Build Coastguard Worker// files and Ninja to do the dependency tracking and subprocess management.
17*333d2b36SAndroid Build Coastguard Worker// Soong itself is responsible for converting the modules read by Blueprint
18*333d2b36SAndroid Build Coastguard Worker// into build rules, which will be written to a build.ninja file by Blueprint.
19*333d2b36SAndroid Build Coastguard Worker//
20*333d2b36SAndroid Build Coastguard Worker// Android build concepts:
21*333d2b36SAndroid Build Coastguard Worker//
22*333d2b36SAndroid Build Coastguard Worker// Device
23*333d2b36SAndroid Build Coastguard Worker// A device is a piece of hardware that will be running Android.  It may specify
24*333d2b36SAndroid Build Coastguard Worker// global settings like architecture, filesystem configuration, initialization
25*333d2b36SAndroid Build Coastguard Worker// scripts, and device drivers.  A device may support all variants of a single
26*333d2b36SAndroid Build Coastguard Worker// piece of hardware, or multiple devices may be used for different variants.
27*333d2b36SAndroid Build Coastguard Worker// A build is never targeted directly at a device, it is always targeted at a
28*333d2b36SAndroid Build Coastguard Worker// "product".
29*333d2b36SAndroid Build Coastguard Worker//
30*333d2b36SAndroid Build Coastguard Worker// Product
31*333d2b36SAndroid Build Coastguard Worker// A product is a configuration of a device, often for a specific market or
32*333d2b36SAndroid Build Coastguard Worker// use case.  It is sometimes referred to as a "SKU".  A product defines
33*333d2b36SAndroid Build Coastguard Worker// global settings like supported languages, supported use cases, preinstalled
34*333d2b36SAndroid Build Coastguard Worker// modules, and user-visible behavior choices.  A product selects one and only
35*333d2b36SAndroid Build Coastguard Worker// one device.
36*333d2b36SAndroid Build Coastguard Worker//
37*333d2b36SAndroid Build Coastguard Worker// Module
38*333d2b36SAndroid Build Coastguard Worker// A module is a definition of something to be built.  It may be a C library or
39*333d2b36SAndroid Build Coastguard Worker// binary, a java library, an Android app, etc.  A module may be built for multiple
40*333d2b36SAndroid Build Coastguard Worker// targets, even in a single build, for example host and device, or 32-bit device
41*333d2b36SAndroid Build Coastguard Worker// and 64-bit device.
42*333d2b36SAndroid Build Coastguard Worker//
43*333d2b36SAndroid Build Coastguard Worker// Installed module
44*333d2b36SAndroid Build Coastguard Worker// An installed module is one that has been requested by the selected product,
45*333d2b36SAndroid Build Coastguard Worker// or a dependency of an installed module.
46*333d2b36SAndroid Build Coastguard Worker//
47*333d2b36SAndroid Build Coastguard Worker// Target architecture
48*333d2b36SAndroid Build Coastguard Worker// The target architecture is the preferred architecture supported by the selected
49*333d2b36SAndroid Build Coastguard Worker// device.  It is most commonly 32-bit arm, but may also be 64-bit arm, 32-bit
50*333d2b36SAndroid Build Coastguard Worker// x86, or 64-bit x86.
51*333d2b36SAndroid Build Coastguard Worker//
52*333d2b36SAndroid Build Coastguard Worker// Secondary architecture
53*333d2b36SAndroid Build Coastguard Worker// The secondary architecture specifies the architecture to compile a second copy
54*333d2b36SAndroid Build Coastguard Worker// of some modules for devices that support multiple architectures, for example
55*333d2b36SAndroid Build Coastguard Worker// 64-bit devices that also support 32-bit binaries.
56*333d2b36SAndroid Build Coastguard Workerpackage soong
57