Commit graph

18399 commits

Author SHA1 Message Date
Baligh Uddin
5b16dfb39a Allow for setting a logging_parent for an Android App.
Unit test: go test ./... -test.v -run TestOverrideAndroidApp
Unit test: python manifest_fixer_test.py

BUG: 148198056
Change-Id: Ib5ff235d2a93e88b86aec1c0b16327ea938a094d
2020-02-18 09:37:56 -08:00
Paul Duffin
25ce04bd3a Add support for cc_binary in module_exports
Bug: 142920869
Test: m nothing
Change-Id: Ib7e16cb323806782c2186e73e13642e4485fc149
2020-02-18 16:17:35 +00:00
Kousik Kumar
2976bfd568 Do not add ccWrapper to ccNoDeps rule
The "ccNoDeps" rule was introduced to separate out ".s" compilations
from other ".S" and ".c*" compilations. The ".s" compilation does not
produce a dependency file and does not support running a preprocessor
through it.
However, it does have ".include" directives, that do NOT take a macro,
but still does the equivalent of a "#include". The compilation of ".s"
assembly files also do NOT produce a dependency file.

Because they don't produce a dependency file AND because RBE's input
processor does not yet support finding dependencies for these files, I'm
making this change to not prepend rewrapper for these commands.

Test: Tested by running a build with this change and ensuring the ".s"
compilations aren't being sent to rewrapper.

Change-Id: I60bb14ff92596e4992e9f675bdc199f1440d4327
2020-02-18 08:00:17 -08:00
Jaewoong Jung
9bc4a38707 Merge "Simple refactoring of prefix related functions." am: 36b6aec26a
Change-Id: I021d75ff57aa08827fbc365066dd207f6473584c
2020-02-18 15:19:38 +00:00
Jaewoong Jung
36b6aec26a Merge "Simple refactoring of prefix related functions." 2020-02-18 15:08:41 +00:00
John Eckerdal
974b0e80c7 Add CCACHE_DIR to allowed environment variables
Trying to override the default directory for ccache by using the
CCACHE_DIR environment variable fails unless it is in the allowed
list.

Bug: 149670916
Test: manual
Change-Id: I8e7eea7a5c25d7ea5f0956fafc70d62522f3c4fc
2020-02-18 12:28:53 +01:00
Treehugger Robot
bb66146f20 Merge "sdk_version: "system_server_current"" am: 7c9662a8e9
Change-Id: Iff265e505e34e084599aa69fbdca0df87afd02e5
2020-02-18 10:04:09 +00:00
Treehugger Robot
7c9662a8e9 Merge "sdk_version: "system_server_current"" 2020-02-18 09:55:54 +00:00
Chih-Hung Hsieh
287a13fc7e Switch from clang-r377782 to clang-r377782b
Bug: 149509676
Test: make checkbuild
Change-Id: I30c4cda700522968da443cebd3a67a1c428ba2ef
2020-02-18 07:48:13 +00:00
Inseob Kim
c3b1a166d2 Fix build error on vendor_snapshot_static
Without this, Makefile wasn't able to link against
vendor_snapshot_static library.

Bug: 149252327
Test: manual linking
Change-Id: Idd65656b58d12f8489827df081ef08e40ceb5af9
2020-02-18 12:42:54 +09:00
Nicolas Geoffray
47cbfcdd3e Add system server jars expressed in make in the system server classpath.
This was missed in:
https://android-review.googlesource.com/c/platform/build/soong/+/1180134

Test: lunch and build ARC, check SYSTEMSERVERCLASSPATH
Bug: 148944771
Bug: 141785760
Bug: 140451054
Change-Id: I619aee5441f7233010067a6c780e978f38ba7796
2020-02-17 19:47:05 +00:00
Inseob Kim
2b96bf5441 Do not hide VNDK prebuilts from make
Flattened APEXes don't install modules hidden from make. This CL unhides
VNDK prebuilt modules to make VNDK APEX work correctly. The suffix for
VNDK prebuilt is still omitted if the version of prebuilt is same with
BOARD_VNDK_VERSION.

Bug: 149542527
Test: build arm64 GSI and flash
Test: Set BOARD_VNDK_VERSION and build
Change-Id: I54a7c14c93eccfefc81603ec3bb474a031bc55af
2020-02-17 19:01:13 +09:00
Jackal Guo
e8c1a8fddb Merge "Revert "Turn on the instrumentation by default for the java code in APEXes"" am: 954b29728d
Change-Id: I838bbd0ca6da2a8c01b8af4cced575374db7fe9f
2020-02-17 05:23:05 +00:00
Jackal Guo
954b29728d Merge "Revert "Turn on the instrumentation by default for the java code in APEXes"" 2020-02-17 05:12:06 +00:00
Jackal Guo
c021ea0b35 Revert "Turn on the instrumentation by default for the java code in APEXes"
This reverts commit 33b6654eea.

Reason for revert: verify build breakage

Change-Id: I712a9de8ca3bfb17c36d3b8efa6176cdaf26640e
2020-02-17 03:25:56 +00:00
Treehugger Robot
0c7a78cf82 Merge "Add apex name to description" am: 2fe818f8b0
Change-Id: I7f5c3b6935399711f928ddbe96d1d485ee8136de
2020-02-15 00:44:42 +00:00
Treehugger Robot
2fe818f8b0 Merge "Add apex name to description" 2020-02-15 00:29:31 +00:00
Jaewoong Jung
3aff5787e2 Simple refactoring of prefix related functions.
Rename the two prefix-in-list funcs so that their usages are clearer.
Also find and replace all the code that essentially does either.

This introduces additional loops in some places, but I think the added
readability and simplicity outweighs the performance degradation, which
should be negligible anyway.

Test: m nothing
Test: TreeHugger
Change-Id: I37e2276ca0c815105ed0031f23c0b1264b480e4f
2020-02-14 14:33:49 -08:00
Treehugger Robot
8e254a5fdb Merge "Turn on the instrumentation by default for the java code in APEXes" am: 1d62b1c536
Change-Id: Iba752fc4929e26106f19d3f260a68bfc033915b1
2020-02-14 22:11:32 +00:00
Treehugger Robot
1d62b1c536 Merge "Turn on the instrumentation by default for the java code in APEXes" 2020-02-14 21:55:40 +00:00
Treehugger Robot
81c9f33aba Merge "Allow using test_config_template for CTS tests." am: f1366a339e
Change-Id: Iaa70fdd84927c58b8f677708b0109aec21bcaddb
2020-02-14 20:34:15 +00:00
Dan Willemsen
b13a9487a0 Add apex name to description
Otherwise we see multiple concurrent builds of different actions with
the same description:

    0:09 //external/fmtlib:fmtlib clang++ src/format.cc
    0:09 //external/fmtlib:fmtlib clang++ src/format.cc
    0:09 //external/fmtlib:fmtlib clang++ src/format.cc
    0:09 //external/fmtlib:fmtlib clang++ src/format.cc
    0:09 //external/fmtlib:fmtlib clang++ src/format.cc

Is now:

    0:09 //external/fmtlib:fmtlib clang++ src/format.cc
    0:09 //external/fmtlib:fmtlib clang++ src/format.cc [com.android.resolv]
    0:09 //external/fmtlib:fmtlib clang++ src/format.cc [com.android.adbd]
    0:09 //external/fmtlib:fmtlib clang++ src/format.cc [com.android.art.debug]
    0:09 //external/fmtlib:fmtlib clang++ src/format.cc [com.android.media]

Test: m  <watch output>
Change-Id: Ib8fccc144e8fe5fc33cafe8536538b892bd42765
2020-02-14 12:33:52 -08:00
Treehugger Robot
f1366a339e Merge "Allow using test_config_template for CTS tests." 2020-02-14 20:22:48 +00:00
Vic Yang
77def87329 Another round of no-vendor-variant VNDK whitelist cleanup
Bug: 148082691
Test: Build success
Change-Id: Id33fd52ec3cae33322131cd9d1227522af6f2bca
2020-02-14 19:02:25 +00:00
Chih-Hung Hsieh
0e5bb2786f Enable bool-operation warning
Bug: 148287141
Test: make
Change-Id: Icec118284025d0631ad3db64e19c5efe3c21ce13
2020-02-14 10:34:44 -08:00
Ivan Lozano
5d1461877d Merge "Remove execute-only support." am: d0bf3dbea8
Change-Id: I81aa645e661777cad9ff2b3ef1a20470821713d4
2020-02-14 14:56:52 +00:00
Ivan Lozano
d0bf3dbea8 Merge "Remove execute-only support." 2020-02-14 14:42:49 +00:00
Lorenzo Colitti
e29c21e830 Allow using test_config_template for CTS tests.
Currently, soong will not autogenerate AndroidTest.xml files for
CTS tests. The comment says that this is because they can be used
for test data (in which case, autogenerating an AndroidTest.xml
file would not be correct).

Allow autogeneration of test files in the case that the buid rule
explicitly requests it using a test_config_template. This allows
CTS tests to use test_config_template.

Also remove a TODO that was already addressed by aosp/903934.

Test: patching aosp/1235232 and running "m CtsNetTestCases" results in test config
Change-Id: Ic3450b67c47745af5932edd82452fdf16d937ea7
2020-02-14 18:42:06 +09:00
Peter Collingbourne
dc4f986b2a Statically link the unwinder into binaries packaged into an unbundled APEX with legacy_android10_support: true.
Bug: 149075752
Test: tapas com.android.conscrypt com.android.tethering arm64
Test: m out/target/product/generic_arm64/{,symbols/}apex/com.android.{tethering,conscrypt}/lib64/libc++.so
Test: Verified that unwinder was dynamically linked to tethering's
Test: libc++ and statically linked to conscrypt's.
Test: lunch flame-userdebug && m
Test: Verified that unwinder was dynamically linked to /system/lib64/libc++.so
Change-Id: I98eed7cb4316962b19b5c12e150c224c25d0e91d
2020-02-13 22:29:44 -08:00
Treehugger Robot
b4ea5e1069 Merge "Bump the macOS version to 10.10." am: edb3174967
Change-Id: I992d880fe116b1fc2f1c450e024bbc2299a7f0f8
2020-02-14 05:54:58 +00:00
Treehugger Robot
edb3174967 Merge "Bump the macOS version to 10.10." 2020-02-14 05:40:16 +00:00
Dan Willemsen
fa974a0c29 Remove empty directories when removing previously installed files am: 46459b08bb
Change-Id: Ie68b6b8f37b655fb3e52b2643fd6936007afcd33
2020-02-14 05:05:14 +00:00
Dan Willemsen
46459b08bb Remove empty directories when removing previously installed files
Apparently PackageManager gets confused when the apk disappears, but the
directory still exists.

Test: lunch aosp_arm-eng; m BasicDreams
      <remove BasicDreams from PRODUCT_PACKAGES>
      m nothing
      ls out/target/product/generic/system/app
Change-Id: I486c0ddadde55fad226049d3fb0f09af88117da0
2020-02-13 18:34:22 -08:00
Jeffrey Huang
e7f62e9019 Merge "Remove liblog from whitelist" am: 7d8ecd0bc1
Change-Id: I492d7a1dc258bece8e005483e35d72812fc06a7d
2020-02-14 00:57:49 +00:00
Jeffrey Huang
7d8ecd0bc1 Merge "Remove liblog from whitelist" 2020-02-14 00:45:22 +00:00
Elliott Hughes
7622713c8d Bump the macOS version to 10.10.
Android Studio only claims to support macOS 10.10 and later, so we
probably shouldn't bother with anything older either.

Test: treehugger
Change-Id: I478cb52221198d7b7e2247dfbee4cd86d5bbd1a8
2020-02-13 16:23:12 -08:00
Dan Shi
403c9d3e7a Allow vts config to be packaged in other test suites
Bug: 149249068
Test: m vts-core
Change-Id: I582ceec53cf7747f5754613cf774871c84776cf5
2020-02-13 16:06:49 -08:00
Treehugger Robot
933fb89a3f Merge "apexDepsMutator is a top-down mutator" am: 680afd7bc7
Change-Id: I531b18b61409e49cfb49b62ab6cdf16d4193b600
2020-02-13 22:33:43 +00:00
Treehugger Robot
d0b12394bc Merge changes from topic "dex2oat-soong-dep-2" am: c9f9ab89a9
Change-Id: I5992bdf9b8dc27766384ff613c22cd6fd41aee54
2020-02-13 22:32:35 +00:00
Treehugger Robot
680afd7bc7 Merge "apexDepsMutator is a top-down mutator" 2020-02-13 22:29:23 +00:00
Jiyong Park
33b6654eea Turn on the instrumentation by default for the java code in APEXes
Bug: 149353192
Test:  DIST_DIR=dist_dir TARGET_BUILD_VARIANT=userdebug
EMMA_INSTRUMENT=true NATIVE_COVERAGE=true
TARGET_BUILD_APPS="com.android.media"
vendor/google/build/build_unbundled_coverage_mainline_module.sh and
check that jacoco-report-classes.jar is created.
Change-Id: I28e3dc82b7913f60b2278126fca255306e48a424
2020-02-14 07:21:56 +09:00
Treehugger Robot
c9f9ab89a9 Merge changes from topic "dex2oat-soong-dep-2"
* changes:
  Do all dexpreoptDisabled checks before registering a dex2oat host dep.
  Pass dexpreopt config structs by reference.
  Reland: Get the dex2oat host tool path from module dependency on the binary module.
  Reland: Move the Once cache for dexpreopt.GlobalConfig into the dexpreopt package.
  Reland: Separate dexpreopt.GlobalSoongConfig to allow independent caching of it.
2020-02-13 22:21:45 +00:00
Chih-hung Hsieh
1c04724bbd Merge "Switch from clang-r370808b to clang-r377782" am: 8744cdffeb
Change-Id: I406104366acbab55433d2e84baec979acf64d01d
2020-02-13 21:59:34 +00:00
Chih-hung Hsieh
8744cdffeb Merge "Switch from clang-r370808b to clang-r377782" 2020-02-13 21:46:35 +00:00
Jeffrey Huang
f0ae6ccaa7 Remove liblog from whitelist
Bug: 145923087
Test: m -j
Change-Id: Ib1b711c01262ce9466cdd49daa3cc7142376004c
2020-02-13 12:33:39 -08:00
Ivan Lozano
8107b85189 Remove execute-only support.
With kernel support being removed for execute-only memory layouts,
remove support for XOM until there's kernel support again.

This allows us to gain the code-size improvements from
"-z noseparate-code".

Bug: 147300048
Test: Compiled binaries no longer marked XOM by default.
Change-Id: Ie84bdd2ca025e8b14867008291bf9ce143b5e999
2020-02-13 13:50:34 -05:00
Martin Stjernholm
6d415273c0 Do all dexpreoptDisabled checks before registering a dex2oat host dep.
Also disable dexpreopting for host. These are necessary to avoid adding
dependencies on dex2oat in various non-platform builds where they will
break.

Since we cannot assume at least one module enables dexpreopting now,
the two dexpreopt singletons are silently disabled if there has been no
call to dexpreopt.GetGlobalSoongConfig.

Bug: 145934348
Bug: 148312086
Bug: 148319588
Bug: 148690468
Test: m
Test: env OUT_DIR=out-tools prebuilts/build-tools/build-prebuilts.sh
  on the aosp-build-tools branch
Test: build/soong/soong_ui.bash --make-mode static_sdk_tools dist DIST_DIR=out-dist BUILD_HOST_static=1
  on internal (cf b/148312086#comment8)
Test: build/soong/soong_ui.bash --make-mode dist DIST_DIR=out-apps TARGET_BUILD_APPS=Launcher3 TARGET_BUILD_VARIANT=userdebug
  on internal without art/ and external/vixl/ (cf b/148319588)
Change-Id: I240dade7204b87fc2d12181534ab23439eca8b46
2020-02-13 17:46:48 +00:00
Martin Stjernholm
8d80ceeb12 Pass dexpreopt config structs by reference.
Should cut down on a bit of copying, and also required for an upcoming
CL that'll change GetCachedGlobalSoongConfig.

Test: m nothing
Bug: 145934348
Change-Id: I6bed737d9b061b5239cc603ad881f4ccd4312e43
2020-02-13 17:46:48 +00:00
Martin Stjernholm
d90676fdde Reland: Get the dex2oat host tool path from module dependency on the
binary module.

This uses the Once cache for GlobalSoongConfig to propagate the dex2oat
path from a module dependency to the singletons (both the one that
writes out dexpreopt_soong.config and the one that creates the
dexpreopted boot images). Unless dexpreopting is disabled altogether
through DisablePreopt in dexpreopt.config, that means:

- We must ensure at least one module registers a dex2oat tool
  dependency and resolves a GlobalSoongConfig using it, or else the
  singletons fail. That means we litter dex2oat dependencies in java
  modules even when they won't get dexpreopted and hence don't really
  need them.

- We still assume there's at least one java_library or android_app in
  the build.

This relands https://r.android.com/1205730 without changes - the
necessary fixes are in the child CLs.

Bug: 145934348
Test: m
  (check that out/soong/dexpreopt_soong.config points to dex2oatd64)
Test: env USE_DEX2OAT_DEBUG=false m
  (check that out/soong/dexpreopt_soong.config points to dex2oat64)
Test: env OUT_DIR=out-tools prebuilts/build-tools/build-prebuilts.sh
  on the aosp-build-tools branch
Change-Id: I66661711b317d1e4ec434861982919bdde19b575
2020-02-13 17:46:48 +00:00
Martin Stjernholm
40f9f3c061 Reland: Move the Once cache for dexpreopt.GlobalConfig into the
dexpreopt package.

Preparation for a future CL that will need to get the make-written
GlobalConfig from within dexpreopt.

Also rename the Load*Config functions to Parse*Config, since they don't
actually load the config files anymore.

This relands https://r.android.com/1211982.

Bug: 145934348
Test: m
Change-Id: Icb9332a93811d77d2d8b06e983b92501b180a358
2020-02-13 17:46:48 +00:00