Commit Graph

35809 Commits

Author SHA1 Message Date
Jaewoong Jung
78939b2bc6 Merge "Make apex.key and certificate overridable." am: 6a328ff8ac
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682218

Change-Id: Ia994ae6bfdac031ef55dfb633bb4dd3f51e6311a
2021-04-22 15:43:40 +00:00
Jaewoong Jung
6a328ff8ac Merge "Make apex.key and certificate overridable." 2021-04-22 15:37:22 +00:00
Treehugger Robot
ae210266fd Merge "Revert "Add debug ramdisk variant"" am: f9c6744e28
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1684345

Change-Id: I92d9aaf2d1eafe621bf28710564b9b129d5367b8
2021-04-22 15:35:27 +00:00
Paul Duffin
5774eb9e14 Merge "Move monolithic stub flags generation to platform_bootclasspath" am: 57d13c6892
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683866

Change-Id: I5534c2a10a19d0b433bfa2955326215bf3df16eb
2021-04-22 15:35:14 +00:00
Paul Duffin
d8d72e85f6 Merge "Extract common stub flags code" am: d631512659
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683865

Change-Id: I894fd306eaae9ef0a58ee4a8b73269117cc68374
2021-04-22 15:34:25 +00:00
Treehugger Robot
f9c6744e28 Merge "Revert "Add debug ramdisk variant"" 2021-04-22 15:28:06 +00:00
Paul Duffin
57d13c6892 Merge "Move monolithic stub flags generation to platform_bootclasspath" 2021-04-22 15:06:16 +00:00
Paul Duffin
d631512659 Merge "Extract common stub flags code" 2021-04-22 15:05:54 +00:00
Paul Duffin
04378bd2ba Merge "Allow generate_hiddenapi_lists.py to work with no custom flag files" am: eee990820b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682096

Change-Id: I092ad11719b3a1a4a861bb26cc7b5aebe04d1028
2021-04-22 14:23:15 +00:00
Paul Duffin
33f495f305 Merge changes I67589bcc,Ibcfae390 am: 7cbdf81e95
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683868

Change-Id: Ie19e2285fd129b52e17a8df6091ac53be126794b
2021-04-22 14:18:03 +00:00
Paul Duffin
eee990820b Merge "Allow generate_hiddenapi_lists.py to work with no custom flag files" 2021-04-22 14:05:22 +00:00
Paul Duffin
7cbdf81e95 Merge changes I67589bcc,Ibcfae390
* changes:
  Replace boot image with bootclasspath fragment in sdk package
  bootclasspath_fragment must only depend on source contents
2021-04-22 14:02:43 +00:00
Paul Duffin
74431d57c6 Move monolithic stub flags generation to platform_bootclasspath
As part of that this change:
* Moves code that will be common to platform_bootclasspath and
  bootclasspath_fragment from hiddenapi_singleton.go into
  hiddenapi_modular.go.
* Fixes the tests in hiddenapi_singleton_test.go but intentionally
  does not rename them or move them into a more appropriate place so
  as to make it easier to see the differences. A TODO has been added
  and these will be cleaned up in a follow up change.

Bug: 179354495
Test: verified that the monolithic out/soong/hiddenapi/... files are
      unchanged by this change
Change-Id: I680e4dab2e6bdf4a655fa9f255c195175904667e
2021-04-22 14:23:28 +01:00
Paul Duffin
3e7fcc3fe7 Extract common stub flags code
The stubFlagsRule does three separate tasks:
1. It computes the set of modules that provide the stubs.
2. It scans all the modules to find the stub modules and retrieves the
   paths to their dex files.
3. It constructs the ninja rule.

Of those three tasks, 1 and 3 will be same for the
platform_bootclasspath. Instead of searching all the modules for the
ones that provide the stubs it will simply add dependencies onto the
stub modules and retrieve the dex file paths from them.

This change extracts tasks 1 and 3 into separate methods for reuse. It
also parameterizes the generation of the ninja rule.

Bug: 179354495
Test: verified that the monolithic out/soong/hiddenapi/... files are
      unchanged by this change
Change-Id: I893845dbddc4b001dfd44d0e0b1c8a31b7f3f89f
2021-04-22 14:23:08 +01:00
Anton Hansson
ec47b30e0e Merge "Add new stub_only_static_libs attr for sdk_library" am: 24eac476d4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682097

Change-Id: If44f96ef58aad4453e76b6c6c458fd6942fa3f48
2021-04-22 12:54:17 +00:00
Anton Hansson
24eac476d4 Merge "Add new stub_only_static_libs attr for sdk_library" 2021-04-22 12:41:46 +00:00
Jingwen Chen
0a52f7276e bp2build: refactor/standardize cc_* bp2build converters am: ed9c17d033
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674326

Change-Id: I1cc8f6c9681346d3d7dff316d2b37e5bdaccf30d
2021-04-22 10:36:37 +00:00
Anton Hansson
dae54cd84f Add new stub_only_static_libs attr for sdk_library
Allow java_sdk_libraries to include libraries statically into their
stubs. The immediate use-case of this is to embed libcore notice files
into their stubs.

Also extend the java_sdk_library tests for impl/stub-only-libs, plus
some not assert utils.

Bug: 173186484
Bug: 184839599
Test: soong tests
Change-Id: I1ebf2f35c048eab5cec5125482a0304fe660f188
2021-04-22 10:20:13 +01:00
Jingwen Chen
ed9c17d033 bp2build: refactor/standardize cc_* bp2build converters
This CL refactors the cc* bp2build converters to use the common
attribute extractors in cc/bp2build.go.

This also adds include_build_directory to be handled by the compiler
attr extractor to generate recursive headers as inputs.

This also turns include_dirs and local_include_dirs into the
execroot-relative -I flags.

e.g. if a module in  bionic/libc has "private" in local_include_dirs,
the "-Ibionic/libc/private" copt is generated for it.

Fixes: 185139955

Test: TH
Test: Forrest for mixed_clean-droid
Change-Id: Ib67056482227e62068fbbea0455035bdf5d56319
2021-04-22 08:31:24 +00:00
Rupert Shuttleworth
950c2381dd Merge "Add various test files as testSrcs, so that they run on CI." am: dac451715b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683265

Change-Id: I778645f091d2278072423174dba25c9dd238413b
2021-04-22 03:35:53 +00:00
Rupert Shuttleworth
dac451715b Merge "Add various test files as testSrcs, so that they run on CI." 2021-04-22 03:08:21 +00:00
Treehugger Robot
6c1532d37e Merge "Add tempPathForRestat to improve consistency" am: f434cb5c1d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683867

Change-Id: I694cc0ae72c9679dcb3f7fa53f553dc9e6f7ca85
2021-04-22 02:48:06 +00:00
Treehugger Robot
f434cb5c1d Merge "Add tempPathForRestat to improve consistency" 2021-04-22 02:22:58 +00:00
Bowgo Tsai
78ea2f5eac Revert "Add debug ramdisk variant"
This reverts commit f84e9c05e2.

Because this breaks the usage of boot-debug.img and
vendor_boot-debug.img

Bug: 185970130
Bug: 185990198
Test: make bootimage_debug
Change-Id: I7886c971982faae1d5bc34688643de8d94d6e201
2021-04-22 09:49:24 +08:00
Treehugger Robot
e8bfb5a3a0 Merge changes I9a08bbc0,I049d1bb9 am: 752d63cd83
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682583

Change-Id: I8192b0ee13a4eaa550ea34fb4e7b706e1ffc9d73
2021-04-21 23:49:26 +00:00
Elliott Hughes
6b4a5ab97b Merge "Move some make variables from GNU binutils to LLVM equivalents." am: 7c0abf6f3c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683506

Change-Id: I568de05d0b8225a5c554f46cd4723602a5ec4069
2021-04-21 23:48:44 +00:00
Treehugger Robot
752d63cd83 Merge changes I9a08bbc0,I049d1bb9
* changes:
  Add validations to RuleBuilderCommand
  Fix bug in RuleBuilderCommand.OrderOnlys
2021-04-21 23:06:33 +00:00
Elliott Hughes
7c0abf6f3c Merge "Move some make variables from GNU binutils to LLVM equivalents." 2021-04-21 22:59:09 +00:00
Paul Duffin
0b28a8d356 Replace boot image with bootclasspath fragment in sdk package
Bug: 177892522
Test: m nothing
Change-Id: I67589bccbde426de2caf513bd643d9484df86c1e
2021-04-21 23:54:17 +01:00
Paul Duffin
d3c1513df9 Add tempPathForRestat to improve consistency
Previously, there were two approaches used to construct the temporary
path needed by the commitChangeForRestat method and neither was
suitable for general use. One was:
    android.PathForOutput(ctx, outputPath.Rel()+".tmp")
The other was:
    combinedAidl.ReplaceExtension(ctx, "aidl.tmp")

The first approach would not work if the supplied path had been created
by PathForModuleOut() or similar as it would drop the module directory.
That could lead to the same path being used for multiple rules.

The second approach would not work for files with a different
extension.

The tempPathForRestat combines the two approaches so it can be used
generally with any WritablePath.

Bug: 179354495
Test: verified that the ninja rules that used these files were not
      changed by these changes.
Change-Id: I4439dea0a823512c281eeb1366522fb49dceb4e3
2021-04-21 23:26:57 +01:00
Nikita Ioffe
aa3aee5205 Merge "Don't compress apexes when building in unbundled mode" am: 6681ef3101
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1679445

Change-Id: I50aef82fc25f734d14e53809969248c9b796864b
2021-04-21 22:17:09 +00:00
Nikita Ioffe
6681ef3101 Merge "Don't compress apexes when building in unbundled mode" 2021-04-21 21:50:32 +00:00
Colin Cross
ae89abe381 Add validations to RuleBuilderCommand
Add RuleBuilderCommand.Validation and RuleBuilderCommand.Validations
that propagate to BuildParams.Validations.

Test: TestRuleBuilder_build, TestRuleBuilder
Change-Id: I9a08bbc073a432fd0b53b87d8948ac0f6afcf637
2021-04-21 11:46:50 -07:00
Colin Cross
da6401b770 Fix bug in RuleBuilderCommand.OrderOnlys
Order only dependencies that were added to a RuleBuilderCommand were
only propagated to the rule that was created for a missing dependencies
error.  Set them on the main rule instead.

Test: TestRuleBuilder_build
Change-Id: I049d1bb921778d18d678439d236f69081927dc70
2021-04-21 11:46:49 -07:00
Paul Duffin
6589805e2a bootclasspath_fragment must only depend on source contents
This change ensures that bootclasspath_fragment only depends on source
modules and prebuilt_bootclasspath_fragment only depends on prebuilt
modules.

It does that in two ways:
1. It adds the dependencies in ComponentDepsMutator method which is
   called before any renaming of prebuilts is done which makes it very
   easy to add a dependency directly onto either the source or prebuilt
   as required.
2. It uses a tag which prevents dependencies on a source module from
   being replaced with a dependency on a prebuilt module which ensures
   that a dependency on the source modules is not replaced with a
   dependency on a prebuilt module.

Bug: 177892522
Test: m nothing
Change-Id: Ibcfae39083afbc07fcf729ead3ed5f5d020845bf
2021-04-21 19:05:37 +01:00
Paul Duffin
fb57372edb Merge "Skip initHiddenAPI check of prebuilt's boot dex jar for APEX modules" am: eaa432d470
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682094

Change-Id: Ie2ac4dcfbae771e8295edb8557971f3b250e78ad
2021-04-21 17:49:52 +00:00
Paul Duffin
fead82b508 Merge "Add PrepareForDebug_DO_NOT_SUBMIT" am: 893b2fda41
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682088

Change-Id: I52979323ceeb73ca3c92dfc1e0866a27fc6cdf91
2021-04-21 17:40:33 +00:00
Elliott Hughes
a960a0d5de Move some make variables from GNU binutils to LLVM equivalents.
There are others still to look at, but this set doesn't seem to break
anything for me.

Bug: http://b/147452927
Test: treehugger
Change-Id: I794684e23eee1326deb34bb4d5ed5831a47b8fa3
2021-04-21 10:22:55 -07:00
Paul Duffin
eaa432d470 Merge "Skip initHiddenAPI check of prebuilt's boot dex jar for APEX modules" 2021-04-21 17:14:56 +00:00
Paul Duffin
893b2fda41 Merge "Add PrepareForDebug_DO_NOT_SUBMIT" 2021-04-21 17:10:40 +00:00
Treehugger Robot
b7dcc980cd Merge "Remove unnecessary android:"path" tags in rust" am: f9b3e22293
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1679694

Change-Id: I26fd8019992c720c6f2f966ee66b4982052a6176
2021-04-21 16:24:27 +00:00
Paul Duffin
2082e695ce Allow generate_hiddenapi_lists.py to work with no custom flag files
Previously, if generate_hiddenapi_lists.py was invoked without any
custom flag files, e.g. hiddenapi-unsupported.txt, then it would fail.
This change allows it to be used for generating the hiddenapi lists
for modules that do not have any custom flag files,
e.g. framework-sdkextensions

Bug: 179354495
Test: verified that the monolithic out/soong/hiddenapi/... files are
      unchanged by this change
Change-Id: I455d453024c9f06ed59cbc1e9838234f8b7c7317
2021-04-21 17:15:25 +01:00
Treehugger Robot
f9b3e22293 Merge "Remove unnecessary android:"path" tags in rust" 2021-04-21 15:53:44 +00:00
Rupert Shuttleworth
b7e30760af Add various test files as testSrcs, so that they run on CI.
Test: go test
Test: TH (now that these are hooked up to TH)

Change-Id: Ia199794ef1a64074f3f9159f8c160ba3e45fd181
2021-04-21 11:23:57 -04:00
Rupert Shuttleworth
de3feaefd4 Merge "Generate BUILD files for every directory that has an Android.bp file." am: 4949557d50
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1677620

Change-Id: I7c00a7e1f6e1c3f97056070ad39e415575a610a3
2021-04-21 14:58:29 +00:00
Treehugger Robot
5257ba0d95 Merge "Fix bazel_handler_test.go" am: 6ac2955537
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682689

Change-Id: Ia543ba81bc306c687240c7f4adc64ad744c76c39
2021-04-21 14:58:19 +00:00
Lukács T. Berki
9c852f2fd6 Merge "Reenable test_glob_noop_incremental." am: 6b3fb3a12a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682093

Change-Id: I4bbe532ac217b9ee87a4c7bc8f8ac593369cc3c3
2021-04-21 14:57:39 +00:00
Rupert Shuttleworth
4949557d50 Merge "Generate BUILD files for every directory that has an Android.bp file." 2021-04-21 14:51:28 +00:00
Treehugger Robot
6ac2955537 Merge "Fix bazel_handler_test.go" 2021-04-21 14:45:06 +00:00
Lukács T. Berki
6b3fb3a12a Merge "Reenable test_glob_noop_incremental." 2021-04-21 14:28:52 +00:00