Commit Graph

6123 Commits

Author SHA1 Message Date
Inseob Kim
7ad102164b Merge "map list files must have newline characters" 2020-12-03 00:06:59 +00:00
Chris Parsons
ef6e0cf5f7 Add comments to cc/cc.go
Test: N/A
Change-Id: I2e221a40fdf9d6975891dedf0bf8a7db3e3943f1
2020-12-02 16:46:53 -05:00
Christopher Parsons
c3018a9a1f Merge "Improve commenting for cc/builer.go, and kill dead code" am: b9e93f8789 am: 753108d04d am: f4149c065d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1508580

Change-Id: I2d0d3d36fc9eeec8dd5494e17927bb1156874eb7
2020-12-02 16:39:17 +00:00
Chris Parsons
3c27ca3683 Improve comments in cc/library.go and cc/linkable.go.
Test: N/A
Change-Id: I10cca7942bf86be8c933fd924f4bb7bdaff0cef7
2020-12-02 11:03:18 -05:00
Christopher Parsons
b9e93f8789 Merge "Improve commenting for cc/builer.go, and kill dead code" 2020-12-02 15:59:55 +00:00
Cindy Zhou
132cd4df2b Merge "Add arch_variant support for diag" am: 591833471f am: 31018d8e48 am: 38f3b708c6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1515401

Change-Id: Iebf0b0af35358ac8d28807f0b0788b8ea78ecb08
2020-12-02 14:29:48 +00:00
Cindy Zhou
591833471f Merge "Add arch_variant support for diag" 2020-12-02 13:01:43 +00:00
Jiyong Park
b900ca1c2b Merge "Remove the arch-based filtering hack in packaging.go" am: f10995b7b6 am: 0c5b6caa37 am: 36f179c430
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1509692

Change-Id: I37a01538fc6e751eb0a232c47b4aaaaf1f86e310
2020-12-02 03:10:32 +00:00
Kiyoung Kim
23eec87bc3 Merge "Generate system stub library list at build time" am: e76ec1cbeb am: 2edef37163 am: c2d92b54d8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498485

Change-Id: Id133b1505e2b0c47fd0f5e107268bb8de5d94eb0
2020-12-02 03:10:26 +00:00
Kiyoung Kim
4098c7eddf Add linkerconfig to Runtime APEX
Add linkerconfig to Runtime APEX module.

Bug: 165769179
Test: Cuttlefish boot succeeded
Change-Id: I31c4bfa2ce88b64d7100f227ec289416db253b13
2020-12-02 11:33:54 +09:00
Jiyong Park
f10995b7b6 Merge "Remove the arch-based filtering hack in packaging.go" 2020-12-02 01:24:17 +00:00
Kiyoung Kim
e76ec1cbeb Merge "Generate system stub library list at build time" 2020-12-02 00:28:19 +00:00
Colin Cross
f1a035e6be Pass pctx and ctx to NewRuleBuilder
Enable the RuleBuilder and RuleBuilderCommand methods to access
the BuilderContext by passing it to NewRuleBuilder instead of
RuleBuilder.Build.

Test: genrule_test.go
Test: rule_builder_test.go
Test: m checkbuild
Change-Id: I63e6597e19167393876dc2259d6f521363b7dabc
2020-12-01 16:22:16 -08:00
Treehugger Robot
47dbd19a4e Merge "Add test suite handling to central androidmk code" am: 464e6c71df am: 5ac52e71e5 am: 724510fec9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1513215

Change-Id: I0af64442017986754089a361e01dbecbc2450c5f
2020-12-01 23:59:09 +00:00
Chris Parsons
bf4f55f180 Improve commenting for cc/builer.go, and kill dead code
Test: m nothing
Change-Id: I836c717d3243e901257120be71246e419de4d28e
2020-12-01 18:28:38 -05:00
Liz Kammer
57f5b33ad3 Add test suite handling to central androidmk code
MTS is introducing partial MTS test suites that are per-module, with
names of the format: mts-${MODULE}. By centralizing the code for test
suites, we can automatically add "mts" test suite when an
"mts-${MODULE}" test suite is specified, reducing duplication.

Test: m mts
Bug: 170318013
Change-Id: I8ce9d3c252fcc0a937bb5f2826d21cb6c6932d82
2020-12-01 12:23:56 -08:00
Cindy Zhou
d3fe49289d Add arch_variant support for diag
Allow for different arch to specify sanitizer options.

Bug: 158010610
Test: Compiles with build options
Change-Id: I4db72f682e920e3c1a6d55473f316e56567636e6
2020-12-01 11:26:39 -08:00
Jiyong Park
d630bdd4dd Remove the arch-based filtering hack in packaging.go
aosp/1501613 has landed. The filtering hack is no longer needed.

Also, fixed a bug that the dependency to the dynamic linker is not
treated as install dep.

Bug: N/A
Test: `m hosttar` and compare the built cvd-host_package.tar.gz with and
without this change. There is no removed file.

Change-Id: I19ef64e10d34bc8be2592c5258505cd632c91af9
2020-12-01 19:25:39 +09:00
Kiyoung Kim
24dfc1fbb2 Generate system stub library list at build time
List of stub libraries from system (and bionic APEX) is currently
managed in static file. This change generates the list at build time and
adds to the system config so linkerconfig can use it.

Bug: 172889962
Test: Build cuttlefish and confirmed list is generated in
/system/etc/linker.config.pb

Change-Id: Ie0400e9d1098b0de19c6a7c25f261384aadde0a3
2020-12-01 14:09:03 +09:00
Dan Albert
b19953d04a Rename __ANDROID_SDK_VERSION__.
__ANDROID_SDK_VERSION__ is ambiguous. Rename it
__ANDROID_APEX_MIN_SDK_VERSION__ so it's clear which SDK version it
refers to.

Note that this is still different from the minSdkVersion of the module
being compiled. This is the max of *all* the minSdkVersions of modules
that this module shares an APEX with.

Test: treehugger
Bug: None
Change-Id: Id9cbd80a6bc99db8227daef4e1db9c893e63ad1e
2020-11-30 14:39:01 -08:00
Jiyong Park
5ae5d402a6 Merge "rust modules can be included in apex" am: fdea25781f am: 88365d1894 am: a9faa25e54
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1508096

Change-Id: I777278628c5a2f3b73af5e962ecee85ead75ecc2
2020-11-30 17:40:31 +00:00
Jiyong Park
99644e92c8 rust modules can be included in apex
We will have some APEXes having rust binaries and libraries. So, adding
the support for the types of modules.

rust.Module now inherits from android.ApexModuleBase and implements
the android.ApexModule interface.

Bug: 172414324
Test: m

Exempt-From-Owner-Approval: rebased after +2 from the owner
Change-Id: I356ef4c45f782a6460f001e83af96d1710642d80
2020-11-30 15:40:48 +00:00
Justin Yun
7a44479e0a map list files must have newline characters
module_names.txt and module_paths.txt did not end with the newline
character in each line. Instead it had literal '\n'.
The character must use '\n' without escape character.

Test: m vndk
Change-Id: I1de1d0993994c8a95b02426777f62bfb2bed7b6f
2020-11-27 20:30:44 +09:00
Treehugger Robot
68647d97b9 Merge "Soong: add -T to nanopb call to suppress timestamp" am: aa8ac24222 am: 1434382a5d am: 0b8f050dd7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1511276

Change-Id: I78884c341abc59f1bd70b0310204afd8a068ac22
2020-11-26 01:54:37 +00:00
Treehugger Robot
aa8ac24222 Merge "Soong: add -T to nanopb call to suppress timestamp" 2020-11-25 23:47:20 +00:00
Ulf Adams
1893176532 Soong: add missing header-abi-dumper inputs
When soong runs the header-abi-dumper remotely, it must provide a few
dynamic libraries as toolchain inputs, or the action will fail
unconditionally on the remote execution system.

This patch allows disabling fallback for the header abi dumper
actions, i.e., this now works with remote execution:
export RBE_ABI_DUMPER_EXEC_STRATEGY=remote

Test: ran against a remote execution server; actions no longer fail remotely
Change-Id: I0c48484c03d0923dae63004fea6632704b317e95
2020-11-25 23:01:15 +01:00
Ulf Adams
82fd89b8ab Soong: add -T to nanopb call to suppress timestamp
By default, nanopb outputs a timestamp into the .c and .h files it generates.
This is usually considered bening. However, when using remote execution or
remote caching, this poisons all actions that have these files as inputs, and
also appears to affect transitive actions (actions depending on actions that
have these files as inputs).

This change adds the -T flag to suppress the timestamp, which in turn makes
the output files deterministic, which in turn allows the remote cache to
return previous results rather than requiring a re-execution of the
corresponding actions.

Test: ran the build a few times to check that the output is deterministic

Change-Id: Iecfa143dbf12a9bb7703dd0bc3f1b3e3fd56317c
2020-11-25 22:52:12 +01:00
Treehugger Robot
08e2c94504 Merge "Add comments about sysprop_library" am: c2acb8cbf0 am: 0acad3aa48 am: 4664086cc6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1508076

Change-Id: Ibed0fc2e3ec7675a5762370650445267a2ad92ef
2020-11-25 05:42:01 +00:00
Treehugger Robot
c2acb8cbf0 Merge "Add comments about sysprop_library" 2020-11-25 00:54:14 +00:00
Christopher Parsons
db970668b6 Merge "Improve commenting of cc/binary.go." am: dc71a6e28a am: f7fd7642f5 am: 5e745c6f2f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1507117

Change-Id: I9345540293740f2bb563eb299b53547415ab9a46
2020-11-24 21:40:40 +00:00
Colin Cross
76501e8366 Merge changes I8af00c8c,Ia526ae89 am: 38214f5ac5 am: f9db940d1d am: 842c80be1f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1507118

Change-Id: I4267ec593b90d0cb7fc408c4af736dbf5f890ee9
2020-11-24 20:50:15 +00:00
Christopher Parsons
dc71a6e28a Merge "Improve commenting of cc/binary.go." 2020-11-24 20:34:39 +00:00
Colin Cross
38214f5ac5 Merge changes I8af00c8c,Ia526ae89
* changes:
  Reland: Rewrite sbox to use a textproto manifest
  Fix gensrcs subdirs
2020-11-24 19:27:35 +00:00
Colin Cross
6c9e2c1791 Merge "Annotate dependency tags for dependencies of installed files" am: e5218b6be6 am: d1b7d243f6 am: 0d75566f49
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1501613

Change-Id: I1543615d61a1b3dd1008087ab02db9f2636a908c
2020-11-24 17:31:57 +00:00
Colin Cross
e5218b6be6 Merge "Annotate dependency tags for dependencies of installed files" 2020-11-24 16:01:35 +00:00
Thiébaud Weksteen
e51f76d7b1 Merge "Add comments to {cc,rust}/strip.go" am: f503dc3ba1 am: 406eb4de58 am: 46dd7e11c1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1505851

Change-Id: I44d899d242a5afc57645a21e885a431039248147
2020-11-24 10:26:58 +00:00
Treehugger Robot
04d5cfb8a6 Merge "Fail if non-allowlisted host system tool is used." am: 5bca812a4e am: e858060189 am: 09c764bc9e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1508062

Change-Id: I8c33ea5438ba033eb5172bbfb12f7b86bf13d6b8
2020-11-24 10:25:50 +00:00
Thiébaud Weksteen
f503dc3ba1 Merge "Add comments to {cc,rust}/strip.go" 2020-11-24 08:39:28 +00:00
Treehugger Robot
5bca812a4e Merge "Fail if non-allowlisted host system tool is used." 2020-11-24 07:02:30 +00:00
Inseob Kim
07def12d50 Add comments about sysprop_library
Bug: 173473767
Test: m nothing
Change-Id: I96395742ae369baf9d54be8f92b01860ee0351ab
2020-11-24 14:13:31 +09:00
Jingwen Chen
c887d1f6cb Merge "Refactor 'in_make' to mean Kati is not skipped." am: f87a720101 am: 628217737c am: c6d8a3e14f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1508061

Change-Id: I635b7c0848b73fccfe9c17d5b4c56c215294feff
2020-11-24 03:37:59 +00:00
Colin Cross
e9fe2949b8 Annotate dependency tags for dependencies of installed files
Relands Ic22603a5c0718b5a21686672a7471f952b4d1017 with a minor
change to track libc++ dependencies for python hosts and after
a fix to an internal genrule that depended on transitively
installed java libraries (ag/13068670).

Soong currently assumes that installed files should depend on
installed files of all transitive dependencies, which results
in extra installed file dependencies through genrules, static
libs, etc.

Annotate dependency tags for dependencies for which the
installed files are necessary such as shared libraries
and JNI libraries.

This avoids extra installed files, and is also a first step
towards genrules using their own copy of tools instead of
the installed copy.

Bug: 124313442
Test: m checkbuild
Test: java.TestBinary
Test: cc.TestInstallSharedLibs
Test: deptag_test.go
Change-Id: I725871249d561428e6f67bba6a7c65b580012b72
2020-11-23 18:06:08 -08:00
Jingwen Chen
2838c818da Fail if non-allowlisted host system tool is used.
This CL improves the clarity of the non-hermetic nature of using
HostSystemTools, and make the build fail if a caller tries to use a host
system tool that isn't allowlisted in config.go.

The only caller seems to be for xcrun, which is a special case that is
pretty hard to remove.

Test: TH presubmit
Change-Id: Icd3e7330406a08c00ac9682e37e2d42669f2e6b7
2020-11-23 20:43:41 -05:00
Jingwen Chen
cda22c9bb9 Refactor 'in_make' to mean Kati is not skipped.
In Nougat and before, Make wrote a marker file to indicate that
soong_build was invoked from Make to change certain behaviors of Soong
at build time.
https://cs.android.com/android/platform/superproject/+/android-7.1.2_r36:build/core/soong.mk;l=70-73;drc=ae18638b0406ad107b0882a02a13cdd8b92f2a4e

Things have changed, and now soong_build is invoked from soong_ui, which
supports a --skip-make configuration flag:
https://cs.android.com/android/platform/superproject/+/master:build/soong/ui/build/build.go;l=31-33;drc=680387bf1d3ce7cbc77f535be7c42cec411b1687

Thus, the various remnants of 'EmbeddedInMake' and 'inMake'
configuration are misleading, since soong_build is no longer invoked
from Make. This CL refactors all instances to actually mean that
Kati is enabled (not skipped with --skip-make), and will run after
soong_build finishes, so Kati-specific behavior like the AndroidMk
singleton should run.

Test: TH presubmit

Change-Id: I576ab8e54f99f5c8ddf9feaf9a828019b279e266
2020-11-23 00:29:18 -05:00
Colin Cross
e16ce36818 Reland: Rewrite sbox to use a textproto manifest
This relands I3b918a6643cea77199fd39577ef71e34cdeacdb1 with a fix
to create the directory for the output depfile if doesn't exist.

In preparation for more complicated sandboxing that copies tools
and/or inputs into the sandbox directory, make sbox use a textproto
input that describes the commands to be run and the files to copy
in or out of the sandbox.

Bug: 124313442
Test: m checkbuild
Test: rule_builder_test.go
Test: genrule_test.go
Change-Id: I8af00c8c0b25a92f55a5032fcb525715ae8297c2
2020-11-20 15:45:04 -08:00
Chris Parsons
e0f2ab3f3c Improve commenting of cc/binary.go.
Test: N/A
Change-Id: If4a1be0a0f111cd08fc1e8762702c32115562cf1
2020-11-20 17:27:25 -05:00
Colin Cross
74da70f789 Merge "Revert "Rewrite sbox to use a textproto manifest"" am: b893f8766c am: bcd0b74aae am: 08c3f71f44
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1507524

Change-Id: I6f73faf7aea19ae19f75bb6c2dcb392ad0fac956
2020-11-20 19:54:26 +00:00
Colin Cross
8ad2ae0c4b Merge "Rewrite sbox to use a textproto manifest" am: 60d06cf8df am: 71e74ba200 am: 8c02083a4f am: d45ed5bded
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498171

Change-Id: I91410023f94bc875257cc10e0f841fb3067711cd
2020-11-20 19:47:17 +00:00
Colin Cross
b893f8766c Merge "Revert "Rewrite sbox to use a textproto manifest"" 2020-11-20 18:45:35 +00:00
Colin Cross
619b9ab260 Revert "Rewrite sbox to use a textproto manifest"
This reverts commit 151b9ff0cf.

Reason for revert: broke builds

Change-Id: I69b3b8795d5a36b4fa0debb1af2d433be3c15d6c
2020-11-20 18:44:31 +00:00