Commit Graph

5222 Commits

Author SHA1 Message Date
Cindy Zhou
1fbe0766d8 Merge "Add CFI support for assembly heavy libraries" am: 1cfd8af0a8 am: 07b9b74371 am: 18995fbf7f am: 0b7cc08f44
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1500330

Change-Id: If8bd7309c4289bcadb0337181a50b3f37da85613
2020-11-20 14:19:17 +00:00
Thiébaud Weksteen
588ed66364 Add comments to {cc,rust}/strip.go
Bug: 173695621
Test: n/a
Change-Id: If3086aa711507c3be6db23e3691163cdd68710bf
2020-11-19 20:02:34 +01:00
Janis Danisevskis
6002d9172f Merge "Fix Broken build 6978250 on aosp-master" am: caa0d93da0 am: 9660b33251 am: b780e01b66 am: a55b5bf4e0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1504113

Change-Id: I375cab76339ab2141485a1488d4e4ef7bb8c6217
2020-11-19 02:25:41 +00:00
Cindy Zhou
8cd45dea53 Add CFI support for assembly heavy libraries
This commit adds an new option to the sanitizer build config to enable CFI with the
"-fno-sanitize-cfi-canonical-jump-tables" flag in order to provide more
support for assembly heavy libraries.

Bug: 158010610
Test: Compile with option enabled in libaom and libvpx
Change-Id: I7d0d3ed6ff876582043fd72b687757426e3dc5aa
2020-11-18 17:32:54 -08:00
Janis Danisevskis
caa0d93da0 Merge "Fix Broken build 6978250 on aosp-master" 2020-11-19 00:21:29 +00:00
Treehugger Robot
f828c49069 Merge changes Iba57c949,Ief43ff51,Ib1809a4d,I2ab64f36 am: b08a091502 am: 3f57de54b2 am: a088bff723 am: 6c4cdb0bb2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1480605

Change-Id: Ie0876cdaf142dbd75c094f9e680849efb4105b28
2020-11-18 23:35:27 +00:00
Janis Danisevskis
6439a8dae2 Fix Broken build 6978250 on aosp-master
Bug: 173570265
Change-Id: I3425dedf4ed8435420cca9b5917033262ba8b3cc
2020-11-18 14:26:41 -08:00
Colin Cross
dcc3c42355 Merge "Move genrule on top of RuleBuilder" am: d4a63eaeb7 am: 9fffe4cd19 am: e2732d4c9d am: dea73f7535
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498170

Change-Id: I798a24001dd1e8e0bcc6fb0d2770294bed384dea
2020-11-18 21:23:22 +00:00
Colin Cross
151b9ff0cf Rewrite sbox to use a textproto manifest
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: I3b918a6643cea77199fd39577ef71e34cdeacdb1
2020-11-18 13:02:22 -08:00
Treehugger Robot
b08a091502 Merge changes Iba57c949,Ief43ff51,Ib1809a4d,I2ab64f36
* changes:
  Store ndkKnownLibs in the config
  Register the kythe singleton on the Context instead of globally
  Store ninja file deps from PackageVarContext in the config
  Store SingletonMakeVarsProviders in the config
2020-11-18 20:00:31 +00:00
Colin Cross
d4a63eaeb7 Merge "Move genrule on top of RuleBuilder" 2020-11-18 18:44:19 +00:00
Ivan Lozano
3fc931d7e7 Merge "rust: Add header library support to rust_bindgen." am: 1010f9bd56 am: f0f9798d93 am: 7af28e67b7 am: 4859112a8c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1501000

Change-Id: I11b99e93fc306c17c80f4e1d2ea2774677520217
2020-11-18 15:31:37 +00:00
Ivan Lozano
1010f9bd56 Merge "rust: Add header library support to rust_bindgen." 2020-11-18 14:06:09 +00:00
Dan Shi
cf10c9c69d Merge "Add unit_test test option in test configs" am: ebb51503a4 am: fdd23ce534 am: b71498a327 am: d95774301f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498167

Change-Id: I9b1a21f70ed9e615ab4ef2bbf2b0138d8c7c8665
2020-11-18 05:59:01 +00:00
Dan Shi
ebb51503a4 Merge "Add unit_test test option in test configs" 2020-11-18 04:40:37 +00:00
Jose "Pepe" Galmes
a5ed5683a3 Merge "Support for recovery snapshot." am: f77bd8d60d am: 6209e3a346 am: 5b40ae7156 am: 20a3c6a622
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498740

Change-Id: Ia44e30065e2011635edaf17ee4b6d0da26c7ba05
2020-11-17 22:15:29 +00:00
Jose "Pepe" Galmes
f77bd8d60d Merge "Support for recovery snapshot." 2020-11-17 20:51:54 +00:00
Colin Cross
3d68051218 Move genrule on top of RuleBuilder
In preparation for more complicated sandboxing support in sbox, use
a single implementation of the sbox sandboxing by moving genrule to
use RuleBuilder's sbox support instead of creating an sbox rule
directly.

Also move genrule's input list hash support into RuleBuilder.

Test: genrule_test.go
Test: rule_builder_test.go
Change-Id: I292184d02743c7e6887ebbcd232ba565db2ab0cc
2020-11-17 11:23:45 -08:00
Colin Cross
95f1ca07ce Store ndkKnownLibs in the config
Storing ndkKnownLibs prevents multiple tests from running in parallel
as one may be writing to the list while another is reading from it.
Store it in the config so each test has its own copy.

Test: go test -race ./apex
Change-Id: Iba57c9494012c9e0ae9e5ffaa63b9b2bd2c77492
2020-11-17 10:50:19 -08:00
Colin Cross
5789858aa8 Register the kythe singleton on the Context instead of globally
Test: all soong tests
Change-Id: Ief43ff51e66db2d3c895b2a6952385e31b9d669b
2020-11-17 10:50:19 -08:00
Ivan Lozano
9b44383788 rust: Add header library support to rust_bindgen.
Allow rust_bindgen modules to define dependencies that only provide
headers and may not necessarily need to be linked in.

Bug: 161141999
Test: Soong tests pass.
Test: Example module has appropriate include flags when compiling.
Change-Id: Ic9ce8b1204008ad8dcb18766c914e48bb292d485
2020-11-17 13:40:50 -05:00
Treehugger Robot
837470b6fd Merge "Add keymint to vndk." am: beab64ea81 am: 9d69703838 am: 50790b6be4 am: ef3e6cecb1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1431273

Change-Id: I2e24dfc2a8c541137864982b7b7e93ede178b45f
2020-11-17 17:51:31 +00:00
Treehugger Robot
beab64ea81 Merge "Add keymint to vndk." 2020-11-17 16:13:50 +00:00
Colin Cross
17f97caac1 Merge "Revert "Annotate dependency tags for dependencies of installed files"" am: e3d308b5a5 am: 1e9bf4a2d4 am: 1c4a64d945 am: e0d4766afe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1500597

Change-Id: Ic89cbe63f9c323d64d5f937ee8f8d9ec08da1af8
2020-11-17 07:55:11 +00:00
Colin Cross
e3d308b5a5 Merge "Revert "Annotate dependency tags for dependencies of installed files"" 2020-11-17 06:32:57 +00:00
Colin Cross
b5ae193b8f Revert "Annotate dependency tags for dependencies of installed files"
This reverts commit 62a0cfd054.

Reason for revert: b/173475545

Change-Id: I4e834200c8e68dfa1b8144dfd1fa95ca68554980
2020-11-17 06:32:06 +00:00
Colin Cross
b1ed155759 Merge "Replace android.WriteFile rule with android.WriteFileRule" am: 1af783fae7 am: e37a8e2d51 am: 104085c573 am: ba9cb68851
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498169

Change-Id: I46cf9e2375924e1ac47f2163587f87aa70e2c940
2020-11-17 01:49:26 +00:00
Colin Cross
fcd0274015 Merge changes Ic22603a5,I5330b571 am: f15c0558bf am: 6ae2d3dc85 am: 24e1b2cff9 am: b8ef5aa2aa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1494957

Change-Id: Idfa7e78b42d6dcab2cee46fdf7f4a9ddd5ab20e6
2020-11-17 01:48:55 +00:00
Jose Galmes
f729458e69 Support for recovery snapshot.
Bug: 171231437
Test: source build/envsetup.sh
Test: ALLOW_MISSING_DEPENDENCIES=true m -j nothing

Change-Id: I6b35fbb0b90ffffa941ea108cbd31a454b2dd403
2020-11-16 17:09:36 -08:00
Colin Cross
1af783fae7 Merge "Replace android.WriteFile rule with android.WriteFileRule" 2020-11-16 23:11:41 +00:00
Dan Shi
d79572f73e Add unit_test test option in test configs
This change allows a test (native, java, rust or python) to be included
in host-unit-tests suite when test option `unit_test` is set to true.

Bug: 172006742
Test: m host-unit-tests
Change-Id: I69d3eb5b51198c549e2e6914ceac3a4fc33c3cf2
2020-11-16 11:05:00 -08:00
Colin Cross
cf371cc1f7 Replace android.WriteFile rule with android.WriteFileRule
The android.WriteFile rule takes careful escaping to produce the
right contents.  Wrap it in an android.WriteFileRule that handles
the escaping.

Test: compare all android.WriteFile outputs
Change-Id: If71a5843af47a37ca61714e1a1ebb32d08536c31
2020-11-14 16:26:00 -08:00
Colin Cross
62a0cfd054 Annotate dependency tags for dependencies of installed files
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: Ic22603a5c0718b5a21686672a7471f952b4d1017
2020-11-14 16:24:10 -08:00
Colin Cross
a615901b53 Use the the preferred architecture symlink as the tool path if it exists
When a genrule uses a binary with symlink_preferred_arch set as a tool,
use the symlink instead of the binary as the tool, as the symlink is
the more canonical name for the binary.

Test: m checkbuild
Change-Id: I5330b57139f03ca07bf70547261f191ed84ec9b8
2020-11-14 14:38:34 -08:00
Treehugger Robot
5789a1b32f Merge "Pass Config to NewTestContext instead of ctx.Register" am: ceed6be00d am: 748ecd135f am: b8316056fe am: 5f3bbae64b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1480601

Change-Id: Ib69b3a789c2de2c83be8a299eafa0740af306081
2020-11-14 07:18:40 +00:00
Colin Cross
ae8600b507 Pass Config to NewTestContext instead of ctx.Register
Prepare for using Config when adding singletons by passing
Config to NewTestContext and NewContext instead of to ctx.Register.
This will enable a followup change to store SingletonMakeVarsProviders
registered on the Context in the Config, which is necessary to run
multiple tests in parallel without data races.

Test: all soong tests
Change-Id: Id229629a4e42ff4487d317241673837726c075fc
2020-11-12 10:07:49 -08:00
Zach Johnson
5c9c441748 Merge "rust_grpcio well known types support, default deps" am: c0ea1701cb am: 1ec2ec156f am: fe02bb74e7 am: 4d47d28648
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1490423

Change-Id: I96d4afdde06934f99914ebff2e4902e2b652f020
2020-11-12 01:21:49 +00:00
Zach Johnson
c0ea1701cb Merge "rust_grpcio well known types support, default deps" 2020-11-11 23:22:27 +00:00
Zach Johnson
3df4e6364b rust_grpcio well known types support, default deps
The usage of the well known type Empty requires a hack in the module
above the grpc implementation, this is now the generated stem_mod.rs

This also adds additional implicit dependencies that are required by
the grpc protobuf generated code. This includes the addition of a
'header_libs' property for library dependencies which export include
paths required by protos.

We also now include both the protos and the grpcio in the library
variant via the mod_stem.rs.

Bug: 172592789
Bug: 171504899
Test: m nothing
Test: Example rust_grpcio module build command includes dependencies,
      include paths.
Change-Id: I187a13cd5cdea991828a1020314de16727e4f74e
2020-11-11 12:09:26 -08:00
Treehugger Robot
03ce8555b7 Merge "add -nostdlibinc for arm64_linux_host" am: 8b16e407e2 am: 44261ca8a2 am: dc617c8ec4 am: 1a3e8079e7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1493896

Change-Id: I28cd0e9f549d87287a950db0574cdcdb6b16b725
2020-11-10 08:18:28 +00:00
Jiyong Park
b304e805d9 add -nostdlibinc for arm64_linux_host
The flag is needed to prevent the compiler from looking into the host
include paths like /usr/include.

Bug: 172869346
Test: inspect the include path by temporarily adding `-v`.
Change-Id: I73a16155a784916a1bd0babcb75d5f9079e13423
2020-11-10 11:55:42 +09:00
Treehugger Robot
7597137eee Merge "Define product_available property" am: 25b0780f37 am: 779adff9e6 am: a993a3cd22 am: 320e6bbd7b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1479576

Change-Id: I20c3031f1f62045c9da9c3aa1448c8ba91d17597
2020-11-09 06:53:44 +00:00
Treehugger Robot
25b0780f37 Merge "Define product_available property" 2020-11-09 00:40:50 +00:00
Justin Yun
63e9ec70bb Define product_available property
To make a module available to product variants, it must define
`product_available: true`. `vendor_available: true` will not create
product variants any more.
However, in this CL, we don't change the behavior of
`vendor_available` property. It still creates both variants. After we
update all Android.bp files that need to provide product variants
with `product_available: true`, we may upload the remaining patches.

Bug: 150902910
Test: lunch aosp_arm64-userdebug && m
Change-Id: I0fd5be7bbae2c45d5cab3c3c2ca49f53a9b6f975
2020-11-08 23:53:22 +00:00
Treehugger Robot
5a8cd06241 Merge "Phase out Legcay GSI" am: aa17c4c9ff am: 92362376bd am: bb328e06b5 am: b6572f955f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1485816

Change-Id: I90ffffc4747354b537a687e833c02f7d0ada96f9
2020-11-06 05:46:55 +00:00
Treehugger Robot
aa17c4c9ff Merge "Phase out Legcay GSI" 2020-11-06 04:00:40 +00:00
Treehugger Robot
60e35b2490 Merge "Always generate profiling debug info" am: 37f5a8fb86 am: 589415ee27 am: 9d4b2ab654 am: 012e20c1fd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1485818

Change-Id: I71b2ef159c42ec1ad5c7ed15b84c2c2355712706
2020-11-04 04:09:44 +00:00
Yi Kong
110cd5fe7f Always generate profiling debug info
The additional debug info is used for sampling PGO. This does not affect
the size of final stripped binaries.

Also removed `-gmlt` flag in pgo.go, since it's actually a lower level
of debug option than the default (-g).

Test: build, verify final binaries are identical size
Bug: 79161490
Change-Id: Ie4cf4998695f78a50a7ac7a7a0853c625cbd8880
2020-11-03 18:13:21 +00:00
SzuWei Lin
31c4dfcd96 Phase out Legcay GSI
Bug: 162277261
Test: none
Change-Id: I17b21628c9b781fd4913ee72653347c94d6dd4b0
2020-11-03 18:27:32 +08:00
Treehugger Robot
0c3f3321b6 Merge changes I0289d866,Ie7363524 am: 20cf20ba1c am: 8893247f77 am: 7270fbdea5 am: 81dfc43bd6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1471977

Change-Id: Idba8ce338e07fcc1f82222a95bb0f3806826a7e8
2020-11-02 23:18:00 +00:00