A few module types add extra dependencies on $(my_register_name), move
them to $(my_all_targets) so that they are built for mm and mma too.
Bug: 31526036
Test: mmm framework
Change-Id: I2e594ce771451a99691739b963f4ce517e9dd595
This is needed in order to be able to run error prone (which is
a plugin replacement for javac) on a subset of the java code.
Bug: 31507496
Test: Build javac-check-core-tests and check the resulting JAR
Change-Id: I5a556920572fcdad7b39d67e3f00fe0e0f1f8f46
I'm working on removing the --ignore_dirty=$(OUT_DIR)/% argument from
Kati. If we're always writing to a file that we're also reading, then
with that flag removed, we'll always reparse all the makefiles.
So instead, use the method from the generated java file cleanup where we
read from a "previous" file, write to a "current" file, then use a
cmp || mv to overwrite the "previous" file if necessary. When the flag
is removed, this will cause Kati to need to run twice any time this
changes, but it's better than forever.
Bug: 30947985
Test: Switch between aosp_arm-eng and full-eng
Change-Id: Id2d1445809b60ce26700bb2aca765df3b5c2b360
We don't need to manually remove objects when switching SANITIZE_TARGET
-- that will be handled by Ninja noticing that the command lines are
different.
Bug: 30947985
Test: None
Change-Id: I83c15981cf6ea258bb7fa85490b0b1ede1058aa6
This was printing "error:", but not actually triggering an error.
Instead of trying to write a single line bash script to handle this,
move the actual check into python. This allows us to print all of the
errors for a single module before triggering the failure.
Also updates the warning format and the warn.py script to properly parse
these warning. Many of the java:sdk -> java:platform warnings are false
positives due to the lack of LOCAL_SDK_VERSION markings on prebuilts.
Individual tags can be marked as warnings now, which lets us check for
system libraries linking against vendor libraries (which won't work on
AOSP). I'm not sure this is a completely valid check, which one reason
that it's just a warning.
Test: m all_link_types (with some missing libs commented out)
Change-Id: I333e418c9a4511b7c7e826891ae481da08fbf6f9
We want to build things in CTS (things built against the NDK) with
integer overflow checks. Some projects in the tree also make explicit
calls to the overflow checked builtins, and those projects need to be
built with the NDK (external/dng_sdk is the specific example that
brought this up).
Test: make checkbuild tests
Bug: None
Change-Id: Iab27dd0d931f723140de242049fa72f3b1ce0fb8
For properly picking the shared library install dependencies, HOST_OUT
and HOST_CROSS_OUT are necessary so that we don't add a dependency
between Linux and Windows. But for target modules, we must use
TARGET_OUT_ROOT instead of TARGET_OUT, or modules in /data and /vendor
won't have proper install dependencies.
Bug: 31462199
Test: m bionic-unit-tests; manual diff of generated ninja file
Change-Id: I828fa2664613296cc6c431813f5657abffdd2b8f
BUILD_HOST_static has been broken because I was stripping
-Wl,--start-group/-Wl,--end-group into a separate set of ldflags instead
of keeping them wrapped around some of the ldlibs. So don't pass some of
the build system flags through the ldlibs checker.
Bug: 30898128
Change-Id: I332b42679695cdc5da3cb0036290b6a3544699c0
Native coverage is enabled by setting NATIVE_COVERAGE to true
and specifying a list of paths in the COVERAGE_PATHS
environment variable. Files are exported to a zip file in the
target out directory.
Change-Id: I66a2ddd88e849bec1cc0cdae1b51fe18a007e2c3
During the development of goma client, we sometimes need to use goma
compiler_proxy, which has already been running.
Test: NOSTART_GOMA=1 USE_GOMA=1 m.
Change-Id: Ifa969c40871325fd43ee6443ddbe3b18fde62c5a
This workaround to clean package intermediates is no longer necessary,
as ninja reruns commands whose command line changes.
Test: switch between product overlays that use add-resource, verify
R.java is regenerated.
Change-Id: Icb1f76360e39882e4401180414a031956777b020
libspeexresampler uses LOCAL_EXPORT_C_INCLUDE_DIRS to export this path
to all of its users already.
Test: m libaudiopreprocessing libaudioutils
Change-Id: I682303142840d6f0f02c990de8e713620840bbda
Remove the global linker search path, as it can cause spurious build
failures. If a library with the same name as a system library is in the
process of being written to the directory in the global search path, and
the linker may try to read the partially-written built one instead of the
system one. We already use full paths to libraries for target builds,
do the same for host builds. Also remove the normalize library
functions, they are no longer necessary.
Test: m -j checkbuild
Bug: 31393456
Change-Id: If9fc631e111f568c700fd73e103445c30d7e9d11
ART now produces a new output file called VDEX, produced alongside the
existing OAT file. This patch updates the relevant build rules.
Bug: 30937355
Change-Id: Ib6be9f8f36c8f061dbbebd72cb55a5d4b6dc27eb
The NDK gtest libs are always suffixed to simplify the make macro
that generates the test modules.
Bug: http://b/16574165
Change-Id: I1c9647e90aff2f1e9da4a88cad30199b1e423757
We never want Kati to see MAKEFLAGS, as forcefully overriding variables
is terrible. The variables in MAKEFLAGS are still available in the
environment, so if part of the build wants input from the user, it
should be explicitly checking for an environment variable or using ?=
This commit shouldn't actually change any behavior -- the version of
Kati checked into our tree doesn't actually read MAKEFLAGS (the latest
version does, which is why this change is necessary). We're also already
clearing MAKEFLAGS during makeparallel, so the USE_GOMA case already
doesn't pass through MAKEFLAGS.
Test: Manual $(warnings $(origin MYTEST) $(MYTEST)) with old and new Kati
Change-Id: I5e4ffa66b3539a539cc7a26da24645b11445c469
The clang compiler wrapper will be looking for this environment
variable, but it should only ever be set by the `gomacc` in CC_WRAPPER.
Make sure that it isn't otherwise set in the environment.
Change-Id: I4b26c7183bc47f71dffa7dfcc2e5b08e840a11b1
Move extra module dependencies like symlinks from dependencies of
$(my_register_name) to $(my_all_targets), and make $(my_register_name)
and other convenience phony modules depend on $(my_all_targets). Move
$(LOCAL_MODULE)-host/-target to depend on $(my_all_targets) instead of
directly depending on the built and installed modules.
Change-Id: I3b093986db7a1bff118f1f2482275f0997a98fb6
Let clang-tidy report warnings in header files in the
system and current directories but not the external
and vendor directories.
Test: build with WITH_TIDY=1
Change-Id: I1723b8eb95948961fb7164a19989e0a926e5bf8a
fat16copy.py can be used to copy files or directories in to the root of
a fat16 image.
Usage: fat16copy <image> <file> [<file> ...]
Test: Used to compose a Raspberry Pi 3 boot image
Bug: 28912590
Change-Id: I29c9eec3786e2c5cc94f9a160360bac850809a93
This CL changes BUILD_FUZZ_TEST to generate binaries in a
sub-directory called fuzzers/ under the nativetest directory. This
allows fuzzers to be distinguished from the other native tests and
makes it easier to perform automated fuzz-testing.
Bug: 25714111
Change-Id: I452e43f15728ec9168dd44776b6ffcea6037fa7f
HOST_PREFER_32_BIT was used during the switch to 64-bit host tools to
keep the SDK building as 32-bit, but is never set any more.
Change-Id: I874f89c7d1e9cd8c9d4c879048d81a4362ce4dce
config.mk is parsed by make and then kati, and goma.mk appends to
CC_WRAPPER. Only export it from make so gomacc doesn't appear twice on
the command line.
Bug: 31142427
Change-Id: I5ad97ee3a00b013faa620215c839499b48528e00
Pass the USE_GOMA flag to soong, and export the CC_WRAPPER environment
variable after adding gomacc to it.
Bug: 31142427
Change-Id: I6de698a40817c0615b03fa17bd27075465d79ffd
Now we only run the "main" stage from Soong once, and only when combined
with the Kati ninja file. So we can now depend on pools or rules defined
by Kati in Soong.
Change-Id: I7a8fd699ddc0d41bbcbbf3c6f2edb9e26ccfc4c9