Commit Graph

21071 Commits

Author SHA1 Message Date
Treehugger Robot
4066e5e882 Merge "soong_config: bool_variables shortcut" 2020-04-03 15:43:42 +00:00
Vladimir Marko
39ad017ff5 [automerger skipped] Add file with updatable BCP packages to /system/etc/ am: b92ae27ca0 -s ours
am skip reason: Change-Id I21def97ace9081e707910d449943c683189f16cf with SHA-1 205e6c2a15 is in history

Change-Id: I9be111a60833a0ffa2412a9687fdb53bf077d066
2020-04-03 13:57:12 +00:00
David Srbecky
c6643ed9bb [automerger skipped] Distinguish boot images by target rather than arch am: 163bda65fd -s ours
am skip reason: Change-Id Iea73c77367affb074f97a0fc318389417ce537da with SHA-1 c177ebeca9 is in history

Change-Id: I80f91df3c245f23a5ef63e806e34edbef6635bd0
2020-04-03 13:57:10 +00:00
Yi Kong
e6a9e64f70 Add platform-wide sampling PGO option
This causes the compiler to emit some additional debug infomation that
will be used for sampling PGO. These debug infomation will get stripped
so it only affects intermediate files.

Test: build
Bug: 79161490
Bug: 153039105
Change-Id: Ie4d1d5ffbd311ba6e268cb94a618f5272be246ef
Merged-In: Ie4d1d5ffbd311ba6e268cb94a618f5272be246ef
(cherry picked from commit ceb5b76c91)
2020-04-03 12:00:04 +00:00
Vladimir Marko
b92ae27ca0 Add file with updatable BCP packages to /system/etc/
Make `permitted_packages` mandatory for updatable boot class
path jars. Collect the permitted_packages from those jars to
a file installed as /system/etc/updatable_bcp_packages.txt .

(cherry picked from commit 205e6c2a15)

Test: aosp_taimen-userdebug boots.
Test: adb shell cat /system/etc/updatable-bcp-packages
Test: Manual, remove permitted_packages from framework-tethering,
      build fails.
Bug: 151314205
Merged-In: I21def97ace9081e707910d449943c683189f16cf
Change-Id: I68486f0d8d3368636e1a5324321bd0106fbe241a
2020-04-03 11:26:19 +01:00
David Srbecky
163bda65fd Distinguish boot images by target rather than arch
We plan to add boot image variants for host tests.
Distinguishing the variants by arch does not work,
since both host and device can have the same arch.

(cherry picked from commit c177ebeca9)

Test: m
Bug: 152037801
Merged-In: Iea73c77367affb074f97a0fc318389417ce537da
Change-Id: I8b95882bb00cd2fd1f6cfd8a2784f9ebb957eec6
2020-04-03 11:25:13 +01:00
Bill Peckham
84be30c130 [automerger skipped] Merge "Include partition tag in apexkeys.txt." into rvc-dev am: 39ea894335 -s ours
am skip reason: Change-Id Ia07887b34f1aa77dae94ef23610dfef83c1a5849 with SHA-1 fff3f8a3f8 is in history

Change-Id: Ie4f5c5faf5ce6c42be5e7dc0bfcb37db600b7cad
2020-04-03 01:27:19 +00:00
Bill Peckham
39ea894335 Merge "Include partition tag in apexkeys.txt." into rvc-dev 2020-04-03 01:04:50 +00:00
Dan Willemsen
b486c7bcb5 [automerger skipped] Fix long mac test times; only initialize host settings once am: 2071132e99 -s ours
am skip reason: Change-Id I39b2d49739e628e4c11bec4805b25039115d2fd0 with SHA-1 6ba5367a70 is in history

Change-Id: If91abf849731cec73cc8844e144aeb9426c7c0de
2020-04-03 00:47:38 +00:00
Dan Willemsen
2071132e99 Fix long mac test times; only initialize host settings once
It looks like sometime in late February our Mac builds started taking
~10 minutes longer than before. On my local workstation the Soong tests
were taking >25 minutes before completing (likely because I don't have
the older SDKs installed, and we iterate from older to newer to find the
oldest installed SDK).

Most of this time was spend running the `xcrun` tools to interrogate the
system about which Mac SDKs are installed and where the tools are. This
will never change during any build or test, so wrap it all in a
sync.Once so that we only ever call them once.

And remove the macSdkPath variable, which has been unused for years and
no longer works (as we don't allow the use of xcode-select during the
build).

Bug: 153010389
Test: prebuilts/build-tools/build-prebuilts.sh on a Mac
Change-Id: I39b2d49739e628e4c11bec4805b25039115d2fd0
Merged-In: I39b2d49739e628e4c11bec4805b25039115d2fd0
(cherry picked from commit 6ba5367a70)
2020-04-02 14:53:36 -07:00
Martin Stjernholm
adeb088c8b Minor refactoring to put mock filesystem init closer to tests.
Test: m nothing
Change-Id: I39449b52d39d8e4351ff5a193df5804f281a017f
2020-04-02 22:39:12 +01:00
Martin Stjernholm
c5dd4f7c1f Propagate stubs to the SDK for libraries that have them.
Necessary to make the APEX build logic treat the libraries as API
boundaries rather than dependencies to bundle.

The .so files in the snapshots are the compiled stub libraries in this
case. They are strictly speaking redundant since they can be generated
from the .map.txt files in the snapshots, but doing that would require
extending the cc_prebuilt_library(_shared) module types with a full
compiler pass etc, and that would break a lot of assumptions in the cc
package.

Test: m nothing
Test: Create an SDK snapshot with Bionic libs, drop it into a
  master-art tree without bionic/ in it, build ART APEXes, and check
  that the Soong phase completes (specifically no errors about various
  APEX libs requiring libc that is not available to them).
Bug: 152481980
Change-Id: I31b928e6261198b6dd6f6b17196e714f07b64172
2020-04-02 22:39:12 +01:00
Diego Wilson
a22240bf22 Mount soong sandbox chroot as read-only
It's safer to disallow writing to the root filesystem of the sandbox.
Still allow write access to the source, tmp, out and dist directories.

Test: build aosp_cf_x86_64_phone-userdebug
Change-Id: Idf0d3a420669fbf6c3aba24e058f09a314ec6d0e
2020-04-02 18:11:28 +00:00
Bill Peckham
1c610cfed1 Include partition tag in apexkeys.txt.
The partition tag helps merge_target_files.py determine
which apexkeys.txt to select from the framework partial
target files and which to select from the vendor partial
target files. The partition tag is the pysical partition
name, for example, a system_ext module on a device where
system_ext is at system/system_ext has a system
partition tag.

Bug: 138942268
Change-Id: Ia07887b34f1aa77dae94ef23610dfef83c1a5849
Merged-In: Ia07887b34f1aa77dae94ef23610dfef83c1a5849
2020-04-02 17:15:47 +00:00
Jooyung Han
29e91d2121 Apex: support codenames for min_sdk_version
Apex can use codenames like "Q", "R" for its min_sdk_version property.
Also, cc_library can use codenames for its stubs.versions.

Bug: 152655956
Test: vendor/google/build/build_mainline_modules.sh
Change-Id: I077ad7b2ac5d90b4c8708921e43846206f05ba70
2020-04-02 23:26:41 +09:00
Vladimir Marko
e1f9a9e867 Merge "Add file with updatable BCP packages to /system/etc/" am: 1c5d4fe4f7 am: 775e40b448
Change-Id: I15c4547c43a5f68d0cb71421837b24cad4e0afe7
2020-04-02 12:33:59 +00:00
Vladimir Marko
775e40b448 Merge "Add file with updatable BCP packages to /system/etc/" am: 1c5d4fe4f7
Change-Id: Id952bbe191317dd76d77ba3bc8618e699beb5759
2020-04-02 12:09:46 +00:00
Vladimir Marko
1c5d4fe4f7 Merge "Add file with updatable BCP packages to /system/etc/" 2020-04-02 11:42:08 +00:00
Anton Hansson
d1dd0e1bd8 Merge "Remove neverallow rules for framework-mediaprovider" into rvc-dev am: 66e365565f
Change-Id: I87a5a56a61bb65fe46000bc3e42721a522ef08f4
2020-04-02 11:30:09 +00:00
Anton Hansson
66e365565f Merge "Remove neverallow rules for framework-mediaprovider" into rvc-dev 2020-04-02 11:07:17 +00:00
Nicolas Geoffray
28773b7004 Merge "Support secondary arch for host module exports." am: 11a8d879b6 am: 1dd137ab42
Change-Id: Ide0e72efcde9715a728dddae3ac287020572fb33
2020-04-02 08:44:06 +00:00
Nicolas Geoffray
1dd137ab42 Merge "Support secondary arch for host module exports." am: 11a8d879b6
Change-Id: I6904936fe7ba62b6cd292e81096f05240096b9b8
2020-04-02 08:25:39 +00:00
Nicolas Geoffray
11a8d879b6 Merge "Support secondary arch for host module exports." 2020-04-02 08:12:45 +00:00
Vladimir Marko
205e6c2a15 Add file with updatable BCP packages to /system/etc/
Make `permitted_packages` mandatory for updatable boot class
path jars. Collect the permitted_packages from those jars to
a file installed as /system/etc/updatable_bcp_packages.txt .

Test: aosp_taimen-userdebug boots.
Test: adb shell cat /system/etc/updatable-bcp-packages
Test: Manual, remove permitted_packages from framework-tethering,
      build fails.
Bug: 151314205
Change-Id: I21def97ace9081e707910d449943c683189f16cf
2020-04-02 08:51:39 +01:00
Treehugger Robot
c7917b522a Merge "Fix long mac test times; only initialize host settings once" am: 131db09396 am: f4669bc1f2
Change-Id: Ie55eac9535a07039c5f46358bac9992cba208b33
2020-04-02 04:21:07 +00:00
Jooyung Han
0968a97cab [automerger skipped] Merge "Enforce apex.min_sdk_version for bundled builds" am: bce3864ca8 am: 602328c68d -s ours
am skip reason: Change-Id If32f1b547e6d93e3955c7521eec8aef5851f908c with SHA-1 7406660685 is in history

Change-Id: Ie840626f33caee2f1cb6bf636e8099b574bda71c
2020-04-02 04:20:57 +00:00
Treehugger Robot
f4669bc1f2 Merge "Fix long mac test times; only initialize host settings once" am: 131db09396
Change-Id: Id5af2a56b4c6a69a481d495ae232f5e5416f79b3
2020-04-02 03:52:55 +00:00
Jooyung Han
602328c68d Merge "Enforce apex.min_sdk_version for bundled builds" am: bce3864ca8
Change-Id: Ice16bc693bbcb20f315351a063a9a74077222033
2020-04-02 03:52:43 +00:00
Treehugger Robot
131db09396 Merge "Fix long mac test times; only initialize host settings once" 2020-04-02 03:50:59 +00:00
Jooyung Han
bce3864ca8 Merge "Enforce apex.min_sdk_version for bundled builds" 2020-04-02 03:34:45 +00:00
Jooyung Han
7556839772 Enforce apex.min_sdk_version for bundled builds
Previously, when Q-targeting apexes are bundled-built, they are built
against the latest stubs.

It was because unwinder is linked dynamically in R and APIs are provided
by libc while Q apexes should run on Q where libc doesn't provide those
APIs. To make Q apexes run on Q device, libc++ should be linked with
static unwinder. But, because libc++ with static unwinder may cause problem
on HWASAN build, Q apexes were built against the latest stubs for bundled
build.

However, Q apexes should be built against Q stubs.

Now, only for HWASAN builds, Q apexes are built against the latest stubs
(and native modules are not linked with static unwinder).

Bug: 151912436
Test: TARGET_SANITIZE=hwaddress m
      => Q apexes(media, resolv, ..) are linked with the latest stubs
      m
      => Q apexes are linked with Q stubs,
         and Q apexes' libc++ is linked with static unwinder
Merged-In: If32f1b547e6d93e3955c7521eec8aef5851f908c
Change-Id: If32f1b547e6d93e3955c7521eec8aef5851f908c
(cherry picked from commit 7406660685)

Exempt-From-Owner-Approval: cp from internal
Change-Id: If32f1b547e6d93e3955c7521eec8aef5851f908c
2020-04-02 03:34:30 +00:00
Colin Cross
82e192c3ae Add sdk mutator for native modules
Compiling native modules against the NDK disables platform features
like ASAN.  For anything shipped on the system image there is no
reason to compile against the NDK.  Add a new mutator to Soong that
creates a platform and an SDK variant for modules that set
sdk_version, and ignore sdk_version for the platform variant.  The
SDK variant will be used for embedding in APKs that may be installed
on older platforms.  Apexes use their own variants that enforce
backwards compatibility.

Test: sdk_test.go
Test: TestJNIPackaging
Bug: 149591340
Change-Id: I7d72934aaee2e1326cc0ba5f29f51f14feec4521
2020-04-01 16:09:05 -07:00
Dan Willemsen
6ba5367a70 Fix long mac test times; only initialize host settings once
It looks like sometime in late February our Mac builds started taking
~10 minutes longer than before. On my local workstation the Soong tests
were taking >25 minutes before completing (likely because I don't have
the older SDKs installed, and we iterate from older to newer to find the
oldest installed SDK).

Most of this time was spend running the `xcrun` tools to interrogate the
system about which Mac SDKs are installed and where the tools are. This
will never change during any build or test, so wrap it all in a
sync.Once so that we only ever call them once.

And remove the macSdkPath variable, which has been unused for years and
no longer works (as we don't allow the use of xcode-select during the
build).

Bug: 153010389
Test: prebuilts/build-tools/build-prebuilts.sh on a Mac
Change-Id: I39b2d49739e628e4c11bec4805b25039115d2fd0
2020-04-01 14:44:58 -07:00
Anton Hansson
67a1f20280 [automerger skipped] Merge "Convert sdk_library to use androidmk Dist" am: 3f7534c0cb am: c14b5a0384 -s ours
am skip reason: Change-Id Id893d52cc24b66e6bd900b5062a59f3820000bcd with SHA-1 6bb8810c8e is in history

Change-Id: I3594617c0e92da364f85fab7df5cd92a16656bad
2020-04-01 20:39:19 +00:00
Anton Hansson
2ba63cb2e8 [automerger skipped] Merge "Add a Tag field to dist to dist a tagged output" am: e61c9b09e1 am: 0850dcec60 -s ours
am skip reason: Change-Id I5ba6949833a0fbb95376142aec5096ff5f084c00 with SHA-1 1e65f94a4b is in history

Change-Id: Ib94cf257cf79e9a9fc90637935958ec02f7cc347
2020-04-01 20:39:10 +00:00
Anton Hansson
c14b5a0384 Merge "Convert sdk_library to use androidmk Dist" am: 3f7534c0cb
Change-Id: I304aae4cac378fdd719b0a4ce10110fea632cd58
2020-04-01 20:20:03 +00:00
Anton Hansson
0850dcec60 Merge "Add a Tag field to dist to dist a tagged output" am: e61c9b09e1
Change-Id: I91d1703696933edbcc778078306bdf1f5dcf804d
2020-04-01 20:19:33 +00:00
Anton Hansson
3f7534c0cb Merge "Convert sdk_library to use androidmk Dist" 2020-04-01 19:52:51 +00:00
Anton Hansson
e61c9b09e1 Merge "Add a Tag field to dist to dist a tagged output" 2020-04-01 19:52:38 +00:00
Paul Duffin
becaaba147 Merge "Allow walkPayloadDeps visitor to control walk flow" am: 4ac530d4c7 am: 94d5ca9d38
Change-Id: I85dbe29fdc5b71fa923a2583621ef713d1b151a0
2020-04-01 18:29:06 +00:00
Paul Duffin
94d5ca9d38 Merge "Allow walkPayloadDeps visitor to control walk flow" am: 4ac530d4c7
Change-Id: Iaddc2f7b71795ebe3c420d7d6d01ebc9b5d6195d
2020-04-01 18:11:23 +00:00
Paul Duffin
4ac530d4c7 Merge "Allow walkPayloadDeps visitor to control walk flow" 2020-04-01 17:54:04 +00:00
David Srbecky
30dd1043ac Merge "Adjust embedded dex locations in host boot image." am: 20d854948b am: b7cc0110ec
Change-Id: I1a76ee7088de11f2e80ae515b97424e1c8bd59f8
2020-04-01 16:13:46 +00:00
David Srbecky
b7cc0110ec Merge "Adjust embedded dex locations in host boot image." am: 20d854948b
Change-Id: Ie19b70aad7ac6689ffb15bc82375cb79edefce15
2020-04-01 16:01:07 +00:00
Jooyung Han
d15e45afc1 Merge "Enforce apex.min_sdk_version for bundled builds" into rvc-dev am: 42d7718086
Change-Id: Ic8e957c4f52542b39a3a6b5f9e8d3f910fe61ca8
2020-04-01 15:52:33 +00:00
David Srbecky
20d854948b Merge "Adjust embedded dex locations in host boot image." 2020-04-01 15:42:29 +00:00
Jooyung Han
42d7718086 Merge "Enforce apex.min_sdk_version for bundled builds" into rvc-dev 2020-04-01 15:37:23 +00:00
Jiyong Park
f689b0ec7c Merge "Remove some apex_available whitelist" am: 1cda30e211 am: 41110b1cfb
Change-Id: Ieb597a084b56fbd3a18636f528e9fb1b6a963541
2020-04-01 13:36:05 +00:00
Jiyong Park
41110b1cfb Merge "Remove some apex_available whitelist" am: 1cda30e211
Change-Id: Icfccf9089fb669be2faee663b7d2516520e99eee
2020-04-01 13:18:27 +00:00
Artur Satayev
64651c3973 [automerger skipped] Merge "Use modular removed-dex.txt files for greylisting." into rvc-dev am: 0f9e77362c -s ours
am skip reason: Change-Id I4c8e6899fadfdfd1da82f6f453cc92e71aa9b78c with SHA-1 c7fb5c9964 is in history

Change-Id: I98f1857818d7170f5490ee622e62404c69745083
2020-04-01 13:15:11 +00:00