The transitive symbol resolving causes build breakage when a binary
linked against NDK has indirect dependency on platform libraries, or
vice versa.
Change-Id: Idbfe76079c1db14eb1156d0f396e13d26f0ff582
With this support, you can set dpi-specific aapt flags like:
$(LOCAL_PACKAGE_NAME)_aapt_flags_hdpi := --version-code 100 \
--version-name "100
which will override the --version-code and --version-name set in the
base apk's LOCAL_AAPT_FLAGS.
Bug := 18388705
Change-Id: Ie79d7b1b6bbf7463bce51ddae04ba81384ec58dc
With this support, you can set dpi-specific aapt flags like:
$(LOCAL_PACKAGE_NAME)_aapt_flags_hdpi := --version-code 100 \
--version-name "100
which will override the --version-code and --version-name set in the
base apk's LOCAL_AAPT_FLAGS.
Bug := 18388705
Change-Id: Ie79d7b1b6bbf7463bce51ddae04ba81384ec58dc
Normally the build function initialize-package-file will delete all
class files and all directory entries from JAR files, but sometimes
external projects (eg. ICU4J) depend on having directory entries in
their JAR files.
This change adds the flag LOCAL_DONT_DELETE_JAR_DIRS (analogous to the
flag LOCAL_DONT_DELETE_JAR_META_INF) which when set will skip deletion
of directory entries in initialize-package-file.
Change-Id: I4464b947b7528fca23925affa95e4071915f04d4
It's pain to maintain an inactive product's list of
PRODUCT_FACTORY_RAMDISK_MODULES or PRODUCT_FACTORY_BUNDLE_MODULES.
Just show a warning if a module name becomes dangling.
Bug: 18779515
Change-Id: I3d137ed59feb005b186ed2a3519465da3d8f45c3
Note that this doesn't play nicely with acov out of the box. Clang
apparently generates .gcno files that aren't compatible with gcov-4.8.
This can be solved by installing gcc-4.6 and invoking lcov with
`--gcov-tool /usr/bin/gcov-4.6`.
http://stackoverflow.com/questions/17758126/clang-code-coverage-invalid-output
Change-Id: I79547e1c579fa79db47ff07d5e90c42cedbd5cbb
Don't remember why I didn't enable this for the host when I made the
first pass, but it works just fine.
Change-Id: I0892c0bc353bf8b60b432ba9f69f97281177d41d
Clang driver needs -static flag, not -Bstatic,
to produce statically linked modules.
However, -static is not added if LDFLAGS contains -shared,
which is used in bionic/linker to create a shared object with static libraries.
BUG: 18008984
Change-Id: I75c3e24973ee77170285ec4c8e7aacc345722685
So the build system regenerates import_includes when you modify
Android.mk to add a new dependency library.
Change-Id: Ic92b097b659bb68a9065e1d66da59e0dc7e2836a
Before this change, Java resources are added as a separate step
(add-java-resources-to-package) after dex is run, so jarjar isn't run on
the resource files.
With this change, we add Java resources immediately after we call javac,
so jarjar is run on the resource files (the module's own resource, as
well as resources carried by static Java libraries).
When we generate the final apk/jar, we use the jarjar'ed jar as the
inital pacakge file, with class files and empty folders removed.
(cherry-picked from commit 140274707e)
Bug: 18837479
Change-Id: I15ecf282bfb65fd53dd03fbd03dd4c71927c186a
This is a BCP-47 language tag representing the default locale for a
given device. Support for the earlier mechanism of supplying a language
and region via ro.product.locale.region/language has been removed. This
change also removes support for supplying these properties via
PRODUCT_ADDITIONAL_PROPERTY_OVERRIDES. Devices that need to override
this should either rearrange their PRODUCT_LANGUAGES or supply a custom
.prop file.
bug: 17691569
Change-Id: I00c74098542b49b9c514a6ca39ea8d08179546c1
We want to store the symbol information for all android binaries in a global database.
* We ingest unstripped binaries into the global database
* When we collect address data from device (e.g. instruction pointer address), we want to lookup its symbol information through the global database. The key of the mapping is a unique build id, which is the same between binaries on device (stripped) and unstripped binaries.
After applying this patch, the system.img size increases by 0.0047% (16.3KB).
Change-Id: Id92faf2951f43a30947e8d2b690c1af6bf7e3f54
The proto handling will modify the set of dependent libraries, but
this was not actually accounted for in dependency handling because
dependencies had already been established.
Change-Id: Iba1582f3c9eeeada19569e4b5358b6ec4168fccc
If LOCAL_WHOLE_STATIC_LIBRARIES contains a library that has
two files that have the same name but are in different
directories, only the first gets included.
This fix detects this case, and uses the m option to ar to force the
duplicate object to the end of the archive. After this, using the p
option gets the correct object file.
Change-Id: I2e183f48cef3c79499d4ab8ff147444611ff938b
In anceint time we didn't have an "sdk" product so that we had to run
"make sdk" in a device product configuration.
Now we have SDK specific product configuration and we don't do "make
sdk" in device product configuration.
Change-Id: I40d58d51261498017bbe7e574c8128afc77e9b96
The transitive symbol resolving causes build breakage when a binary
has indirect dependency on the NDK library.
We only observed such behaviour in the aarch64 toolchain.
Change-Id: I29e01f16bdfa3aa206cd42d6f07c764fd436873a
In commit e9dd9f2bf we moved "include $(BUILD_SYSTEM)/android_manifest.mk"
forward before the variable intermediates.COMMON gets defined. That's a
mistake.
This change replaced the tentative variables
package_expected_intermediates_COMMON and guessed_intermediates with
their proper counterparts defined in base_rules.mk.
If their values differ in the two file, that's an error and we should
fix.
Bug: 18168693
Change-Id: I2bf17b0476b4a7f97810fbb0bde7630eb8878b53
- You can give a .aar as source file to a prebuilt static Java library
module. The build system will set up dependencies and rules to extract
classes.jar and other resource files.
- To build against a prebuilt AAR module, use:
LOCAL_STATIC_JAVA_AAR_LIBRARIES := <module names of aar prebuilt AARs>
The build system will set up rules to merge the library's
AndroidManifest.xml with the main AndroidManifest.xml, add the AAR's
resource dirs and link/merge the AAR's classes.jar.
Bug: 18168693
Change-Id: Ic2c1d20572a93bd98dbc72f8a39e26b459e442c2
(cherry picked from commit e9dd9f2bfc)
Now libart is the only supported runtime and
we don't need the build variables PRODUCT_RUNTIMES and
DALVIK_VM_LIB.
Bug: 18465297
Change-Id: Ibfda931cde0649163d79b584fb5ccad927a9bc2b
We use search LOCAL_DPI_VARIANTS in the list of
"$(PRODUCT_AAPT_PREF_CONFIG) $(PRODUCT_AAPT_PREBUILT_DPI)"
and the first takes precedence.
That way if we don't have a best match, we fall back to the second best,
the way how it worked with PRODUCT_AAPT_CONFIG previously.
Bug: 18388705
Change-Id: I8bd646c52215c65cc6e38c728857af9b64d13469
We had discussed the idea of making all host tools default to using
ASAN. Even if we don't make it the default, this makes it easy for the
user to switch all host binaries over.
Change-Id: I64a5c741b1b4e9aefed3a6be8dcd4f386e06b29c
Pass -fsanitize=address instead of manually specifying asan libraries
and other linker flags.
Note that we enable LOCAL_ALLOW_UNDEFINED_SYMBOLS by default for host
builds because ASAN only links symbols in the final executable, so
there will _always_ be undefined symbols in intermediate libraries.
Bug: 18208352
Change-Id: Ief55ab296e94974560eeb10507ec8d90f0025d5c
ro.build.flavor is set to "$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)" in
system.img build.prop at build time,
and it won't be overridden by oem partition's build.prop.
Bug: 18605832
Change-Id: Ic917623dd43b74d9c601119db0b457483e8c4472
This change also defaults C compilations with clang to gnu99, and turns off
the -Winconsistent-missing-override flag, since we need further cleanup to
turn it on. -finline-functions is an unnecessary flag that only gcc needs.
Change-Id: I1cfcaedca32d9e3c248a6aa9460603205901c491
Otherwise wrong set of memory/string functions is chosen when building atom
image (in Bionic we have libc/arch-x86/atom/atom.mk). Plus this naming is
consistent with other x86 architectures.
Change-Id: I21e899534e7ce10530474a22ceba770422b39d8d
Signed-off-by: Alexander Ivchenko <alexander.ivchenko@intel.com>
Bug: 18589470
__LP64__ is only defined for 64-bit compilation targets, so this macro
is evaluated as an implicit 0 in the original case. This change makes
it explicit that we only care whether this is actually defined.
Change-Id: I8c11b41fc0bde9477c5efeea0782d9741d9d827d
In unbundled apps_only build, in addition to the base apk, you can also
build the dpi-specific apk variants, with:
LOCAL_DPI_VARIANTS := <a list of dpi names>
Previously user needs to include $(BUILD_PACKAGE) repeatedly with the
same package definition except dpi flags.
With this change, all the dpi-specific apk variants share the base apk's
compiled Java code and only diverge at the point we add resources/assets
to the apk.
Also we set up variables/targets/rules in a way those dpi-specific apks
appear to be independent apks to the users, for example, you can pass
"AppName_<dpi_name>" to tapas, and AppName_<dpi_name>.apk lives in its
own intermediate directory.
Bug: 18388705
Change-Id: I2ba4972ea7d1f796352fab2407888f996781ae44
For apps, we don't want to set up the prebuilt apk rule twice even if
"LOCAL_MULTILIB := both", which for apps really means to set up only the
jni library rules twice. See also build/core/install_jni_libs.mk.
Change-Id: Id0406c3c605c6ede613dba06178a1710590c09b3
This will be necessary to support -std=gnu99 mode for clang 3.6, which
defaults to C11 mode (unlike prior releases that use C99).
Change-Id: Iea84582f9f12ba76b988463cbc0a20bd61042538
This breaks our build-art-host and build-art-target. I think we need to rewrite those rules as well.
This reverts commit 29f0a487b0.
Change-Id: I2e6674e01a2042e9d53e28ecd3e6bdf76fa806a3
There are a _lot_ of users of `typeof` in the tree, and they'll need a
GNU flavored standard. Rather than fixing up all of these
individually, let's just use gnu++11 as the default.
Bug: 18466763
Change-Id: Ia1bd3adaa74fadba259fda3d37653fb8d5cff69a
There are no more users of TARGET_CPU_SMP in the current codebase.
Expert users should set "-smp" in DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES
for targets that run on a single-core CPU.
Change-Id: Ib94865f05a92c9a4622540cebc18ded4bdfa6363
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
This caused a lot of failures in the libc++ tests, since linking
libgcc.a before libc++.so means that the wrong unwinder will be used.
This patch is still correct, but I will revert for now while I find a
good way to apply it without breaking unwinding.
This reverts commit 741b36e922.
Change-Id: I57e0b89534adf5c1677dbf2f64ac750e74bd5fbf
A device can set up BOARD_SYSTEMIMAGE_JOURNAL_SIZE (number of journal blocks)
in its BoardConfig.mk.
To disable journaling, set "BOARD_SYSTEMIMAGE_JOURNAL_SIZE := 0".
BOARD_VENDORIMAGE_JOURNAL_SIZE and BOARD_OEMIMAGE_JOURNAL_SIZE work in
similar way.
Bug: 18430740
Change-Id: I0594814fe19ffc54dff41ec2464e2e3a802b9419
Allow a compiled-classes file for pre-opting.
Bug: 18410571
(cherry picked from commit 4fec0bb265)
Change-Id: I8c69dd0fb8c04aaae0c4f062049cc9cce7d755c7
When WITH_DEXPREOPT=true is set, if we also set WITH_DEXPREOPT_PIC=true
then the build will generate position-independent OAT images.
This means that all the system applications no longer need to be
relocated into /data/dalvik-cache and this can achieve saving disk space
at the cost of slightly slower running code.
Bug: 18035729
(cherry picked from commit da9f1a7e82)
Change-Id: Ifd517c842f48bf31568bf5ff56667298d422c2c0
No one's using ARCH_AARCH64 or AARCH_MIPS64 yet, and ARCH_PPC was always more
aspirational than real.
Change-Id: I07c6cbad6eb0917c4c24848a98c3bc9a3fe72db6
Previously we store tag's installed modules in a separate variable
ALL_MODULE_TAGS.$(tag). However we only record the main installed file
for a module, but omit affiliated files like .odex.
With this change, we handle the tagged module the same way as modules in
PRODUCT_PACKAGES.
Change-Id: I7972528a4df5a4ba8bc98930864da9672d32d7fe
Two new LOCAL variables are added to support dpi-specific prebuilt apk
selection:
- LOCAL_DPI_VARIANTS: specify a list of dpis the module provides with
specific prebuilt.
Example: LOCAL_DPI_VARIANTS := xxhdpi xhdpi hdpi mdpi
- LOCAL_DPI_FILE_STEM: specify the dpi-specific source file name
pattern.
Example: LOCAL_DPI_FILE_STEM := MyApp-%.apk
"%" will be substitued by $(PRODUCT_AAPT_PREF_CONFIG) in the core
build system.
If you don't set up LOCAL_DPI_FILE_STEM, the default is
$(LOCAL_MODULE)_%.apk.
The build system searches $(PRODUCT_AAPT_PREF_CONFIG) in a prebuilt apk
module's $(LOCAL_DPI_VARIANTS). If not found, use whatever
$(LOCAL_SRC_FILES) as the source file; Otherwise use $(LOCAL_DPI_FILE_STEM)
to construct the dpi-specific apk's source file name, and use whatever
directory name of $(LOCAL_SRC_FILES).
Bug: 18388705
Change-Id: I63cae73f1b6f880302142abc476b3ce1fb5500b5
Install preloaded-classes as a standalone configuration file
/system/etc/preloaded-classes, so we can configure different file per product.
To override the default frameworks/base/preloaded-classes, just override
in your product configuration makefile with PRODUCT_COPY_FILES before it
inherits from build/target/product/base.mk: if there are multiple items
in PRODUCT_COPY_FILES with the same destination, the first one takes
precedence.
Bug: 18305157
Change-Id: I937632b4a1aa73310ec90e73fd708fbd0c704a21
This feature is now available in AOSP, but not for any shipped
release. We don't have an API version for the release that this will
be available in yet, so for now the check is commented out.
Bug: 18395015
Change-Id: I247233d047ed5a7564d6602d47c9ad962313c8dc
Install preloaded-classes as a standalone configuration file
/system/etc/preloaded-classes, so we can configure different file per product.
To override the default frameworks/base/preloaded-classes, just override
in your product configuration makefile with PRODUCT_COPY_FILES before it
inherits from build/target/product/base.mk: if there are multiple items
in PRODUCT_COPY_FILES with the same destination, the first one takes
precedence.
Bug: 18305157
Change-Id: I937632b4a1aa73310ec90e73fd708fbd0c704a21
The previous position of libgcc.a/libatomic.a on the link line causes
the linker to prefer satisfying dependencies from these libraries from
other libraries that might include them, rather than from libgcc.a (or
libatomic.a) itself. This imposes an ABI requirement that those
intermediate shared libraries _always_ export those symbols, which is
undesirable.
Change-Id: Ib593236b475d3e98356b2b1be6f96cee2b67378f
Previously, there was one generic definition for each of the
transform-o-to-* functions in definitions.mk, and one target specific
one in each combo/TARGET_*.mk. The generic one was entirely unused,
and the target specific ones were all nearly identical.
Changing anything in these functions was tedious at best, and often
error prone. The differences between any 32-bit arch and its 64-bit
equivalent were restricted to the name of the linker, and the ARM and
MIPS definitions were identical. The few differences between ARM and
x86 looked to be compatibility for an old (ca. 2008) toolchain issue
with --gc-sections, and a bug (LDFLAGS coming first rather than
later).
To simplify things, I've moved the definitions for these out of
combo/TARGET_*.mk and back into definitions.mk. The differences
between ARM and x86 have been scrapped. Anything that really does
still need to be target specific can be handled as I have the linker:
add a TARGET_FOO variable to the given target and then add it to the
generic definition.
Change-Id: I54dc1bffc32ac39f27f0b87247dd6a6dbaf0b162
Change boot, recovery, and verity metadata signing keys to use the
same PKCS8 / X.509 PEM format as the other signing keys, and update
build scripts to use correct arguments for the updated signing
tools.
Bug: 15984840
Bug: 18120110
Change-Id: I23ed5a004ecdad6cf7696487935ad5031eb8adf8
(cherry picked from commit 72d90eb189)