Commit Graph

16864 Commits

Author SHA1 Message Date
Ivan Lozano 93916e9120 Merge "Add new module types to the rust whitelist."
am: fcc157a150

Change-Id: I386ec4143454c048db63e753d15cb68f39ca2844
2019-11-14 20:04:09 -08:00
Treehugger Robot fcc157a150 Merge "Add new module types to the rust whitelist." 2019-11-15 03:47:33 +00:00
Ivan Lozano b6eddf33c0 Merge "Allow cc modules to pull in rust includes."
am: 36396b26ef

Change-Id: I1b85968d8a104c51691ce4c7aedaac70f853926d
2019-11-14 18:42:59 -08:00
Ivan Lozano 36396b26ef Merge "Allow cc modules to pull in rust includes." 2019-11-15 02:32:26 +00:00
Jiyong Park b2876f9b3d Merge changes Ibcc1096e,I21ac2441
am: bc196606c3

Change-Id: Ieea8fdaa3bfab6720283974f3c70179e9099d5a2
2019-11-14 18:05:38 -08:00
Jiyong Park a308ea1591 apexDepsMutator is now bottom-up mutator
... in preparation for override_apex.

Bug: 144338929
Test: m
Change-Id: I6c19e384edc089fe5c8aa9bd00082178bd1a37a2
2019-11-15 10:38:39 +09:00
Treehugger Robot bc196606c3 Merge changes Ibcc1096e,I21ac2441
* changes:
  Install AndroidApp only when needed
  Reland: JNI lib is always embedded for APKs in APEX
2019-11-15 00:10:05 +00:00
Jaewoong Jung 5cc475c6d8 Merge "Create .gitignore and add /.idea there."
am: d1ee08624f

Change-Id: I30e43243121141294fdb42098710120612b51e47
2019-11-14 16:07:20 -08:00
Treehugger Robot d1ee08624f Merge "Create .gitignore and add /.idea there." 2019-11-15 00:01:05 +00:00
Chih-Hung Hsieh 41805bedbf Add TestProperties, gen test config, fix names
* Rename testBinaryDecorator to testDecorator
* Add TestProperties
  * Add install function for testDecorator to install config files
  * Add tradefed.AutoGenRustHostTestConfig
  * Depend on new build/make/core/rust_host_test_config_template.xml
    and new tradefed.testtype.rust.RustBinaryHostTest class
* Add autogenTemplateWithName in tradefed/autogen.go
  to generate config files with customized(mutated) executable name.
* Make rust_test module names more robust and easy to use.
  * Use crate name instead of source file name as the Stem
    for single source file modules, to match original user
    specified output file name in Cargo.toml.
  * Do not set up test module SubName when Stem is empty
    or when the module name already contains Stem suffix.
    That happens when TestPerSrcMutator is disabled or when
    there is only one source file with renamed output file name.
  * In TEST_MAPPING, references to mutated rust_test modules should be
    (1) <module_name> for single source file modules without mutation, or
    (2) <module_name>_<crate_name> for single source file modules, or
    (3) <module_name>_<source_file_base_name> for multi-file modules.

Bug: 140938178
Test: mm in rust projects, check output test file names
Change-Id: Ifdbfa14d5eed4f10b4fb983f82c93bbb9be3f899
2019-11-14 15:16:26 -08:00
Mitch Phillips 1f7f54f441 Add $$ORIGIN/lib to rpath for fuzz targets.
RPATH needs to be set to traverse the local directory's lib folder for
fuzz target packages.

Bug: N/A
Test: m fuzz
Change-Id: Idea4f04ce4c55315df7e808de5b2b4f06a88d82a
2019-11-14 15:08:59 -08:00
Mitch Phillips f50bddb790 Prebuilt shared libraries should be collected for fuzz targets.
Currently, prebuilt shared libraries fail the linkable.CcLibrary()
check, as the module returned by NewPrebuiltSharedLibrary uses a
prebuiltLibraryLinker as the module.linker, rather than a
libraryDecorator (which is the check by CcLibrary()).

We also need to ensure that we discard LLNDK stubs libraries, so we
manually categorise and discard them as well. They unfortunately are are
cc.Modules that aren't CcLibraries, as they use a custom linker object
as well (stubDecorator).

Fixes: 144415986
Test: m fuzz
Change-Id: I3b85ef66d1602cb8c035a0a90bddf30674e2eb71
2019-11-14 11:02:50 -08:00
Mitch Phillips 6efa5852b3 Merge "Package fuzz targets into zipfiles, then coalesce."
am: ed0070d453

Change-Id: I152c0d901af82c97a786daa03bb42754194a78fd
2019-11-14 10:48:00 -08:00
Jeffrey Vander Stoep a0a19b871c Merge changes from topic "rust-sysroot"
am: f3a2d5abc3

Change-Id: I8463603573f1a5a4572984dc8c2dea0edbf8cd60
2019-11-14 10:44:43 -08:00
Mitch Phillips ed0070d453 Merge "Package fuzz targets into zipfiles, then coalesce." 2019-11-14 18:37:48 +00:00
Jeffrey Vander Stoep f3a2d5abc3 Merge changes from topic "rust-sysroot"
* changes:
  Enable x86_64 device support
  Build Rust Device Sysroots in Soong
2019-11-14 18:28:13 +00:00
Jaewoong Jung b2da7555e3 Create .gitignore and add /.idea there.
Test: git status
Change-Id: Iba3a128b4d071aac42adb6598eab3afe305aec6c
2019-11-14 10:26:10 -08:00
Paul Duffin 0e0cf1dca5 Refactor sdk update mechanism
Creates a SnapshotBuilder and GeneratedSnapshotFile interfaces to allow
the java library snapshot work to be moved into the java package.

Test: m -j60 checkbuild
Change-Id: I857167616026149d5e85885621b53876b419ba9b
2019-11-14 17:49:02 +00:00
Mitch Phillips 2edbe8e6ed Package fuzz targets into zipfiles, then coalesce.
Instead of writing all fuzz target files into a huge zipfile (by number
of entries), we instead write each fuzz target and its files to a
zipfile, then coalesce them into a big zipfile.

This should simplify the repackager significantly, as no unzipping and
repackaging should be needed (just renaming).

This also solves b/144418402, where we are very close to hitting the
POSIX args limit on the soong_zip command for the device fuzz package,
due to the line length generated by all the entries in the huge zipfile.

Fixes: 144418402
Test: make fuzz
Change-Id: I89797e1bea2691ff4a33a227306f2f9083d8af6e
2019-11-14 08:14:24 -08:00
Ivan Lozano 10ee3551ab Merge "Soong Rust source clean up."
am: 263dcb7397

Change-Id: I9955d33d04dfd9022ec10750ba7dc65e01c44657
2019-11-14 08:04:35 -08:00
Ivan Lozano 8a34287fad Add new module types to the rust whitelist.
Bug: 144490046
Test: make rust modules
Change-Id: Ib7122bcc20aa2cde2f48788431055fe986918dd0
2019-11-14 07:36:22 -08:00
Ivan Lozano e0833b1f5c Allow cc modules to pull in rust includes.
Make sure LinkabeInterfaces can export include dirs to cc modules. This
fixes the Rust implementation and makes sure these are pulled in for cc
modules.

Bug: 144052093
Test: cc module depending on a rust library includes dirs correctly.
Change-Id: I6b5d5e6ab6afb507178b4f2cbdc45f01031dbfe4
2019-11-14 07:23:26 -08:00
Ivan Lozano 263dcb7397 Merge "Soong Rust source clean up." 2019-11-14 14:07:55 +00:00
Jiyong Park b0a012cfec Override apexes with LOCAL_OVERRIDES_MODULES
APEXes are ETC type, which should be overridden via
LOCAL_OVERRIDES_MODULES. This change fixes a bug that
LOCAL_OVERRIDES_PACKAGES was used for APEXes.

Bug: 140792287
Test: m
Test: add com.google.android.tzdata to PRODUCT_PACKAGES and build.
/system/apex/com.google.android.tzdata.apex exists, but
/system/apex/com.android.tzdata.apex doesn't.

Change-Id: Id65743b36e0b706d6ffd8cae0597cc0a42a83fb7
2019-11-14 17:17:03 +09:00
Sundong Ahn d95aa2d45c Change the partition of outputfile
If some apex module can be installed for both flattened and unflattened,
flattened apex should be installed to system_ext partition.
So add MakeAsSystemExt func to change the partition from system to
system_ext.

Bug: 139053989
Test: m -j
Change-Id: I3e3430413a9045d96130af99e249567b1a26ed7e
2019-11-14 16:04:15 +09:00
Matthew Maurer 51feafad57 Enable x86_64 device support
Now that we have sysroots built in Soong, we can enable these devices
and they just work.

Bug: 141251907
Bug: 141381044
Change-Id: I562256fee372d331db883f7c1b46405945295c24
2019-11-13 17:46:24 -08:00
Matthew Maurer 99020b04fb Build Rust Device Sysroots in Soong
In order to ensure we are using current platform Bionic for any platform
Rust binaries, we need to build the sysroot in Soong. This will also
enable us too hook the "test" crate if necessary.

While both a dynamic and static sysroot are available, on device only a
dynamic sysroot will be injected. On host, we continue using the sysroot
used to build the compiler as before.

Bug: 139486496
Change-Id: I127377e5b056610ceb5015a34d266250320fbc31
2019-11-13 17:46:19 -08:00
Jooyung Han 53b46ff2e9 Merge "make ApexProperties defaultable"
am: c5c4d18db0

Change-Id: I5ce236ba320350242d18a892b7064bc911009387
2019-11-13 16:56:27 -08:00
Jooyung Han c5c4d18db0 Merge "make ApexProperties defaultable" 2019-11-14 00:42:43 +00:00
Roland Levillain b6c3c9c894 Merge "Fix some typos in Soong."
am: c3eb1b2959

Change-Id: Iaa174f2140c5dd90e033bcf14eea6b5a163dc8cd
2019-11-13 12:04:30 -08:00
Roland Levillain c3eb1b2959 Merge "Fix some typos in Soong." 2019-11-13 18:50:36 +00:00
Sam Saccone 3249fcda3b Merge "Revert submission"
am: f9e10f9443

Change-Id: I76420f9c8cadf2e2db777d7775a5b16656a3b39e
2019-11-13 08:11:01 -08:00
Colin Cross c0e94d6894 Merge "Forbid -Weverything"
am: f3898e3bef

Change-Id: I998cfb29f235fcb289dcacd2a13f961e35a906c6
2019-11-13 08:08:33 -08:00
Jiyong Park 8ba50f953d Install AndroidApp only when needed
When an android_app is (directly or transitively) included in an APEX,
multiple variants of the app is created. The problem was that all the
variants were unconditionally installed to the device, which resulted in
duplicated targets. Fixing the problem by not installing the app when it
is included in APEX.

Bug: 144387414
Bug: 144135069
Test: m
Test: OUT_DIR=out DIST_DIR=out/dist build/soong/scripts/build-ndk-prebuilts.sh
Change-Id: Ibcc1096e30bc55a70ddc592490805f447e185eae
2019-11-14 00:39:53 +09:00
Jiyong Park 52cd06fc73 Reland: JNI lib is always embedded for APKs in APEX
If a JNI lib is depended on by an APK that is included in an APEX, the
lib is embedded inside the APK.

This change also fixes a bug that APKs are not mutated for APEXes.

Bug: 144135069
Test: m (apex_test.go amended)
Change-Id: I21ac24412b30c05afc03385655c6b196130dffe3
2019-11-14 00:39:47 +09:00
Sam Saccone f9e10f9443 Merge "Revert submission" 2019-11-13 15:24:50 +00:00
Sam Saccone e3c22f7a3f Revert submission
Reason for revert: b/144387414
Fixes: b/144387414
Change-Id: I21e15a4d149a5a8fefd0f84010600cb41b59db95
2019-11-13 15:24:11 +00:00
Colin Cross f3898e3bef Merge "Forbid -Weverything" 2019-11-13 15:01:48 +00:00
Roland Levillain 8ac05575aa Fix some typos in Soong.
Test: m
Change-Id: I032b6ce2a61491b88416db9943b42e6af4783459
2019-11-13 10:46:49 +00:00
Jiyong Park 98fa6c4959 Rename # vndk tag to # llndk
am: 92d6bc189c

Change-Id: Ia9e1e68dab7e99dcbabe11174fc440f44f22cb5a
2019-11-12 22:46:11 -08:00
Jooyung Han 18020eabc4 make ApexProperties defaultable
ApexPropreties are added in InitApexModule() and they are supposed to be
defaultable. To be defaultable, InitApexModule() should be called before
InitDefaultableModule().

Bug: 144332048
Test: m (soong test added)
Change-Id: I6c90ed3b66a086292a4c0ecb37c61f83769e62bd
2019-11-13 05:52:57 +00:00
Jiyong Park 92d6bc189c Rename # vndk tag to # llndk
The APIs that are tagged with # vndk are actually for LLNDK libraries.
Although LLNDK is part of VNDK, calling those APIs 'vndk' has given
users a wrong perception that the APIs don't need to be kept stable
because that's the norm for most of the VNDK libraries that are not
LLNDK.

In order to eliminate the misunderstanding, rename the tag to 'llndk' so
that people introducing new such API will realize what they are signing
themselves up for.

Exempt-From-Owner-Approval: cherry-pick from internal gerrit

Bug: 143765505
Test: m
Test: python3 test_gen_stub_libs.py
Merged-In: I2853df3b6e245056c21d4ab3d62466954cf26d72
(cherry picked from commit 3d7b69a657)
Change-Id: I2853df3b6e245056c21d4ab3d62466954cf26d72
2019-11-13 05:50:27 +00:00
Jooyung Han caea0ecc5a Merge "Remove unused "product_services_specific" prop"
am: 9ea28aef68

Change-Id: I6433c85e191be8e3fb4f0311c192c14a0095b7eb
2019-11-12 18:45:11 -08:00
Jiyong Park bfb534fe53 Merge "JNI lib is always embedded for APKs in APEX"
am: d006779e3e

Change-Id: Ia44557597a6171ae53be400a4221b51a6520433b
2019-11-12 18:44:37 -08:00
Treehugger Robot 9ea28aef68 Merge "Remove unused "product_services_specific" prop" 2019-11-13 02:37:35 +00:00
Treehugger Robot d006779e3e Merge "JNI lib is always embedded for APKs in APEX" 2019-11-13 02:25:25 +00:00
Colin Cross 39ef52f1df Forbid -Weverything
Use of -Weverything blocks build system changes and toolchain updates
on new warnings.  Forbid it in the build system.  Developers can
experiment with -Weverything on their module by adding it to their
Android.bp file and building with
m ANDROID_TEMPORARILY_ALLOW_WEVERYTHING=true

Fixes: 143713277
Test: manual
Change-Id: If154db328c52f687161e7a41e486d56a129850ac
2019-11-12 15:55:03 -08:00
Mitch Phillips fd869a69c7 Merge "'m fuzz' shared lib package should be per-fuzzer."
am: 38dec1bcb5

Change-Id: I610894e607a7146af4550dbdf9ca858e184f5046
2019-11-12 14:21:15 -08:00
Treehugger Robot 38dec1bcb5 Merge "'m fuzz' shared lib package should be per-fuzzer." 2019-11-12 22:13:36 +00:00
Mitch Phillips 13ed3f5e34 'm fuzz' shared lib package should be per-fuzzer.
Change the ClusterFuzz package built by 'make fuzz' to now package
shared libraries per-fuzz target.

Changes documented in go/proposed-clusterfuzz-package

This has the impact of:
 - This package is much easier to post-process in the Haiku export
 cronjob.
 - Shared libraries are now per-fuzz-target. This means that we will
 have some level of duplication (libdl, libc, libc++, libclang_rt.*,
 etc.) as these libraries will be in multiple fuzz target's dirs.

This *only* affects the fuzz-$target-$arch.zip file, not the fuzz targets in
$ANDROID_HOST_OUT/fuzz or $ANDROID_PRODUCT_OUT/data/fuzz. These two
install directories still use the global shared libraries in order to
preserve space on devices.

Bug: 144360679
Test: m fuzz
Change-Id: I5f19a13070e01d2d39598f9f215a983b398a9f37
2019-11-12 11:12:10 -08:00