Commit Graph

21355 Commits

Author SHA1 Message Date
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
046a7cb4e9 Merge "Convert sdk_library to use androidmk Dist" am: 3f7534c0cb am: c14b5a0384
Change-Id: Iaf13e3574a5d338e08d1cd9ed5a445b36da840d2
2020-04-01 20:39:53 +00:00
Anton Hansson
0c498602d6 Merge "Add a Tag field to dist to dist a tagged output" am: e61c9b09e1 am: 0850dcec60
Change-Id: Id28b311e002ed25723840ec1b3efcbf2de3dfd0e
2020-04-01 20:39:41 +00: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
c1da6341ee Merge "Allow walkPayloadDeps visitor to control walk flow" am: 4ac530d4c7 am: 94d5ca9d38
Change-Id: I276e8541c717bfe47093a64e1c417d831ef4ff82
2020-04-01 18:29:21 +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
2479bab746 Merge "Adjust embedded dex locations in host boot image." am: 20d854948b am: b7cc0110ec
Change-Id: Ieaf1f690106b53121e798666573dcc1ea809df67
2020-04-01 16:13:46 +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
22cbc05819 Merge "Remove some apex_available whitelist" am: 1cda30e211 am: 41110b1cfb
Change-Id: Icd8dbd6eb507817f9d1fa642d5e3e3523c8ce984
2020-04-01 13:36:06 +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
Artur Satayev
0f9e77362c Merge "Use modular removed-dex.txt files for greylisting." into rvc-dev 2020-04-01 13:07:41 +00:00
Jiyong Park
1cda30e211 Merge "Remove some apex_available whitelist" 2020-04-01 13:03:10 +00:00
Felka Chang
f13642ef24 Add product_variables.eng.optimize.enabled
The default build is to enable optimization for all of module.
In order to have the feasibility to the owners of the modules,
to create product_variables.eng.optimize.enabled let the owners
to have the choice to decide whether the build enable the optimization
or not.

Test: atest -m # build soong
Test: # follow Developing for Soong & setup GOPATH
      # to run the new tests in variables_test.go
    cd $GOPATH; \
    go test android/soong/android
Test: #1. change frameworks/base/packages/SystemUI/Android.bp to change
          product_variables.eng.optimize.enabled = false;
      #2. source build/setupenv.sh;
      #3. lunch aosp_x86-eng; make -j16 SystemUI
      #4. lunch aosp_x86-userdebug; make -j16 SystemUI
      #5. aosp_x86-eng should be bigger than aosp_x86-userdebug
Bug: 130259652

Change-Id: Ie62c35458ca91d66ec65bda58d315fb971139849
2020-04-01 12:23:12 +00:00
David Srbecky
ab99498ea1 Adjust embedded dex locations in host boot image.
ART tests require that "out/host/linux-x86" is included.

This requires making the dexLocations per-variant specific.

Test: m test-art-host-gtest
Bug: 147817558
Bug: 147819342
Change-Id: I7839ee15cb6dfc62508bdd3fa0f306336af17055
2020-04-01 12:06:56 +01:00
Anton Hansson
7f0a0b8a2a [automerger skipped] Merge "Always keep rsp files" into rvc-dev am: cd4c32e556 -s ours
am skip reason: Change-Id I6fc25095442178c0bcbc1dea444ba51e9259c600 with SHA-1 6d3cad93e8 is in history

Change-Id: I69702e958e1ca512f234a7b3d253a02a6de437bf
2020-04-01 10:14:45 +00:00
Martin Stjernholm
bf37d165f0 Fix missing NOTICE targets for static libs that aren't available to
platform.

The NOTICE file generation depends on the NOTICE targets for all static
library dependencies. If such a dependency didn't have
//apex_available:platform it didn't get any AndroidMk entry and hence
no NOTICE target via soong_cc_prebuilt.mk. If it was then depended upon
by a binary or library that is accessible to platform, the NOTICE
dependency failed.

Normally such a dependency is invalid, but there are corner cases where
binaries go neither into platform nor any APEX module, and they can
legitimately have such dependencies (cf. b/152241137).

With this CL requests to skip installation of such a static libraries
are ignored so that they get AndroidMk entries, which will always have
LOCAL_UNINSTALLABLE_MODULE set.

Test: "m simpleperf_ndk" with https://r.android.com/1273016, which
  removes //apex_available:platform from libs that simpleperf_ndk
  depends on statically.
Bug: 152241137
Bug: 149217815
Change-Id: If36e85dd16ade56d4ec1d6744811df5a15b6242c
2020-04-01 11:08:41 +01:00
Anton Hansson
cd4c32e556 Merge "Always keep rsp files" into rvc-dev 2020-04-01 09:53:02 +00:00
Paul Duffin
be5a5be549 Allow walkPayloadDeps visitor to control walk flow
Delegate the responsibility for determining whether the
walkPayloadDeps() should visit a child dependency to its do function.
This is needed to allow the visitor in checkApexAvailability() to avoid
checking the apex_available setting after crossing the APEX boundary.

Bug: 152878661
Test: m droid
Change-Id: If46a2f74b6eca670befc3aeae430650e85542346
2020-04-01 09:30:31 +01:00
Dan Shi
7515af21bc [automerger skipped] Merge "Merge "Rename VTS to VTS10" am: 7182c45fe7 am: 4058983c0c am: 8989420fee am: 2d2a3643f5" into rvc-dev am: 91847d895d -s ours
am skip reason: Change-Id Iadad4ba96bf9a7f3b1d12c9d4eeb90fb1ed0841d with SHA-1 8989420fee is in history

Change-Id: If48707083d8bd1cba39b2572ab2142478b06fe4b
2020-04-01 04:46:44 +00:00
Dan Shi
91847d895d Merge "Merge "Rename VTS to VTS10" am: 7182c45fe7 am: 4058983c0c am: 8989420fee am: 2d2a3643f5" into rvc-dev 2020-04-01 04:31:32 +00:00
Hsin-Yi Chen
ee78794227 [automerger skipped] Merge "Fix the logic for selecting ABI dump paths" into rvc-dev am: 1422d6d13d -s ours
am skip reason: Change-Id Iad038cf4cd3eccc3dfbef13fab67da044498ce77 with SHA-1 27d235f918 is in history

Change-Id: I228962398436e4f3fd11667b8b38d767a80c9cb3
2020-04-01 04:15:32 +00:00
Hsin-Yi Chen
1422d6d13d Merge "Fix the logic for selecting ABI dump paths" into rvc-dev 2020-04-01 04:02:03 +00:00
Ramy Medhat
944839a88a Fix RuleBuilder remoteable actions running in the local pool.
This CL fixes a bug with RuleBuilder's handling of remoteable actions.
It adds a new type of pool to identify remoteable rules by the android
module context. The pool is then set to nil to actually run actions at
NINJA_REMOTE_NUM_JOBS parallelism.

Test: built aosp crosshatch userdebug
Change-Id: I29452f6fc7a161b94189731e3e3cc1f34907b80c
2020-03-31 22:18:40 -04:00
Dan Shi
1a9a9127b1 Merge "Rename VTS to VTS10" am: 7182c45fe7 am: 4058983c0c am: 8989420fee am: 2d2a3643f5
Bug: 151896491
Test: none

Change-Id: Iee9324c4edefef56171ecfac64fd11a9595e5f7c
Merged-In: Iadad4ba96bf9a7f3b1d12c9d4eeb90fb1ed0841d
Merged-In: Iee9324c4edefef56171ecfac64fd11a9595e5f7c
(cherry picked from commit ee3ec387b0)
2020-03-31 23:20:53 +00:00
Anton Hansson
a5cb6fe9bb Remove neverallow rules for framework-mediaprovider
We actually want some targets (in particular, the MediaProvider apk)
to link against framework-mediaprovider.

The gist of what the neverallow rule achieves (disallow general use)
is achieved equally well with visibility rules, which
framework-mediaprovider already has.

Bug: 152891096
Test: m nothing
Change-Id: Ic4b0a571985b9ad1dfdd56d45035f224a622700e
2020-03-31 20:37:26 +01:00
Dan Shi
50d3f45702 Merge "Rename VTS to VTS10" am: 7182c45fe7 am: 4058983c0c
Change-Id: If5dca2ee7d5887f2546a904ac90d7e99ee93ad3e
2020-03-31 18:01:22 +00:00
Dan Shi
8989420fee Merge "Rename VTS to VTS10" am: 7182c45fe7 am: 4058983c0c
Change-Id: Iadad4ba96bf9a7f3b1d12c9d4eeb90fb1ed0841d
2020-03-31 18:01:14 +00:00
Dan Shi
4058983c0c Merge "Rename VTS to VTS10" am: 7182c45fe7
Change-Id: I234463ef75233d4b4847f886b29a149d03f0a48b
2020-03-31 17:39:59 +00:00
Dan Shi
7182c45fe7 Merge "Rename VTS to VTS10" 2020-03-31 17:32:34 +00:00
Artur Satayev
a8ec55990f Use modular removed-dex.txt files for greylisting.
Use droidstubs for public and system stubs to provide a list of @removed APIs. As these APIs are not present in the stubs, they are not whitelisted / greylised automatically. Keep them on greylist manually.

Bug: 143864733
Test: diff out/soong/hiddenapi/hiddenapi-flags.csv
Change-Id: I4c8e6899fadfdfd1da82f6f453cc92e71aa9b78c
Merged-In: I4c8e6899fadfdfd1da82f6f453cc92e71aa9b78c
Exempt-From-Owner-Approval: clean cherry-pick
(cherry picked from commit c7fb5c9964)
2020-03-31 14:46:39 +00:00
Bill Peckham
1eccbe125d Merge "Include partition tag in apexkeys.txt." am: 0ad0e940c0 am: 525a0d1648
Change-Id: I91eab4451a8d75c53aa274de50040c12408e62cc
2020-03-31 14:14:59 +00:00
Bill Peckham
0739dcaf61 Merge "Include partition tag in apexkeys.txt." am: 0ad0e940c0 am: 525a0d1648
Change-Id: I714cbb99d49d5e4f49e7a8a88ca1a2e400947fd6
2020-03-31 14:14:49 +00:00
Bill Peckham
525a0d1648 Merge "Include partition tag in apexkeys.txt." am: 0ad0e940c0
Change-Id: I9630f3144ff12073f9205619a32c3c57803581fd
2020-03-31 14:00:43 +00:00