Commit graph

13019 commits

Author SHA1 Message Date
Christopher Ferris
6e2b6aa89e Remove libc_scudo library when building asan.
Running any executable built with asan and libc_scudo results in crashes.

Bug: 131810078

Test: Built the media processes with the sanitizer enabled verifying
Test: that the libc_scudo.so shared library is not listed in the
Test: mediaextractor and the mediaswcodec binaries.
Test: Build the media processes without the sanitizer enabled verifying
Test: that the libc_scudo.so shared library is listed in the
Test: mediaextractor and the mediaswcodec binaries.
Change-Id: Ie55a0414088787ec11d85fffcb04592ed4f23c57
Merged-In: Ie55a0414088787ec11d85fffcb04592ed4f23c57
(cherry picked from commit 753d4a69d5)
2019-05-31 14:55:38 -07:00
Colin Cross
7b8a567f44 Don't build hiddenapi flags or encode dex for unbundled builds
Builds with TARGET_BUILD_APPS shouldn't build the hiddenapi flags
or encode dex files even if frameworks/base exists.

Bug: 133343287
Test: mainline modules build
Change-Id: I0647451420fd09bb680808b35e1ad3b8f514ba46
Merged-In: I0647451420fd09bb680808b35e1ad3b8f514ba46
(cherry picked from commit 9c74a1ee85)
2019-05-29 08:38:53 -07:00
Colin Cross
f2562eb417 Cut darwinStripPool from 10 to 5
Failures in strip.sh are still occurring with darwinStripPool set to
10, try 5.

Bug: 132822437
Test: none
Change-Id: I2df247c89b6d8f6e741d4e17057b06ff9ec72b40
Merged-In: I2df247c89b6d8f6e741d4e17057b06ff9ec72b40
(cherry picked from commit badf8d691f)
2019-05-23 09:42:18 -07:00
TreeHugger Robot
9a83367822 Merge "Limit calls to strip.sh on darwin" into qt-dev 2019-05-20 23:23:23 +00:00
Colin Cross
954bb27cd9 Limit calls to strip.sh on darwin
strip.sh can use a file descriptor per .o file when run on .a files,
which can hit the system file descriptor limit on darwin.  This
causes failures when manay variants of libgcc_stripped are built
simultaneously.  Put all strip rules on darwin into a pool that
limits them to 10 concurrent processes, which will limit the file
descriptor usage to ~7500.

Fixes: 132822437
Test: no mention of darwinStripPool in out/soong/build.ninja on linux
Test: m libgcc_stripped on darwin
Change-Id: I3d4fbbd8d44d2e9059a79df113ab95336ec2c658
Merged-In: I3d4fbbd8d44d2e9059a79df113ab95336ec2c658
(cherry picked from commit ee3ea31a24)
2019-05-20 15:13:47 -07:00
Sundong Ahn
a4a385f1d5 Add No_dist property
For the sysprop apis, we don't need dist. So the No_dist property is
added for it.

Bug: 132448761
Test: m -j dist
Merged-In: I51c6a6b87ab9dc90b6825c0d4d414e958dd7b265
Change-Id: I51c6a6b87ab9dc90b6825c0d4d414e958dd7b265
(cherry picked from commit 80a87b3309)
2019-05-16 19:23:39 +09:00
Evgenii Stepanov
2c6484e334 Disable malloc fill in HWASan.
HWASan has a feature to fill malloc() memory with non-zero pattern.
This has found a bug or two in the past, but it also keep causing hard
to debug issues. The main problem is lack of diagnostics - use of
pattern-initialized memory is not an immediate crash. More often than
not it manifests as a subtle change in system behavior.

Having MemorySanitizer on Android would be nice...

This change does not affect any shipping configuration, but improves
stability of testing-only SANITIZE_TARGET=hwaddress build.

Bug: 132803232
Bug: 132652537
Bug: 131438232
Bug: 132810685
Test: SANITIZE_TARGET=hwasan on crosshatch successfully boots in ~100%
      attempt (up from ~99% currently).

Change-Id: I7dcbcdf1b8a5b8556e32690327b32f04879e5db1
2019-05-15 13:53:37 -07:00
Ian Pedowitz
c91fcb46ed Merge "Revert "Revert "Android Q is API 29""" into qt-dev 2019-05-15 16:28:52 +00:00
Nicolas Geoffray
f489589521 Pass other boot classpath locations to the apex image.
In order to evaluate the impact of framework classes being in an image.

Test: m
Bug: 119800099
Exempt-From-Owner-Approval: this is only for an experimental config, which we would like to see
the performance before build snap.

(cherry picked from commit feef2ef4d7)

Change-Id: I44ea9d99985c3e9d21602f2c612364d0cef0d1ea
Merged-In: Ib0d3acf8d2718ee443b3bffe8122a54f92257691
2019-05-13 15:09:47 +01:00
Ian Pedowitz
851de71044 Revert "Revert "Android Q is API 29""
This reverts commit 9e2bf9ec51.

Reason for revert: Rolling forward for Q-Finalization

Bug: 129975435
Bug: 129943426
Change-Id: Ic8a09aca67c189edfda4b10e5deb13716eb66adc
Test: Build
2019-05-11 17:02:50 +00:00
Elliott Hughes
ecde55669f Go back to the host sed until we have a faster prebuilt.
Bug: https://issuetracker.google.com/131747477
Test: treehugger

(cherry picked from commit 18e0d5e0f0)

Change-Id: Ie17468f622ae9f995e86f08f692874fa1a722c74
Merged-In: I120fe1200216afdb492bd1353848d12a4be1f496
2019-05-09 17:38:46 -07:00
Yi Kong
57b77658bc Merge changes from topic "libgcc_stripped" into qt-dev
* changes:
  Exclude libgcc_stripped wherever libgcc is excluded
  Revert "Revert "Strip libgcc to only keep fallback symbols""
2019-05-07 21:13:04 +00:00
Yi Kong
94b9b2655d Exclude libgcc_stripped wherever libgcc is excluded
Test: manual testing
Bug: 130267141
Bug: 29275768
Change-Id: Idbe82ea4a3e5cb9a9a7c194dd0a4d8a282d56c03
Merged-In: Icc0d50e403dc4a3592e5bf389101cdef129042df
(cherry picked from commit 3d8792f7dd)
2019-05-07 21:12:49 +00:00
Yi Kong
b0e95c1e60 Revert "Revert "Strip libgcc to only keep fallback symbols""
This reverts commit 619cd098b6.

Test: manual testing
Bug: 130267141
Change-Id: Ie156d4a3255be0ad082cda35c22bac4359852f22
Merged-In: I5b349fa6138e51663bf3b67109b880b4356da8e8
Exempt-From-Owner-Approval: Cherry pick
2019-05-07 21:11:31 +00:00
Colin Cross
00d764f7a7 Merge "Revert "Strip libgcc to only keep fallback symbols"" into qt-dev 2019-05-06 19:33:02 +00:00
Colin Cross
619cd098b6 Revert "Strip libgcc to only keep fallback symbols"
This reverts commit bd475367c3.

Reason for revert: b/130267141
Bug: 29275768
Bug: 130267141
Merged-In: I5b349fa6138e51663bf3b67109b880b4356da8e8
Change-Id: Ieab56390b27240ef7f2f52a48a673809da7bcf8e
2019-05-06 17:29:49 +00:00
TreeHugger Robot
a6957eeb1b Merge "Allow the host expr." into qt-dev 2019-05-03 20:03:07 +00:00
TreeHugger Robot
92304882f4 Merge "Emit LOCAL_MODULE_TARGET_ARCH for prebuilt_etc" into qt-dev 2019-05-03 19:33:21 +00:00
Elliott Hughes
321dd2a411 Allow the host expr.
(Kernel builds require GNU unary + extension.)

Bug: https://issuetracker.google.com/131747477
Bug: http://b/35267372 (bogus)
Test: treehugger

(cherry picked from commit 3a653f419b)

Change-Id: Ia0a0d654d0ce30bb1e06bb789d52b311aa54b836
2019-05-03 17:29:10 +00:00
Yi Kong
bd475367c3 Strip libgcc to only keep fallback symbols
We use libgcc as fallback for symbols not present in libclang_rt
builtins, however we didn't know what exact symbols were being used,
some may not be intended to fallback.

Create libgcc_stripped, which only contains unwind symbols from libgcc.

Bug: 29275768
Test: bionic-unit-tests
Change-Id: I98df02ead7f6cca4e76ec92d4f880de4e03f5b5c
Merged-In: I5b349fa6138e51663bf3b67109b880b4356da8e8
(cherry picked from commit acee27cd72)
2019-05-03 08:24:10 +00:00
Jiyong Park
6c5318266d Emit LOCAL_MODULE_TARGET_ARCH for prebuilt_etc
Absense of the flag causes problem when prebuilt_etc is configured with
compile_multilib.

Bug: 130138217
Test: choosecombo to aosp_x86_64 and build
test_com.android.media.swcodec
Check that the test APEX has 32-bit artifacts.

Merged-In: Idd28443d129ff70053295015e69328a8fa3eca47
Change-Id: I6b90668d6effc9f82f7cf3a958d4964e8f06ac8e
2019-05-03 08:41:35 +09:00
TreeHugger Robot
ead8b42a1d Merge "Disable hwasan memory stats." into qt-dev 2019-05-02 22:25:21 +00:00
Evgenii Stepanov
d98ccb44f2 Disable hwasan memory stats.
Disable a debugging feature in hwasan that seems to be causing flaky selinux
denials in the boot test:

05-02 12:11:11.360  1663  1663 I auditd  : type=1400 audit(0.0:8): avc: denied { read } for comm="iptables-wrappe" path="/proc/1015/statm" dev="proc" ino=30968 scontext=u:r:netutils_wrapper:s0 tcontext=u:r:netmgrd:s0 tclass=file permissive=0

I could not reproduce this locally, but this feature has no users and
I've verified that things keep working without it.

This does not affect any shipped product.

Bug: 131438232
Bug: 112438058
Bug: 131845076
Test: crosshatch_hwasan boot test
Change-Id: I08d46d19151e6d5221cdd56fd6864dae224fae25
2019-05-02 12:52:32 -07:00
Ian Pedowitz
6b360490e1 Merge "Revert "RESTRICT AUTOMERGE Android Q is API 29"" into qt-dev 2019-05-02 00:59:09 +00:00
Ian Pedowitz
9e2bf9ec51 Revert "RESTRICT AUTOMERGE Android Q is API 29"
This reverts commit ca6e927678.

Reason for revert: QT SDK Finalization. Will be merged again on/after May 13th

Bug: 129975435
Change-Id: Ice988aea0cab8ba462166c27b0d7f95fc7d46466
2019-05-02 00:55:30 +00:00
Ian Pedowitz
36ed555dfc Merge "RESTRICT AUTOMERGE Android Q is API 29" into qt-dev 2019-05-02 00:53:29 +00:00
Suprabh Shukla
ca6e927678 RESTRICT AUTOMERGE Android Q is API 29
Test: Only updated a constant. Builds as expected.

Bug: 129975435
Change-Id: I10bb72d59d7ffdb942b11701d3cebc383afa6a77
2019-04-30 00:17:09 +00:00
Mathieu Chartier
8910722e71 Enable app image startup cache for preopted apps
To get performance benefits here for apps that aren't installed
through the play store.

Bug: 130217075
Bug: 131310042
Test: make
Change-Id: I46dc3e4a588be52f359577ca1f0fd2dcd440c4bf
2019-04-29 11:39:18 -07:00
Colin Cross
363360c963 Support target.hostdex.required
Hostdex modules sometimes need extra required modules, add
target.hostdex.required.

Bug: 131167818
Test: manual
Change-Id: I599f3499f0b738556baeb27185371a42b4c2701b
Merged-In: I599f3499f0b738556baeb27185371a42b4c2701b
(cherry picked from commit 7f87f4fdeb)
2019-04-26 11:13:30 -07:00
TreeHugger Robot
a25a2779c6 Merge "Prebuilt APEXes are recoreded in apexkeys.txt" into qt-dev 2019-04-24 03:46:16 +00:00
Colin Cross
687fd94d44 Merge "Fix handling optimize.enabled from java_defaults" into qt-dev 2019-04-24 03:31:49 +00:00
Jiyong Park
a41f12a6fa Prebuilt APEXes are recoreded in apexkeys.txt
apexkeys.txt now correctly lists prebuilt APEXes with keys specified as
PRESIGNED.

This change also fixes a bug that non-installable APEXes are listed in
the file.

Bug: 131130235
Test: m out/soong/apexkeys.txt and check that
com.android.apex.cts.shim.apex is listed there with PRESIGNED keys.

Change-Id: Ib6d391a82864714743a1cc59cd655bea917b5073
2019-04-23 18:03:16 +09:00
TreeHugger Robot
6decc5d7ff Merge changes Ic5f467fb,I68d52668 into qt-dev
* changes:
  Ensure that PathsForModuleSrc works with prebuilts
  Fix: PathsForModuleSrc does not work for a replaced dependency
2019-04-23 06:24:22 +00:00
Jiyong Park
d37a882ad4 Set default target SDK version for APEX
Target SDK version is used for targeting an APEX to a specific set of
platform builds. Usually, the targeting is unrestricted (in case the
APEX can run on all platforms), or based on platform SDK version (e.g.
28 for P). However, when the platform is under development and SDK is
not finalized, the targeting should be much more fine-grained; the
APEX should be targeted to a very specific build that supports the same
set of APIs that the APEX was built against.

To support that, target sdk version is automatically set by the build
system. When the platform is released or SDK is finalized, the target sdk
version set to the SDK version number. If not, it is set to
<version_code>.<fingerprint> (e.g., Q.123456).
Note that the target sdk version set by the build system is used only
when the target sdk version is not explicitly set in
AndroidManifest.xml.

Bug: 130541924
Test: UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true \
UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true \
TARGET_BUILD_APPS=com.android.tzdata m
build.ninja has --target_sdk_version Q.$$(cat out/soong/api_fingerprint.txt)

Test: aapt dump badging out/dist/com.android.tzdata.apex | grep \
targetSdkVersion shows:
targetSdkVersion:'Q.6ee443d9ad5f0cca7a43cfa97b7fc62a'

Merged-In: I086230d787f01075c28fc3f0163550300fa00212
Change-Id: I086230d787f01075c28fc3f0163550300fa00212
(cherry picked from commit 71b519d6ce)
2019-04-23 14:26:06 +09:00
Colin Cross
efcdd3b4bd Merge changes from topic "framework.aidl" into qt-dev
* changes:
  Allow codename.fingerprint format for targetSdkVersion
  Build framework.aidl in Soong
  Get default sdk_test.go values from config
2019-04-22 23:26:55 +00:00
Sasha Smundak
4eaeab4442 Fix handling optimize.enabled from java_defaults
Some module types (`android_test`, etc.) set `optimize.enabled` by
default. If such module happens to have `defaults` attribute which
clears `optimize.enabled`, the latter value is ignored.

Fixes: 129858282
Test: unit tests in java_test.go,
`atest CtsExtendedMockingTestCases` succeeds with aog/936802
reverted (that is, with cts/test/mocking converted to Android.bp)

Change-Id: Ib8e3a0ab0bd489d70ed07f626082aeae31c45e7c
Merged-In: Ib8e3a0ab0bd489d70ed07f626082aeae31c45e7c
(cherry picked from commit 2057f82161)
2019-04-22 10:46:51 -07:00
Colin Cross
a3f279bd1b Fix relative path of bpf modules
Using bpf as test data installs the module into a strange
subdirectory, clear the Rel() value before exporting it as
a SourceFileProducer.

Bug: 130206035
Test: m vts_test_binary_bpf_module
Change-Id: Ifdae90d11b15d65c097562d7d6985a8a1dca2bfd
Merged-In: Ifdae90d11b15d65c097562d7d6985a8a1dca2bfd
(cherry picked from commit 0adfee5a20)
2019-04-22 17:42:23 +00:00
Colin Cross
5c87791a78 Allow codename.fingerprint format for targetSdkVersion
Use codename.fingerprint format for targetSdkVersion if it is unset
in the manifest and UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true.

Test: manual
Bug: 130541924
Change-Id: I4e3b1274cc32038b00b292dc6d67559eb320e9e4
Merged-In: I4e3b1274cc32038b00b292dc6d67559eb320e9e4
(cherry picked from commit 109328714f)
2019-04-22 10:08:35 -07:00
Colin Cross
9bdfaf0591 Build framework.aidl in Soong
Move the rules to build framework.aidl into Soong, and use it
when compiling aidl files with sdk_version: "current".

Also fixes incorrectly using the aidl includes exported by the
"framework" module when the proguardRaiseDep dependency was
added.

Bug: 130798034
Test: sdk_test.go
Change-Id: I126adf1d9e7b6acb528875ff62b974ba7ad9a337
Merged-In: I126adf1d9e7b6acb528875ff62b974ba7ad9a337
(cherry picked from commit 3047fa23da)
2019-04-22 10:08:35 -07:00
Colin Cross
31174703be Get default sdk_test.go values from config
This will help avoid merge conflicts between branches that have
additional default libraries.

Bug: 130798034
Test: sdk_test.go
Change-Id: I98d5b8b2ea939df7ef57686f3bd913d6a21edc5d
Merged-In: I98d5b8b2ea939df7ef57686f3bd913d6a21edc5d
(cherry picked from commit 901ea31b7c)
2019-04-22 10:08:17 -07:00
Jiyong Park
dfa933e6e4 Ensure that PathsForModuleSrc works with prebuilts
prebuilt_test is amended to ensure
f2976304f7 is not broken.

PathsForModuleSrc is called to check if the file is from correct module
(either from source or prebuilt module)

Bug: 130627486
Test: m

Merged-In: Ic5f467fbc2837727df92102530687e967cd5529f
Change-Id: Ic5f467fbc2837727df92102530687e967cd5529f
(cherry picked from commit d4671111ef)
2019-04-20 11:52:01 +09:00
Jiyong Park
1570c803b6 Fix: PathsForModuleSrc does not work for a replaced dependency
PathsForModuleSrc does not work if a source module is replaced with a
prebuilt module. This is because the function uses GetDirectDepWithTag
with the name of the original source module. Since the dependency is
replaced and the prebuilt module has the name "prebuilt_<name>", the
search always fails.

Fixing this by re-implementing GetDirectDep* functions inside Soong
using VisitDirectDep.

Bug: 130627486
Test: m
Merged-In: I68d52668283c429d5e93c7f2c81f6a8db1f24893
Change-Id: I68d52668283c429d5e93c7f2c81f6a8db1f24893
(cherry picked from commit f2976304f7)
2019-04-20 11:51:22 +09:00
Yi Kong
ac9e61536f Switch to clang-r353983c
Test: TreeHugger
Bug: 129712936
Change-Id: Ie1545f174017dbceab25a4e420c015230d74e97a
Merged-In: I15f1db69de86ad8b9f2a0ae086fa2df87835948a
(cherry picked from commit 09ecee7686)
2019-04-19 15:22:11 -07:00
Jesse Hall
962462b203 Merge "Fix: HideFromMake is not registered to llndk_* module types" into qt-dev 2019-04-19 18:18:45 +00:00
Jiyong Park
a1bc838ce1 Fix: HideFromMake is not registered to llndk_* module types
llndk_* module types are not initialized via cc.Module.Init(). As a
consequence, mutated properties like HideFromMake, etc. were not
registered and this caused problem when the mutated properties are set
by one of the mutators like the sanitizerMutator. Specifically, both
asan and non-asan variant of an llndk_header were both exported to Make
although HideFromMake was set to true for the non-asan variant.

Fixing this bug by explicitly registering BaseProperties struct which
contains the mutated properties.

Bug: 130652996
Test: Following works:
$ lunch aosp_cf_x86_pasan-userdebug
$ mkdir frameworks/native/test && mkdir frameworks/native/test/include
$ cat > frameworks/native/test/Android.bp
llndk_headers {
    name: "test_headers",
    export_include_dirs: ["include"],
}
^D
$ SANITIZE_TARGET='address' make

Change-Id: I44e3668460448d79382617df61171b0ab5b4d98d
Merged-In: I44e3668460448d79382617df61171b0ab5b4d98d
2019-04-18 14:41:51 -07:00
Dan Willemsen
6128b85885 TARGET_FS_CONFIG_GEN is a list, not a single path
Bug: 130787336
Test: m oemaids_header_gen oemaids_headers passwd group
Test: Set TARGET_FS_CONFIG_GEN to a list of paths
Change-Id: Ic1f7d38239f3f805ca0723c24005d3e18a811870
Merged-In: Ic1f7d38239f3f805ca0723c24005d3e18a811870
(cherry picked from commit 54879d193e)
2019-04-18 14:27:46 -07:00
TreeHugger Robot
5cd481adde Merge "Make makevars deterministic" into qt-dev 2019-04-17 00:23:03 +00:00
Colin Cross
1bdf650bb1 Make makevars deterministic
Sort map keys before iterating over them to produce makevars.

Bug: 130411407
Test: m checkbuild
Change-Id: I4153977705da05a5c73e641f93d02f408209c897
Merged-In: I4153977705da05a5c73e641f93d02f408209c897
(cherry picked from commit 91268c668c)
2019-04-16 14:50:10 -07:00
Jaewoong Jung
cf0caaa98d Merge "Embed CSS entries in soong_build.html." into qt-dev 2019-04-16 19:56:40 +00:00
Jaewoong Jung
892c512fd8 Embed CSS entries in soong_build.html.
This will prevent it from being affected by future css location changes.

Test: m soong_docs
Fixes: 130567020
Change-Id: I80fd7b8a12a32bcea7b270423b8d8f8dc0976177
Merged-In: I80fd7b8a12a32bcea7b270423b8d8f8dc0976177
(cherry picked from commit 5f867c0580)
2019-04-16 11:38:05 -07:00