Commit Graph

16864 Commits

Author SHA1 Message Date
Ramy Medhat dd0418a4d4 Run non-RBE supported actions in the local pool when USE_RBE is set.
Bug: 143938974
Test: ran CTS build at -j500 successfully.
Change-Id: I55074bd67308cd716972e24fb56a20bc393d5d9d
2019-11-05 22:57:35 +00:00
Ivan Lozano b2df9f88eb Soong Rust source clean up.
Break up some of the longer lines in the Rust source and refactor the
TransformSrcto* functions to take fewer arguments.

Bug: N/A
Test: m -j crosvm.experimental
Change-Id: Ia0deb8bfe3e1bfd07ef35633e9a7e6f5e799b3a3
2019-11-05 12:16:46 -08:00
Pete Gillin abbcddaaf4 Switch to an OpenJDK 11 toolchain by default.
Prior to this change, the default was to use and OpenJDK 9 toolchain,
with the EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN=true environment
variable available to opt into OpenJDK 11. After this change, the
default is to use OpenJDK 11, with
EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN=false available to opt out.

This change affects:
 - The version of javac used.
 - The version of javadoc used.
 - The version of other tools used during the build process (e.g. jar,
   jmod, and jlink).
 - For Java bytecode executed on the host, the version of the java
   executable used, and so the versions of the JVM and the OpenJDK
   libraries in the system module (or bootclasspath).

This change does not affect:
 - The Java language level, i.e. the version of Java expected in
   source code (the -source option to javac) or the version of Java
   bytecode produced (the -target option to javac).
 - Anything to do with code execution on the device.

Bug: 131683177
Test: make java droid docs cts tests
Test: zcat out/verbose.log.gz | grep 'prebuilts/jdk/jdk[0-9]*'
Test: make RunBluetoothRoboTests RunCarSettingsLibRoboTests
Test: cts-tradefed help
Test: atest CtsHostTzDataTests
Test: atest CtsLibcoreTestCases
Change-Id: I09dc22f1af4d1f2d7d3b85c08cb0ed9a1105aaca
Merged-In: Iaae89ef25c92ec099575c026fc50e41da4e143e8
2019-11-05 11:33:58 +00:00
Sasha Smundak 4f34c7c160 Merge "Make the changes to emitXrefRule matching those in aosp/1145829"
am: af60d490ff

Change-Id: I8f0714bf0c35ae388d1d7456e344245402d4258e
2019-11-04 20:14:47 -08:00
Inseob Kim 44df62da53 Merge "Fix and generate vndk snapshot entirely in Soong"
am: fe0c50e0d0

Change-Id: I1e1c5238214bd39ee4ebfa78f80903ce6ba8a5cb
2019-11-04 20:12:52 -08:00
Treehugger Robot af60d490ff Merge "Make the changes to emitXrefRule matching those in aosp/1145829" 2019-11-05 03:50:28 +00:00
Treehugger Robot fe0c50e0d0 Merge "Fix and generate vndk snapshot entirely in Soong" 2019-11-05 03:48:51 +00:00
Dan Willemsen 8d4d7bee6d Add python3 embedded launcher support
Test: m par_test{,3}; build/soong/python/tests/runtest.sh
Change-Id: I9c0fac9e2947616fdeedbfc55026dc3065966e71
2019-11-04 19:48:19 -08:00
Jiyong Park 8dabf70ec2 Merge "-l option soong_zip can accept a file having space separated list"
am: f66a280354

Change-Id: Ide7209e520012eaa60c912fb20ffc4fefedd707b
2019-11-04 18:21:02 -08:00
Treehugger Robot f66a280354 Merge "-l option soong_zip can accept a file having space separated list" 2019-11-05 02:14:48 +00:00
Ivan Lozano 4a66bfdb7a Merge "Enforce correct rust library file names."
am: 5a4b36499d

Change-Id: I0c65096e878642454b0f111ce72f64de183be963
2019-11-04 18:07:00 -08:00
Treehugger Robot 5a4b36499d Merge "Enforce correct rust library file names." 2019-11-05 01:54:21 +00:00
Sasha Smundak 09950a4f4f Make the changes to emitXrefRule matching those in aosp/1145829
Test: build kzip
Bug: 121267023
Change-Id: Id3a70d113dd7c24071cbb7cbfbf138527991cb77
2019-11-04 16:35:32 -08:00
Colin Cross 8177ad2932 Add GlobWithDeps to MakeVarsContext
It is safe to use GlobWithDeps in MakeVarsContext, the globSingleton
is registered in boostrap.Main, which runs after all the Soong
singletons (including makeVarsSingleton) are registered.

Bug: 143324390
Test: m checkbuild
Change-Id: I2edf915c666bd5db535c761bb645a48c4f573a65
2019-11-04 10:27:48 -08:00
Adrian Roos 3b8f1cda45 API Lint: Archive lint errors
Adds reported lint errors to dist. This lets us track them and
build tooling on top.

Bug: 138440867
Test: make dist droid; ls -l out/dist/apilint
Change-Id: I75629e3d9e1a53d161d844dfac121a5998429e04
2019-11-04 19:04:52 +01:00
Ivan Lozano ad8b18b872 Enforce correct rust library file names.
rustc expects libraries and proc_macro filenames to conform to
a particular format, alphanumeric with underscores and lib${crate_name}.*.
Enforce this with a check when getStem() is called.

This makes the crate_name property required for proc_macros and
libraries. This also removes the notion of a default crate name derived
from the module name. It's not needed for binaries, so this won't impact
them.

Bug: 143579265
Test: m -j crosvm.experimental
Change-Id: I2770cf7d02dd4291c3d240d58d242b940098dcee
2019-11-04 09:20:08 -08:00
Ulyana Trafimovich 2bbb569b08 Merge "Disable dexpreopt on targets that do not include default ART config."
am: 940ef19f77

Change-Id: I4981e09708b328b3d6f5fbc61907dea39c4dcba6
2019-11-04 04:20:02 -08:00
Jiyong Park 29081e311a Merge "stem property of java modules are propagated to Make"
am: 5622d5351d

Change-Id: Ib952ed36c96b814ed5ca983ea93cdde65d5f3ffd
2019-11-04 04:08:28 -08:00
Ulyana Trafimovich 940ef19f77 Merge "Disable dexpreopt on targets that do not include default ART config." 2019-11-04 12:04:04 +00:00
Jiyong Park 5622d5351d Merge "stem property of java modules are propagated to Make" 2019-11-04 09:46:42 +00:00
Inseob Kim 242ef0c4de Fix and generate vndk snapshot entirely in Soong
- VNDK snapshot now respects stem and suffix.
- ld.config.txt is removed from snapshot as linkerconfig has become default.
- Soong builds entire snapshot, and make just calls dist-for-goals.

Bug: 142589718
Test: build and install snapshot
Test: development/vndk/snapshot/update.py with past version of snapshot
Change-Id: Id1ed658c22bb2e41c0ee50d1fe2a97924a76d7dc
2019-11-04 17:03:25 +09:00
Jiyong Park 04bbf98e06 -l option soong_zip can accept a file having space separated list
-l option of soong_zip is used to specify the list of input files that
should be zipped. However, it only accepted newline-separated list in the
file. This prevented us from using a rspfile as paths in rspfile are
space-separated in a single line. Fixing the problem by splitting the
file content by any unicode whitespace character including newline and
space.

Test: zip_test
Change-Id: Iba572109e30c01540eacf20bd2794ba60c870fa3
2019-11-04 14:23:07 +09:00
Inseob Kim 3af01a3fc9 Merge "Fix vendor variants generation of vndk"
am: f68f98eeb6

Change-Id: I619ac38162fafdd300902a3deccfc5eaa9dabd8a
2019-11-03 18:10:52 -08:00
Treehugger Robot f68f98eeb6 Merge "Fix vendor variants generation of vndk" 2019-11-04 02:00:41 +00:00
Jiyong Park 5a8ab0f617 Merge "Remove api_srcs property from java_sdk_library"
am: bb7c5d4f69

Change-Id: Ib9ce3ef94f18a29bb1a4dd8fca0ec9a21f9cbd6e
2019-11-02 01:14:12 -07:00
Jiyong Park bb7c5d4f69 Merge "Remove api_srcs property from java_sdk_library" 2019-11-02 08:00:04 +00:00
Peter Collingbourne 103a6b2c25 Add support for $(TARGET_EXPERIMENTAL_MTE) in product configs.
am: c66baf70f6

Change-Id: Iab61c748b341a1df695ea5df66bfbc2f9534554e
2019-11-01 19:13:55 -07:00
Peter Collingbourne c66baf70f6 Add support for $(TARGET_EXPERIMENTAL_MTE) in product configs.
We are bringing up support for ARM Memory Tagging Extension in the platform,
but the required patches have not yet landed in the upstream kernel. This
change adds support for a product variable that products may set to true to
declare support for an experimental userspace interface to MTE. Setting the
variable to true causes a product configuration to be enabled which will
activate code in bionic and scudo that uses the interface.

This variable should not be set to true in shipping products because
the userspace interface has not been finalized and is subject to change.
Once the support patches have landed in the kernel, bionic and scudo will
be changed to use the official interface and the variable will be removed.

Bug: 135772972
Change-Id: I8ba5dea4de374eb6775edb6d4e3c0cf9cad8d760
2019-11-01 15:32:54 -07:00
Jooyung Han 4608595e74 Merge "delete redundant code"
am: 1f056cd69d

Change-Id: I9a445cfdef794cc913eff5e210ac26c07597975e
2019-11-01 11:43:33 -07:00
Treehugger Robot 1f056cd69d Merge "delete redundant code" 2019-11-01 18:15:33 +00:00
Ulya Trafimovich acb33e0b65 Disable dexpreopt on targets that do not include default ART config.
Dexpreopt build commands should only be generated on targets that
include build/make/target/product/runtime_libart.mk, which sets the
necessary variables such as PRODUCT_SYSTEM_DEFAULT_PROPERTIES that
contain default values passed to dex2oat. This file also sets a
variable PRODUCT_USES_DEFAULT_ART_CONFIG that is used in
build/make/core/dex_preopt.mk to decide if boot images should be
installed.

On some targets build/make/target/product/runtime_libart.mk is not
included. Prior to this patch, on such targets invalid dexpreopt
commands were generated, but not used, so they did not cause any
visible build failures. The invalid commands can be grepped as:

  lunch qemu_trusty_arm64-userdebug && m nothing \
    && fgrep -e '-Xms ' $ANDROID_BUILD_TOP/out/soong/build.ninja

In this case '-Xms ' is an ill-formed option passed to dex2oat (the
option expects one argument, but none is passed).

This patch makes the DisablePreopt variable passed from make to
soong more strict: it not only requires WITH_DEXPREOPT, but also
PRODUCT_USES_DEFAULT_ART_CONFIG. This means that dexpreopt commands
will not be generated on targets that do not include
build/make/target/product/runtime_libart.mk.

Test: lunch aosp_walleye-userdebug && m \
    && find $ANDROID_BUILD_TOP/out -name 'boot.art'
    # expect to find files in /out/target/product/walleye/system/framework/$ARCH/

Test: lunch qemu_trusty_arm64-userdebug && m \
    && fgrep -e '-Xms ' $ANDROID_BUILD_TOP/out/soong/build.ninja
    # expect empty output

Change-Id: If2d4fe2cdcb6a81c7c6d730d18c2b681a74fb0b7
2019-11-01 17:59:42 +00:00
Jeongik Cha 75b83b0a81 Link type will be check in android_library also
For now, Soong checks link-type in java_library, so it cannot block hidden api usage from android_library that app links with.
So we should add check in 'android_library'

Test: m nothing
Change-Id: Ic040270ec668bdd693b690ac8a88be1048922c3b
2019-11-01 15:29:15 +09:00
Inseob Kim bc093672ed Fix vendor variants generation of vndk
Current routine to check whether BOARD_VNDK_VERSION variant is created
or not is not correct, because only non-VNDK modules are installed in
/vendor. Thus, BOARD_VNDK_VERSION variants should only be created with
non-VNDK modules.

Bug: N/A
Test: m nothing
Change-Id: I2ee7821fce407214ac6be4f4b6d62483c907971f
2019-11-01 13:28:59 +09:00
Sundong Ahn 9d0d807e2b Merge "Create variants for each image type"
am: 549f6c235f

Change-Id: I9e5fcbcf2d800aef41a3aa7148f15958eb342a75
2019-10-31 19:18:02 -07:00
Jooyung Han edb5a3ae18 Merge "apex: Restrict usage of "use_vendor""
am: e9b33cd8f8

Change-Id: If71ee0914b569660ba6f9e334d69aa883d46dfde
2019-10-31 19:14:31 -07:00
Treehugger Robot 549f6c235f Merge "Create variants for each image type" 2019-11-01 02:13:52 +00:00
Jooyung Han ed3d5d730b Merge "Soong generates vndk-related .libraries.txt files"
am: 7acbfc033d

Change-Id: Ia675bafa6f6e367883af3348a514d981ca3166e8
2019-10-31 19:12:56 -07:00
Jooyung Han e9b33cd8f8 Merge "apex: Restrict usage of "use_vendor"" 2019-11-01 01:58:33 +00:00
Jooyung Han 7acbfc033d Merge "Soong generates vndk-related .libraries.txt files" 2019-11-01 01:57:50 +00:00
Jiyong Park 2c4966ad65 Merge "native shared libs in an SDK can be snapshotted"
am: 40dfbe3a16

Change-Id: I6a60e7be42cb59e745cbae8f800b172fe314230c
2019-10-31 18:47:50 -07:00
Treehugger Robot 40dfbe3a16 Merge "native shared libs in an SDK can be snapshotted" 2019-11-01 01:23:35 +00:00
Jooyung Han a463f720aa delete redundant code
no need to use separate test-only key for config.Once().

Test: m
Change-Id: I9e05d413504114df8f8ea8d9ef521db1d5da5d01
2019-11-01 09:00:11 +09:00
Jooyung Han 0302a84ddc Soong generates vndk-related .libraries.txt files
This is a follow-up CL of I9a24f6975bd4b226a94f61a13d43857dcdce6b88

Generated files are passed to make via MakeVars:
- SOONG_LLNDK_LIBRARIES_FILE
- SOONG_VNDKCORE_LIBRARIES_FILE
- SOONG_VNDKSP_LIBRARIES_FILE
- SOONG_VNDKPRIVATE_LIBRARIES_FILE
- SOONG_VNDKCOREVARIANT_LIBRARIES_FILE
- SOONG_VNDK_LIBRARIES_FILE

Previously filenames were "guessed" from module names. Now VndkMutator
stores filenames as well and generate those files with them.

Bug: 142963962
Bug: 141450808
Test: m && device boots && TH
Change-Id: I0c248b707188f904df60ead50059fefe90bfd17f
2019-11-01 04:35:21 +09:00
Jooyung Han dc782449b8 apex: Restrict usage of "use_vendor"
When use_vendor is used, native modules are built with
__ANDROID_VNDK__ and __ANDROID_APEX__, which may cause
compatibility issues. (e.g. libbinder)

Even though libbinder restricts its availability via
'apex_available' property and relies on yet another macro
__ANDROID_APEX_<NAME>__, we restrict usage of "use_vendor:" from
other APEX modules to avoid similar problems.

Bug: 142684427
Test: m -j
Change-Id: Ibc781de2efcd20cb6688a183b08e908a8a6e2593
2019-11-01 03:15:38 +09:00
Sundong Ahn abb6443895 Create variants for each image type
Create variant of image, zip or flattened according to
TARGET_FLATTEN_APEX and payload type.
If payload type is zip, only zip variant is created because flattened
apex is not supported. And if payload type is image, image and flattened
variants are created.

Bug: 139053989
Test: m -j
Change-Id: Ibde18490d23ec602c4cca97cf97db90a562e014e
2019-10-31 22:14:46 +09:00
Jiyong Park 0b2387551b stem property of java modules are propagated to Make
62c7829595c0df53e96addcd347c11ac01012eee introduced the new stem
property to java modules, but it wasn't propagated to Make. Fixing the
problem.

This change also fixes a problem that (module name) == (file name) is
assumed in dexpreopt_config.go, which no longer is the case. A mutator
runs to build a map from module name to its stem. The map is then used
when filling up the file paths in the bootImageConfig struct.

Bug: 139391334
Bug: 143494499
Test: m
Test: BootImageProfileTest
Change-Id: Idbc894f877692401471130de6cbfe5e0dd129da9
2019-10-31 22:13:05 +09:00
Jiyong Park 9495b76fbd Remove api_srcs property from java_sdk_library
The property is no longer used.

Bug: 141149570
Test: m
Change-Id: I3136c7b03138296dc59127f596f7e96502edf608
2019-10-31 20:38:14 +09:00
Kris Alder edf33a3253 Merge "change output file extension (config.txt -> config.json)"
am: 5d0b3b7195

Change-Id: I78b645ef6826b3cd767246c6aad8468b4f6da6c0
2019-10-30 22:15:21 -07:00
Kris Alder 5d0b3b7195 Merge "change output file extension (config.txt -> config.json)" 2019-10-31 04:59:55 +00:00
Jooyung Han 15e234ef49 Merge "apex: __ANDROID_APEX__ defined with no value"
am: bdad6c378f

Change-Id: I71874576abede7a6695dec226be331fd33bd60ab
2019-10-30 17:08:56 -07:00