When a cc module is built against a stub, compiler passes version macro
of the stub lib. Version macro should be numeric, so codenames or
"current" should be mapped to numbers just like how ndkstubgen maps to.
* "current" -> future (10000)
* codenames -> look up api_level.json
* otherwise -> cast to int
Bug: 179329813
Test: m / soong test / manually check the output build.ninja
Change-Id: Ic0e1dd904984e161694a0b77fad5559c06a4462f
Even if this binary is only used in a testing apex for dynamic common
library apex that will be removed once we have a production version
ready, we need said apex to be marked as updatable too.
Bug: 177879489
Bug: 179013728
Test: builds
Change-Id: I8ae519da164f1f5355d4c2dfeca88a497cda7990
(cherry picked from commit 0d3ff6d918)
Mistakenly used HostAndDeviceDefault (which builds host and device
variants by default) instead of HostAndDeviceSupported which only
builds a device variant by default.
Moved the test definitions of art and framework boot images from being
defined in all Java related tests into the test where they belong. This
is needed in order to improve the ART and framework boot image specific
testing.
Bug: 177892522
Test: m droid
Change-Id: I16771f09bd789033e18c58ae6dd4b6b9e865d831
Previously, the apex module had to hard code behavior specific to the
art apex module in order to include the art boot image. This change
adds support to the apex module to allow the boot images to be
specified per apex.
In combination with a change to add the "art-boot-image" to the ART
apex this allows the custom code for handling the art boot image in
apex to be removed.
That custom apex code also included the logic to ensure that the
GlobalSoongConfig was initialized for use by the dex_bootjars
singleton. That logic has been moved from the APEX to the boot_image
module. That ensures that it will be run if and only if a boot_image
module is present in the checked out repos. So, limited manifest
checkouts which do not contain the art or frameworks/base repos (which
is where the boot_image modules are defined) will not attempt to run
this logic, which would fail because dex2oat would not be present.
Bug: 177892522
Test: m droid
Change-Id: I02d25fbef6e864e31eb5e0f4eb50358c79486db0
Compression is useful only for big enough apexes. We can manually opt-in
them, instead of trying to find list of apexes that should be opted-out.
Test: m
Bug: 178713634
Change-Id: Ice86fabb7c1db4a1e21e4c983d595cfd3a1c0b7a
are present.
1) The boot jar to APEX mapping is maintained by the base names for
both of them. When building with prebuilt modules and APEXes, that
means we need to take care to compare them without regard to any
"prebuilt_" prefixes.
2) VisitAllModules can visit disabled modules and both source and
prebuilt modules, so they need some conditions to skip modules that
aren't applicable for boot jars.
Test: `m droid`
Test: `m droid SOONG_CONFIG_art_module_source_build=false`
with fresh ART Module prebuilts in place
Bug: 171061220
Change-Id: Iced269d29127bc8b8f9b3171adb60a97d115628b
an aidl module should specify its version. because of that some deps
which have version on its name is added.
Bug: 150578172
Test: m
Change-Id: If5c5d66e59f33ecf37d118b2b80db820ec78ea04
Adds a boot_image module type. Follow on changes will add instances of
boot_image to represent the ART and framework boot images in the art
and frameworks/base repositories respectively.
For the moment they retrieve their associated boot image configuration
from the map returned by genBootImageConfigs() and leave the actual
work of creating the ninja rules to create the boot images to the
dex_bootjars singleton.
Bug: 177892522
Test: m droid
Change-Id: Ib69701de0d24d996bb8e8be7a20b941be907390e
Previously, some tests used "com.android.art.something" as the name of
the APEX containing the ART boot jars but that is not the valid name
for an ART APEX. This change switches that to "com.android.art.debug".
Bug: 171061220
Test: m nothing
Change-Id: I057edc58ae81cdb14076a2d7d117ca1764aa3e52
Previously, the test mistakenly configured BootJars which meant the
test was testing not just the propagation of paths to files retrieved
from the prebuilt apex to the java_import module but also the process
of finding appropriate boot jars.
It also set "prefer: true" on the prebuilt_apex instead of the
java_import when checking to make sure that it still found the correct
module when both prebuilt and source were available and the prebuilt
was preferred.
Bug: 171061220
Test: m nothing
Change-Id: I4f2fa7ea372b14d4b169cdc78bdeb1ca4ac4dff8
If we don't check "current", it won't be checked even in the finalized
branch.
If we don't check "preview", it should be done during the SDK
finalization. It'd be better done before the SDK finalization regarding
that setting min_sdk_version is to get approval from deps library owners.
Bug: 177833148
Test: m (soong tests)
Change-Id: I712b61cfe5a134fbb69c73956d26fb3a1e5c011e
an aidl module should specify its version. because of that some deps
which have version on its name is added.
Bug: 150578172
Test: m
Change-Id: I4fe33974190765615069d0ba894e5ab4dcc3064f
Merged-In: I4fe33974190765615069d0ba894e5ab4dcc3064f
This reverts commit 556b2ad77e.
Original change-id: Ib1b2f0dd2f9ae85b1545c6cc5bb4c5bbdfac1c15
Reason for revert: Add excutable permission to the gen_ndk_backedby_apex.sh.
Test: TARGET_BUILD_APPS=com.android.adbd m dist apps_only
Change-Id: Ib587ba200cd7f2f61d478452b43c329d72b2de06
Add gen_ndk_usedby_apex.sh script to generate NDK API list used by Mainlain modules when modules get build.
Test: TARGET_BUILD_APPS=com.android.adbd m dist apps_only
Change-Id: Ib1b2f0dd2f9ae85b1545c6cc5bb4c5bbdfac1c15
Previously, the createGlobalSoongConfig() function was explicitly
prevented from being used in tests because it would fail. However, it
turns out that is no longer the case and it does now work.
That allows the following changes to be made:
* Tests no longer need to use GlobalSoongConfigForTests() to
prepopulate the cache.
* GlobalSoongConfigForTests() is only needed in the dexpreopt
package.
Bug: 177892522
Test: m nothing
Change-Id: Ifcbb1a44254c5d2d10c1d02ab23227488d1d1ed1
Insulate tests that exercise code in the java package from having to
register the build components provided by the java package by providing
a single function that registers them all. This follows the pattern
currently used in the cc and rust packages.
This change is in preparation for switching the dex_bootjars singleton
from a singleton, which does not require a module definition in order
to be instantiated, to a singleton module which does. That will require
adding a module definition into java.GatherRequiredDepsForTest() and
this change ensures that the required components will have been
registered in every test.
Bug: 177892522
Test: m nothing
Change-Id: I6475db8240894947dd07c89a940a3e4f201aa598
Bug: 176171716
Test: build_mainline_modules.sh and ensure that the ART boot image is
built: `find out -type f -name '*.art'` is nonempty for every arch.
Change-Id: Ibc45581eef2b205c750a30709780cf659ba7cfa1
Currently, when a module is included in an APEX, the dependencies of the
modules are listed in LOCAL_REQUIRED_MODULES of the APEX. There are two
purposes for this:
1) for native dependencies, they are installed to
$(TARGET_OUT)/apex/<apexname> directories which isn't packaged as an
*.img. However, as a side effect of the installation, their symbol files
are placed under $(TARGET_OUT)/symbols directory to aid debugging.
2) to implement the symlink optimization. When the APEX is not
updatable, the dependencies are not included inside the APEX, but
installed directly to /system partition because the same files might be
used outside of the APEX. The files in the APEX are replaced with
symlinks to the system copy.
So far, the module name like "libfoo" was directly used in
LOCAL_REQUIRED_MODULES. This becomes problematic when only a single arch
variant of the module is used by the APEX. The build system will install
both arch variants to the system partition.
This change fixes the problem by appending ":32" or ":64" suffix
when composing LOCAL_REQUIRED_MODULES.
Bug: N/A
Test: m
Test: Cherry-pick I285c5d1bb9b27265c8589f2588d95eafa324d412 and its
dependencies from internal master. `m nothing` doesn't show the artifact
path requirement error.
Change-Id: I78feae1d5b18f93b0f984d3b1558812fd1689a96
With the addition of the compile_dex property to the
java_import module it becomes possible to include a
java_import module in an apex. This change allows the
dependency and adds a test.
Bug: 177228901
Test: m nothing
Test: new TestApexWithJavaImport
Change-Id: I9336dade1857109e2fd21f7d57e1dc4abc4a402c
Presubmit builds were failing cause they were being built using RBE.
Bug: 172911362
Test: presubmit-builds are passing now
Change-Id: I65ffd912ccf2f4fb8cb9824e7a9579f66908d7b3
Dexpreopt and boot jars package check all require access to dex
implementation jars created for java_library and java_sdk_library. They
were available when building from source but not when building from
prebuilts, even though they are embedded within the .apex files that
are referenced from prebuilt_apex.
This changes adds support to prebuilt_apex to export the dex
implementation jars and updates java_import to use those exported dex
implementation jars.
In a source build dexpreopt/boot jars package check access the apex (or
platform) specific variant of a java_library, e.g. core-oj, from which
it retrieves the dex implementation jar path.
After this change in a prebuilt build dexpreopt/boot jars package check
behave in the same way except in this case they retrieve the dex
implementation jar path from the apex (or platform) specific variant of
the java_import, e.g. core-oj.
The work to export files from a `.apex` file for use by other modules
is performed by a new `deapexer` module type. It is not used directly
in an `Android.bp` file but instead is created implicitly by
`prebuilt_apex`,
In order to do that this contains the following changes:
* Adds a new `dexapexer` module type to handle the exporting of files
from the `.apex` file.
* Adds an exported_java_libs property to prebuilt_apex to specify the
set of libraries whose dex implementation jars need exporting.
* Creates apex specific variants of the libraries listed in the
exported_java_libs property.
* Adds the set of exported files to the ApexInfo to make them available
to the apex specific variants.
* Prevents the prebuilt_apex variants from being merged together as
they will not be compatible.
* Modifies java_import to use the exported file for variants of a
prebuilt_apex.
* Adds a ninja rule to unpack (using deapexer) the contents of the
prebuilt_apex's apex file, verify that the required files are present
and make them available as outputs for other rules to use.
* Some minor refactorings to support these changes.
* Adds tests to cover prebuilt only, prebuilt with source preferred,
and prebuilt preferred with source.
Test: m nothing
Bug: 171061220
Change-Id: Ic9bed81fb65b92f0d59f64c0bce168a9ed44cfac
For the platform libc++ STL, remove the
-Wl,--exclude-libs,libunwind_llvm.a argument, which is redundant with
the same argument in deviceGlobalLdflags.
Bug: http://b/153025717
Test: device boots
Change-Id: Idd7791d52f74aab2d5f59419fb75f841fc29a2eb
The properties and logic to select the appropriate arch specific src
property will need to be shared between the 'prebuilt_apex' module type
and an upcoming 'deapexer' module type to which the `prebuilt_apex`
will delegate responsibility for exporting the '.apex' file's contents.
This refactoring extracts them into the new ApexFileProperties struct
for reuse.
Bug: 171061220
Test: m nothing
Change-Id: Iac321a28afc469e885ee5b19ad33fecd94117236
Split the BPF system calls header definition into a new header library
(bpf_syscall_wrappers). Both platform and tethering apex require the
BPF system call definition. Move the definition from system/bpf/
libbpf_android/include/bpf/BpfUtils.h to frameworks/libs/net/
common/native/bpf_syscall_wrappers
Test: build, flash and run atest BpfMapTest
Change-Id: Ief5ffbb96c216796e4f0f4cacbde7c08f4af274a