Commit Graph

15209 Commits

Author SHA1 Message Date
Treehugger Robot 81a4016f61 Merge "Add android.hardware.neuralnetworks@1.3" 2019-10-17 22:47:15 +00:00
Treehugger Robot 7617fc2fab Merge "Extend ALLOW_MISSING_DEPENDENCIES coverage" 2019-10-17 19:46:53 +00:00
Colin Cross d1818c8ed0 Merge "Split out osMutator from archMutator" 2019-10-17 19:04:18 +00:00
Colin Cross fb91986493 Merge "Add arch mutator test" 2019-10-17 18:52:33 +00:00
Colin Cross ad4a597c79 Merge "Add method to determine variations from a Target" 2019-10-17 18:52:20 +00:00
Treehugger Robot a8f91ec00d Merge "Revert "Supports VNDK APEX with different versions"" 2019-10-17 11:50:47 +00:00
Treehugger Robot 50dce7372b Merge "Revert "Add __ANDROID_APEX_<NAME>__ for apex variants"" 2019-10-17 11:50:47 +00:00
Pete Gillin 4fe25b05b9 Merge "Enable Java language level 9 by default." 2019-10-17 10:38:35 +00:00
Isaac Chen 2c0a180be0 Extend ALLOW_MISSING_DEPENDENCIES coverage
Make build system respect ALLOW_MISSING_DEPENDENCIES, when building
architecture B products, and ignore targets with dependencies that
are not available for architecture B.

Bug: 142701187
Test: # Add a dummy Android.bp with a module only for arm64
      $ m -j TARGET_PRODUCT=aosp_x86 TARGET_BUILD_VARIANT=userdebug

Change-Id: I64de33674732df8c286671c806a07bcd19862b80
2019-10-17 11:02:21 +08:00
Treehugger Robot d7d5e5a1ac Merge "Create scripts to update and freeze a module SDK" 2019-10-17 01:02:16 +00:00
Treehugger Robot 344eed4eb1 Merge "Add SingletonContext::VisitDirectDepths[If] to Android proxy." 2019-10-17 00:45:25 +00:00
Jooyung Han 12f629b26d Revert "Add __ANDROID_APEX_<NAME>__ for apex variants"
This reverts commit d29e551efd.

Reason for revert: some targets are broken

Bug: 142773030
Change-Id: I50ac6842ab8aa572c11262ee0ec965ddbe903b0e
2019-10-16 23:51:09 +00:00
Jooyung Han 48dd4b5ea4 Revert "Supports VNDK APEX with different versions"
This reverts commit 394951da73.

Reason for revert: some targets are broken

Bug: 142773030
Change-Id: I4ce2e4a4c683c71958bc4f73e45a5ddd4a4ae32a
2019-10-16 23:50:39 +00:00
Yi Kong 7801661907 Merge "Revert "Create libgcc_stripped with llvm-objcopy"" 2019-10-16 23:33:52 +00:00
Colin Cross a195f91471 Split out osMutator from archMutator
Split the archMutator into two mutators, osMutator to create
android/linux/darwin variants, and archMutator to then further
split them into arm/arm64, etc.  When combined with alias
variants in Blueprint this will allow us to depend on the
"android" variant without having to know what architectures
were used to build it.

Test: m checkbuild
Change-Id: I0f51d60fc440cf5ae503904ce7849ec797af5fe2
2019-10-16 15:27:23 -07:00
Colin Cross 158eeb7701 Add arch mutator test
Add a test for the arch mutator in preparation for splitting it
into two mutators.

Test: m checkbuild
Change-Id: Ifd0a146a085901d33db50e783bdfad31edd7b7a6
2019-10-16 15:27:23 -07:00
Mitch Phillips 3a7a31b0c1 Add SingletonContext::VisitDirectDepths[If] to Android proxy.
Adds the VisitDirectDepths[If] function from blueprint to the Android
SingletonContext proxy.

Bug: N/A
Test: N/A
Change-Id: I4037364ef11b545abc9a383db7e1e818854db68f
2019-10-16 15:06:32 -07:00
Colin Cross 0f7d2ef3ac Add method to determine variations from a Target
The arch variants are hardcoded in every module type.  Refactor
them out into a Target.Variations() method in preparation for
splitting the arch mutator into two, which will require using
different variations.

Test: m checkbuild
Change-Id: I28ef7cd5168095ac888fe77f04e27f9ad81978c0
2019-10-16 14:52:30 -07:00
Treehugger Robot 959a3ffbda Merge "Fuzz corpus entries should not go in a subdirectory." 2019-10-16 21:09:59 +00:00
Treehugger Robot 98eccba8b4 Merge "Do not link libc++.so statically on device." 2019-10-16 20:28:54 +00:00
Treehugger Robot 83246459d1 Merge "Workaround unexported sancov symbols. Fix multiple sanitizer RT deps." 2019-10-16 20:28:38 +00:00
Elliott Hughes 60ee98582c Merge "Revert "-D__ANDROID_NDK__ for SDK builds."" 2019-10-16 16:01:14 +00:00
Slava Shklyaev 7779766411 Add android.hardware.neuralnetworks@1.3
Bug: 139120468
Test: m
Change-Id: I4f305a7698f2d9ec5f8f4244124570d9318b58a1
Merged-In: I4f305a7698f2d9ec5f8f4244124570d9318b58a1
(cherry picked from commit f4b5a5ba08)
2019-10-16 14:01:25 +01:00
Adrian Roos 49a1384b11 Merge "API Lint: Apply Javadoc.args when invoking api lint" 2019-10-16 12:07:52 +00:00
Pete Gillin 1b3370f5d7 Enable Java language level 9 by default.
This changes the default Java language level from 8 to 9, i.e. javac
invocations now use -source 1.9 -target 1.9.

The environment variable EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=false is
added to switch back to the language level 8 behaviour. (Previously,
setting that variable to true was required to opt in to language level
9.)

Test: make droid java tests cts docs
Test: javap -v <some class file in output> | grep 'major version' (reports 53, for classes from 'benchmarks' which is in Android.bp and 'ahat' which is in Android.mk)
Test: make RunBluetoothRoboTests RunCarSettingsLibRoboTests (two main flavours of robolectric)
Test: make cts && cts-tradefed help
Test: atest CtsLibcoreTestCases (reasonably low-level device tests)
Test: atest CtsHostTzDataTests (arbitrary host test)
Bug: 115604102
Change-Id: I9de888e1df021244d5e61c40934178676f09ecc7
Merged-In: I52be1817fa7121fca3bce3d8857cb9ed0825570c
2019-10-16 11:20:13 +01:00
Pirama Arumuga Nainar a60e81853f Merge "Pass -static-libgcc to Windows link commands" 2019-10-16 03:06:30 +00:00
Treehugger Robot a4cdb8dd40 Merge "add [static|shared].apex_available to cc_library" 2019-10-16 02:09:44 +00:00
Yi Kong 049ae6ae3e Revert "Create libgcc_stripped with llvm-objcopy"
We rely on a weird, GNU specific behaviour of objcopy:

$ aarch64-linux-android-objcopy -w libgcc.a stripped.a --strip-unneeded-symbol=*
$ llvm-nm --defined-only stripped.a | grep multi
0000000000000000 T __multi3

$ aarch64-linux-android-objcopy -w libgcc.a stripped.a --strip-unneeded-symbol=* --keep-symbol=FOO
$ llvm-nm --defined-only stripped.a | grep multi

llvm-objcopy has a different, more consistent behaviour that does not
mark exported symbols as unneeded when "--keep-symbol" flag exists.
However this behaviour will leave most symbols not deleted in the
libgcc_stripped library.

Revert the change while I'm implementing an alternative solution.

Test: presubmit
Bug: 142585047
Change-Id: I175e811f8a1f6afc6558267fc54e159ad5e12acf
2019-10-15 16:43:12 -07:00
Pirama Arumuga Nainar 105cab2b5a Pass -static-libgcc to Windows link commands
This was unnecessary in the past, when -nodefaultlibs was used while
linking, but that changed with
aosp/I722bd6596a1f3f5819f2767c29c0fa1e8b3ec0e8.

Test: simpleperf_ndk64.exe no longer depends on libgcc_s_seh-1.dll.
Change-Id: I435d7302906eb3758e758b5aefca8763bfba6290
2019-10-15 13:58:30 -07:00
Jiyong Park 9b409bcd10 Create scripts to update and freeze a module SDK
`m <sdk_name>` generates two scripts each of which is use to update the
current snapshot of the SDK and to freeze ToT as a new version,
respectively. Executing the scripts will copy necessary files (stub
libraries, AIDL files, etc.) along with Android.bp into the ./<apiver>
directory under the directory where the sdk is defined.

This change also introduces a new module type 'sdk_snapshot' that
represents a snapshot of an SDK. It will be auto-generated by the above
scripts, so developers are not expected to write this manually.

The module type 'sdk' is now used to simply specify the list of modules
that an SDK has.

Finally, this change changes the version separator from '#' to '@'
because '#' confuses Make.

Bug: 138182343
Test: m

Change-Id: Ifcbc3a39a2f6ad5b4f4b200ba55a1ce3281498cf
2019-10-15 18:49:58 +09:00
Jooyung Han 5ac191f51f Merge changes from topic "add-vndk-apex"
* changes:
  Add __ANDROID_APEX_<NAME>__ for apex variants
  Supports VNDK APEX with different versions
2019-10-15 09:21:19 +00:00
Jiyong Park a90ca00786 add [static|shared].apex_available to cc_library
apex_available property can be appended differently per the linkage
type. This will be used to restrict certain libs (e.g.
libc_malloc_debug) to an APEX while allowing them to be statically
linkable from platform for testing purpose.

Test: m (apex_test amended)
Change-Id: I6dec23129c5ac93a3ef06fea28f26f240c0ba410
2019-10-15 15:28:07 +09:00
Treehugger Robot d90d208628 Merge "AIDEGen: Remove the duplicate *.srcjar from srcs" 2019-10-15 01:51:37 +00:00
Mitch Phillips 302f964aa0 Do not link libc++.so statically on device.
If fuzzer coverage sanitized shared libraries are not deployed - we shouldn't
break users during dynamic link time. I need to think more about how we
should solve this problem in earnest, but for now let's just disable
static linkage of libc++ on device.

Bug: 142671952
Test: Cherrypick ag/9550833 and ag/9544155, make and run the fuzz target
there.

Change-Id: I39dfd6ba314e7a610ef3f0b30f35383a5e3a1e4b
2019-10-14 18:35:17 -07:00
Inseob Kim b9326a5b12 Merge "Add BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW" 2019-10-15 01:29:06 +00:00
Inseob Kim 822fdcab1f Add BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW
A new sysprop neverallow rules are mandatory only for devices launching
with R or later. For devices already launched, neverallow rules can be
relaxed with adding following line to BoardConfig.mk:

BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW := true

Bug: 131162102
Test: Set PRODUCT_SHIPPING_API_LEVEL := 30 and try building with
changing some system_public_prop to system_internal_prop
Test: m cts sepolicy_tests

Change-Id: I5e1640f7b43fd47863bc7bd163c2f43b01fa3326
Merged-In: I5e1640f7b43fd47863bc7bd163c2f43b01fa3326
(cherry picked from commit e36f52754f)
2019-10-15 09:22:42 +09:00
Jooyung Han d29e551efd Add __ANDROID_APEX_<NAME>__ for apex variants
With __ANDROID_APEX_<NAME>__ definition, native modules may have
different behavior when it is built for a specific apex module.

Previously, the name is passed as value of definition __ANDROID_APEX__
like -D__ANDROID_APEX__=com.android.foo. But it is difficult to do
conditional compilation with it.

Now, since the name is incorporated into definition itself, it gets
easier to set #ifdef condition.

Bug: 142582178
Test: m (soong test added)
Change-Id: I3c90c789fa692a19addf2e5a7c8d4cc571cde112
2019-10-15 07:34:02 +09:00
Jooyung Han 394951da73 Supports VNDK APEX with different versions
Older VNDK libraries are provided as vndk_prebuilt_shared modules. Those
are added to corresponding VNDK APEX as dependencies.

With VNDK APEX installed, VNDK libs are unnecessary. By the way, since
there can be vendor modules which depend on VNDK libs, Make targets are
still emitted with UNINSTALLABLE=true.

Android.mk has additional modules for vndk libraries which are named
with apex name as suffices. For example, if libfoo is a vndk library,
then libfoo.vendor is its vendor variant and it would be in
/system/lib/vndk. But with vndk apex, it has additional
libfoo.com.android.vndk.current variant.

Bug: 141451661
Bug: 139772411
Test: m (soong tests)
Test: boot with aosp_arm64 system image on Q vendor device
Change-Id: I269c28a4d4c4e2f1518bd51df558438fe5316774
2019-10-15 07:33:49 +09:00
Adrian Roos cab4a2c84a API Lint: Apply Javadoc.args when invoking api lint
Bug: 142459906
Test: make checkapi
Change-Id: I64c83a8064491303088cca713537c391f1a3d876
Merged-In: I64c83a8064491303088cca713537c391f1a3d876
2019-10-14 16:33:08 +02:00
Treehugger Robot baf127ce2a Merge "Add system_modules to droidstubs" 2019-10-14 13:30:38 +00:00
Anton Hansson 300a084db6 Merge "Move odexes of non-system apps into system_other" 2019-10-14 09:29:10 +00:00
patricktu 242faad111 AIDEGen: Remove the duplicate *.srcjar from srcs
AIDEGen collects the complied sources which are generated from build
system, the sources includes not only java/kt files but also srcjar
files. Since the srcjar files are record in srcjars parameter in json
file, we should keep only java or kt files in the srcs parameter.

The size diff of module_bp_java_deps.json:
Without this patch: 15,298,369 Bytes
With this patch: 15,044,804 Bytes

The build time diff:
Without this patch: 2m31.345
With this patch: 2m32.662

Bug: 141528361
Test: 1. m clean -j
      2. aidegen tradefed
      3. Open out/soong/module_bp_java_deps.json
      4. Find the module CtsSyncManagerCommon and check the
         sync_manager_cts.srcjar files doesn't exist in srcs but exists
         in srcjars section.

Change-Id: I43fc5c05b657473054e632cae4795220907dc711
2019-10-14 10:16:17 +08:00
Treehugger Robot 8785e55e1c Merge "Correctly install APK-in-APEX" 2019-10-14 00:22:33 +00:00
Treehugger Robot 692a8fd4b6 Merge "Add go directive to indicate go version number." 2019-10-11 19:08:47 +00:00
Jaewoong Jung 5188e23903 Add go directive to indicate go version number.
Test: go vet ./...
Change-Id: I815bec9cba04f6c171f0ef5a3a909c4f5f28f6c2
2019-10-11 09:51:43 -07:00
Jiyong Park f383f7cfc6 Correctly install APK-in-APEX
APK in a flattened APEX is installed as 'ETC' class module, instead of
the 'APP' class. This is to prevent Make from doing app-specific
amendments (e.g. such as adding module name after my_module_path)
to the paths and filenames which are all correctly set in the Soong
side.

Test: add `installable:true` to development/samples/Snake/Android.mk
and add 'Snake' to the `apps` property of an APEX. The build is
successful.
Test:  build the APEX on a device with TARGET_FLATTEN_APEX=true
The APK is at system/apex/<apexname>/app/Snake/Snake.apk

Bug: 142537672

Change-Id: I314bf1ab7abd4d4a4e9fa210442c004f54d8ccca
2019-10-12 01:06:39 +09:00
Paul Duffin e25c644f1e Add system_modules to droidstubs
This allows droidstubs to use the same system modules to create the
stubs that will be used to compile them. It improves consistency and
avoids droidstubs having to duplicate the libraries that make up the
system modules on its libs property.

Adds systemModules() to the sdkContext which allows consistent error
checking behavior between droidstubs and java_library.

Bug: 142534789
Test: m checkbuild
Change-Id: Ib2006906d9528a900f16851f50b62152ffb51a1b
2019-10-11 16:38:14 +01:00
Adrian Roos 22762b98f3 Merge "droidstubs: Add API lint via metalava" 2019-10-11 09:31:59 +00:00
Elliott Hughes a11242da49 Revert "-D__ANDROID_NDK__ for SDK builds."
This reverts commit c324729692.

Reason for revert: defined in bionic instead (https://android-review.googlesource.com/c/platform/bionic/+/1135146).

Change-Id: Ia5d4d1b087cd43e14919a5791b44d4816ecbb434
2019-10-11 01:25:04 +00:00
Elliott Hughes e04b73f100 Merge "Go back to the native mac xargs for now." 2019-10-10 21:18:59 +00:00