This reverts commit 9cc3c76abd which
added command-line parameters to the invocation of SignApk to permit
it to access sun.** classes which are not accessible by default in
Java 9. This hack is no longer needed because SignApk no longer needs
this access because of tools/apksig commit
b40d3e4821bc9cb094b0ff13153340e3a0da1b3f which switched APK JAR
signature generation logic away from directly using sun.** classes.
Test: find out -name CtsPkgInstallTinyApp* | xargs rm -Rf
mmma -j74 cts/hostsidetests/appsecurity/test-apps/tinyapp
Test: find out -name CtsPkgInstallTinyApp* | xargs rm -Rf
EXPERIMENTAL_USE_OPENJDK9=target1.8 \
OVERRIDE_ANDROID_JAVA_HOME=<path to Java 9 SDK> \
PATH=${OVERRIDE_ANDROID_JAVA_HOME}/bin:${PATH} \
mmma -j74 cts/hostsidetests/appsecurity/test-apps/tinyapp
Bug: 37137869
Change-Id: I389c366f8a5bed56c496293bc871458adbedb0e8
Overwrite TARGET_(2ND_)ARCH_VARIANT as armv8-a if
TARGET_(2ND_)CPU_VARIANT is set to some known armv8-a core like
cortex-a53, cortex-a73, kryo, denver64 etc.
For clang, -march is ignored if -mcpu is set to specific core so this
change doen't impact the objects built for armv7-a-neon/some_armv8_core
since it's treated as armv8-a/some_armv8_core.
Bug: 62895439
Test: Built modified aosp_arm64 with armv8-a as its TARGET_2ND_CPU_ARCH
and generic as its TARGET_2ND_CPU_VARIANT successfully.
"lunch hikey-userdebug; make" and verify TARGET_2ND_ARCH_VARIANT
is overwritten.
Change-Id: If4260cf397783b5f56c4fd432615f4676429a1d3
Test: runs "m -j checkbuild tests cts", and then --bootclasspath_entry
shows up in desugar command.
Change-Id: Ibcc8a3f51438723151c57f79e5a1184350efbd30
During the Android build process, multiple .jar files are
unzipped into the same directory. If the .jar is an OpenJDK 9
modular jar (with a module-info.class in the root directory),
the last module-info.class extracted will overwrite any earlier
module-info.class files extracted, and will cause all extracted
class files to be considered part of that module.
Therefore, this would break compilation under OpenJDK 9 (with
-target 1.9 -source 1.9). This CL fixes this by omitting the
module-info.class file (if present) when extracting the .jar.
This essentially turns any modular jar into a regular jar,
replacing the module with corresponding classes on the classpath.
This is sufficient for now because Android does not currently
support module dependencies.
Test: Treehugger
Bug: 38177569
Change-Id: Ia184e64d2f24b8ca79aeab1c00bd5da0386530bf
Allows grouping of classes with dirty static fields to be grouped
together in the image to have fewer dirty pages.
(cherry-picked from commit 865d54caf2)
Bug: 62554875
Test: mm test-art-host
Merged-In: I2486d2704d74a192f1ecdc02589e569b61efa4ae
Change-Id: I2486d2704d74a192f1ecdc02589e569b61efa4ae
Use --class-loader-context to pass the context to dex2oat instead of using
runtime arguments.
In preparation to simplify dex2oat handling of contexts.
Bug: 38138251
Test: make & check that the prebuilds have '&' as their classpath key
Change-Id: Iad2fc4364173f59f41886556222ec69f87a0bd52
PLATFORM_VERSION_ALL_CODENAMES isn't actually all the code names, just
the ones active in our current target. We need the list of all targets
so we can validate code names in NDK stub templates even if they're in
the future. Unfortunately, all_codenames has been baked into
build.prop for ages, so we're stuck with this name. Improve the
comments and add PLATFORM_VERSION_FUTURE_CODENAMES to cover to cover
the future targets.
Test: make checkbuild
Test: check $ANDROID_PRODUCT_OUT/system/build.prop
Bug: None
Change-Id: I81fed6f761e5362ef3050be9d1e3fb17739feadd
It is built by non-eabi gcc
Bug: 35666637
Test: Manual
Change-Id: I10b4364b66f6cad907b1271250506500aeb11fd5
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
AUX build environent is volatile and is only instantiated in
a context of AUX-aware module.
link-type checking is happening outside such context, and
is not able to correctly determine AUX build dependencies.
1. Save enough of context in LINK_TYPE variable;
Use AUX-<variant-name> instead of AUX
2. Load correct set of AUX meta build vars before
building link_type rules
Bug: 62060489
Test: make auxiliary
build no longer tries to access "/STATIC_LIBRARIES" path
Change-Id: I9764d4a0740da1c55a6f8429398872fc4362942c
This reverts commit 9b99ddc8a5.
and add syste-qemu.img to the dependency list of sdk target
Test: build sdk target successfully
Change-Id: Idb0bee56275f3bfe33ba7d29463e4b8e0699ec33
Don't use sed -i, it requires an argument on mac and is eating the
-e parameter, which causes the command to not be applied.
Also clean up the temporary list files so they don't clutter up
$OUT.
Test: m -j device-tests
Bug: 64226094
Change-Id: Ie71820fc2d1cd812717bf0c156af011ca723e9f6
For raw system.img and vendor.img do not have
partition table and init refuses to mount them
in first stage mounting.
For emulator build:
create partitioned system-qemu.img for system.img;
create partitioned vendor-qemu.img for vendor.img
if applicable.
Change-Id: I64fdcdafc303cf2f74a1e96653e7afe259f0af98
Added two product flags:
PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE
PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION
If PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE is enabled (default false), a
art profile is used to create the preopted boot image. This profile
is also passed to the runtime in AndroidRuntime.cpp.
The profile is created from the
PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION variable that defaults
to "frameworks/base/boot-image-profile.txt".
(cherry picked from commit 77226f6333)
Bug: 37966211
Test: make and flash
Merged-In: Ic89cc4c0c4d39aa9726843f5d9c2fb1dedeb7885
Change-Id: Ic89cc4c0c4d39aa9726843f5d9c2fb1dedeb7885
Used for specifying if a product should get system server mini debug
info. Defaults to true.
Can be disabled by doing
PRODUCT_SYSTEM_SERVER_DEBUG_INFO := false
The property overrides WITH_DEXPREOPT_DEBUG_INFO, so if
PRODUCT_SYSTEM_SERVER_DEBUG_INFO is true but
WITH_DEXPREOPT_DEBUG_INFO is false, system server will have mini
debug info.
(cherry picked from commit 94f5f93236)
Bug: 62862291
Test: make
Merged-In: I189cd144ce3ade5f02855db022874c8dd45cbdf3
Change-Id: I189cd144ce3ade5f02855db022874c8dd45cbdf3
The product only needs to specify
PRODUCT_SYSTEM_SERVER_COMPILER_FILTER. This determines what compiler
filter system server jars are compiled with.
(cherry picked from commit 6a90210c62)
Test: update marlin device
Test: make and look at services.odex
Bug: 62356545
Merged-In: Id51726ae03576d7b4eb784b861158bb451c39deb
Change-Id: Id51726ae03576d7b4eb784b861158bb451c39deb
Passing down a compiler filter in LOCAL_DEX_PREOPT_FLAGS or
PRODUCT_DEX_PREOPT_DEFAULT_FLAGS will no longer always get
overridden to speed.
(cherry picked from commit b8d3cc02cd)
Bug: 62356545
Test: make and flash
Merged-In: I8b777c8881cba6b11cda56d27f0a714c92d70d94
Change-Id: I8b777c8881cba6b11cda56d27f0a714c92d70d94
They are stored in /system/etc/profiles/, these will be copied to
the over the data profiles during fist boot. This means is required
to avoid missing JIT samples for the preopt compiled methods.
(cherry picked from commit 44c9c076d3)
Bug: 38032017
Test: make and flash
Test: adb shell ls -l /system/etc/profiles/
Merged-In: Ia4573464ac39c4720e0d9e8a29b8ea4213bd9d78
Change-Id: Ia4573464ac39c4720e0d9e8a29b8ea4213bd9d78
Currently this only checks vendor/google_data/art_profile, but the plan
is to use a per product directory in the near future.
(cherry picked from commit 6324c2d291)
Bug: 38032017
Test: make and make sure the profile was used (calculator).
Merged-In: I8de6484dbcac5fc040ad70f97e97d193b317af8c
Change-Id: I8de6484dbcac5fc040ad70f97e97d193b317af8c
Reduces calculator launch from 354 -> 325 with a profile.
(cherry picked from commit c5536ffbd3)
Bug: 38032017
Test: mm
Merged-In: I795a2d3f4db5546be4d77c3716e69d20d8f23549
Change-Id: I795a2d3f4db5546be4d77c3716e69d20d8f23549
Soong now adds .vendor suffix only for modules having both core and
vendor variants. Furthermore, names listed in LOCAL_SHARED_LIBRARIES
are correct (= have .vendor suffix when the dependent lib has variants).
Therefore, make does not need to force add .vendor suffix when parsing
modules from soong.
Bug: 37480243
Test: BOARD_VNDK_VERSION=current m -j <name> is successful, where <name>
is one of the vendor-only libraries in Soong. (i.e.
android.hardware.renderscript@1.0-impl)
Test: m -j does not break anything
Change-Id: Id8d0d01313c63496a10de4cd3ddb9f75180efef6
Enabled via:
export EXPERIMENTAL_USE_OPENJDK9=true
Other nonempty values of EXPERIMENTAL_USE_OPENJDK9 will
allow OpenJDK 9 toolchains, but will still default to
-source 1.8 and -target 1.8.
Note that -source 1.9 and -target 1.9 does not currently
successfully build.
Test: Treehugger.
Bug: 38177569
Experimental flag to set LOCAL_JAVA_LANGUAGE_VERSION := 1.9
Change-Id: I9eb881b3fbd1806984a132f6da7b5a4cc6612247
This saves 20-50ms for `lunch` (~7-10%), and double that for every build
execution.
Test: Check HOST_OS_EXTRA on Linux & Mac
Change-Id: I863200b2287c8867f40606237895b1d3ad91e1b3
All users of this variable have been removed. This command was adding
50-175ms to `lunch` (~15-30%), and was running at least twice (serially)
in every build too.
Test: cs/HOST_JDK_IS_64BIT_VERSION
Test: prebuilts/jdk/jdk8/linux-x86/bin/java -version, is 64-bit.
Change-Id: Ifdd9663b010ec45918b29ac037849f49c8cd8f69
Android bundles an OpenJDK-derived toolchain to avoid issues with
unsupported toolchains. For development / experiment purposes, this
CL the toolchain to be overridden via OVERRIDE_ANDROID_JAVA_HOME.
It is an error for OVERRIDE_ANDROID_JAVA_HOME to be set but not
point to a valid toolchain, but this error is not explicitly
checked for.
Bug: 38177295
Test: Treehugger
Change-Id: I72f641f560501e498f9c86a4380f19941fca11ad
Write into a temp file, then use `cmp` to determine whether to update
the actual file. This means that we'll only run Kati twice on a clean
build, since we'll omit the redundant write during the regeneration
check.
Simplify writing using $(file >) instead of $(shell), which doesn't have
character count limitations.
Bug: 35970961
Test: m clean; m -j nothing; m -j nothing; m -j nothing
Test: Ensure clean_steps.mk is equivalent before/after
Change-Id: Id574f416647434ab8d11ed3481da21b55e8797b7
Export JAVA_HOME as an absolute path to commands running inside
a build.
Should fix errors invoking gradle from inside a build:
ERROR: JAVA_HOME is set to an invalid directory: prebuilts/jdk/jdk8/linux-x86
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
Test: treehugger
Change-Id: I16e4482b2d74ede0843715be3b08c65ce33cf403
build-image-kernel-modules is defined under recovery macro
when build without recovery,the driver kos are not packed
into the vendor image
Test: build with TARGET_NO_RECOVERY on and set ko to be build
in BOARD_VENDOR_KERNEL_MODULES to see if kos are packed into
vendor image
Change-Id: I162ccb2fe50c09ece07b6b07e416721985228006
The mac implementation of sed has different requirements for the -i
option. Instead of using that, just redirect the output to the final
location of modules.dep, since it's being copied in the very next
line anyway.
Bug: 38268091
Test: run build with kernel modules on macOS
Merged-In: I49e4a1a69f01139ef47711ab1223d3a8e5cda568
Change-Id: I49e4a1a69f01139ef47711ab1223d3a8e5cda568
INTEGER_OVERFLOW_EXCLUDE_PATHS should only apply to the global sanitizer
setting, and should not override local module settings. This pulls out
the check so it occurs earlier and does not interfere with local
settings. This makes Make consistent with Soong's behavior as well.
Bug: 30969751
Test: Created a test build file with this explicitly set, excluded the
path, and checked if it was still being sanitized.
Change-Id: I9020d92bae136b6087d37f71d5337acaefe850b4
Ubsan is currently support ARM/ARM64,
so It's OK to enable the build Flag
Test: build test module with flags in Android.mk:
LOCAL_SANITIZE := undefined
LOCAL_SANITIZE_DIAG := undefined
BUG:38250996
Change-Id: I6c640bad67353cc736640b2e3c4a0b1812dde3fc
Desugaring try-with-resources is not necessary for platform builds,
and triggers some problems for apps built as part of the platform
that target SDK versions before 19. Disable all try-with-resource
desugaring.
Bug: 63180735
Bug: 63900665
Bug: 63901645
Test: m -j ANDROID_COMPILE_WITH_JACK=false checkbuild
Change-Id: I98b827aa1e80b43e6eb7b58254c23c7a4f7dc52d
full_java_lib_deps has trailing whitespace if $(LOCAL_CLASSPATH)
is empty. Because the calculation of PRIVATE_CLASSPATH was
missing a $(strip ...), this resulted in an (unintentional)
trailing ':' in the values of the -classpath and -sourcepath
arguments to the javadoc tool, which that tool is documented
to interpret as '.' (the working directory).
This CL converts the expression to a call to normalize-path-list,
from definitions.mk, which contains the $(strip ...):
define normalize-path-list
$(subst $(space),:,$(strip $(1)))
endef
After this CL, an empty $(LOCAL_CLASSPATH) no longer gets
misinterpreted as the current working directory.
This issue was minor (it made no difference in practice).
Test: Treehugger
Bug: 62049770
Change-Id: Ia0e3e5657d0fa057fe998515f34bc7b8df5f6f16
Point the make java variables at JDK prebuilts in
prebuilts/jdk/jdk8, add them to the path, and clean up
some old overrides.
Reapplies Ibbeb30fab96e45aedd5bb6d710d1170f85789982 after updating
some more manifests to include the prebuilts.
Bug: 62956999
Test: m -j checkbuild
Change-Id: I9e27aa5cb04d1ed09e43b798e5d654843afc000f
(cherry picked from commit 1931750940)
When BOARD_VNDK_VERSION is set, native libs that were labeled as
native:platform are now divided into native:platform and native:vendor
sets depending on their install locations. In order to keep the existing
apks to use all the libraries that they have been using, native:vendor
is also added to the allowed types for apks.
However, in the future when we have vendor SDK and enforce all vendor
apks to use the vendor SDK, we will disallow native:vendor to
app:platform and native:vendor will be allowed only to those vendor apks
(probably labeled as app:vendor).
Bug: 33241851
Test: BOARD_VNDK_VERSION=current m <a vendor lib using vendor jni>
(e.g. ModemDiagnosticSystem in internal master)
Change-Id: I6ad0967ab17f07be9657b58c20fa9b96bd1a342b
Add support for excluding paths from having integer_overflow applied to
them when using SANITIZE_TARGET=integer_overflow via an
INTEGER_OVERFLOW_EXCLUDE_PATHS make and product variable. This covers
the make side of the change.
Bug: 30969751
Test: Build with SANITIZE_TARGET=integer_overflow
SANITIZE_TARGET_DIAG=integer_overflow
INTEGER_OVERFLOW_EXCLUDE_PATHS=<path> and confirmed this was no
longer being applied to binaries in that path.
Change-Id: I24e328257bc5a7962024c8676a1e23d7d70a8666
The extension directory defaults to lib/ext and does not
exist by default. Setting it to the empty string de facto
disables this obsolete feature.
AOSP is moving to a hermetic toolchain so this argument
will stop working soon. Further, OpenJDK 9 javac no longer
supports this command line argument when compiling for
-source 1.9 -target 1.9.
This command line argument has been around since the
earliest versions of Android, but is now obsolete.
This CL drops it.
Bug: 63746471
Test: Treehugger
Change-Id: Ia0214c1b192e3ffda10772d777557a81ce346c03
OpenJDK 9's javadoc tool doesn't support the -bootclasspath
command line option, even with -source 1.8.
Instead, under OpenJDK 9, javadoc needs to be passed a
--patch-module argument to tell it the location of the
classes patching packages from java.* modules.
The source files in libcore/{dalvik,libart,luni,ojluni} and
external/icu/android_icu4j that go into PRIVATE_BOOTCLASSPATH
patch packages from the modules java.base, java.desktop,
java.logging, java.prefs, java.sql, jdk.net, and
jdk.unsupported. However, this CL takes the simpler approach
of placing them all in java.base, which appears to work for
the purposes of the javadoc run.
Test: Ran the following both on OpenJDK 8 toolchain and on
OpenJDK 9 (with EXPERIMENTAL_USE_OPENJDK9=true):
rm -rf out/target/common/docs/ && make docs
Test: Compared (via meld) the contents of out/target/common/docs
for the two toolchains (there were some differences, see bug).
Bug: 62049770
Change-Id: If3dd927477ca32dab7ffb528350de872e1017184
Point the make java variables at JDK prebuilts in
prebuilts/jdk/jdk8, add them to the path, and clean up
some old overrides.
Bug: 62956999
Test: m -j checkbuild
Change-Id: Ibbeb30fab96e45aedd5bb6d710d1170f85789982
Brotli has a better compression ratio than deflation. So for non-AB
full OTA, we can compress the new.dat with brotli first and store it
in the zip package.
This increase the OTA generation time by ~5 minutes for a full OTA
(measured based on 2.0G system.new.dat)
Bug: 34220646
Test: Generate a full OTA for bullhead
Change-Id: I9c0550af8eafcfa68711f74290c8e2d05a96648f
Bug: 63691195
Test: `make custom_images` with CUSTOM_IMAGE_SUPPORT_VERITY_FEC := true
Test: boot device with the custom image built above
Change-Id: I198fa1e0697cb00712bbfb6f1a717ec623703ede
The LOCAL_JAR_PROCESSOR rule should depend on the path to the
processor jar and not the module name.
Test: m -j && m -j
Change-Id: I5ebd4cd3ad4429918edfd0a8cb5cb9a4e7e86ca7
This is already blocked in Soong. Do the same for make.
Bug: 63553556
Test: BOARD_VNDK_VERSION=current m -j libSampleAuthJNI cannot be built
Change-Id: I04a89b3f9de903a6b0384f13d5a80886344c14b4
Since device_kernel_headers is marked as 'vendor:true', it is exported
to the make world as device_kernel_headers.vendor. Use the correct name
with the .vendor suffix.
Bug: none
Test: BOARD_VNDK_VERSION=current m -j does not complain about
device_kernel_headers.
Change-Id: If3eaa3c5832820c914ef427668d70fa8d8d0bf97
This patch reuses the build-image-kernel-modules macro to build the
odm/lib/modules directory according to the BOARD_ODM_KERNEL_MODULES
which contains list of kernel module files.
Bug: 36012197
Test: android master build on pixel
Change-Id: I2c004132a89e7f230690b4d26c98c3d5b2769f11
Device-specific kernel headers (TARGET_PROJECT_SYSTEM_INCLUDES) have
been added to the global include paths. However, since global include
paths are no longer provided when a lib is built for vendors, the
device-specific kernel headers becomes inaccessible. To solve this
problem, a pseudo header library 'device_kernel_headers' is defined
and it is added to all Android.mk defined lib/bins.
Also, in order to give this info to the soong world,
TARGET_PROJECT_SYSTEM_INCLUDES is exported as a new product config
DeviceKernelHeaders.
Bug: 62939405
Test: choosecombo to aosp_sailfish (or any other Pixel/Nexus targets)
BOARD_VNDK_VERSION=current m -j gralloc.msm8996 (or any other vendor
libs using vendor-specific kernel headers)
Change-Id: I3f0a2b893cc9352d6c13f3151e8834477d15c07b
Use $(JAVA) to invoke dx.jar instead of the dx wrapper script.
Also allow the dx command line or the dx jar to be specified on
the command line. Allows better dependencies on dx.jar, and
doesn't rely on having java on the path.
Bug: 62956999
Test: m -j checkbuild
Change-Id: I5f265132690ad28b3139954fea44eb0c4a43393a
Put the prebuilt and non-prebuilt tools selections into the two
clauses of an if block to simplify the next patch.
Test: m -j checkbuild
Change-Id: Idd01bc81a2b619f7fc23df7566a01b46598433a3