Just move the proto and renderscript sources into their own directories
-- the entire directory is wiped if the file list changes since the
command line will change. So we can just enable/disable pulling sources
from those directories based on whether there were files in the list or
not.
Bug: 30947985
Test: m -j java
Test: Remove a proto file from a java lib, ensure the generated source
is not included.
Change-Id: If7529979de6fa62a651933a3a974f47b033851d6
The only user of get-package-min-sdk-version-int was signapk. signapk
no longer needs to be provided with the APK's minSdkVersion though.
(cherry picked from commit e185da21ca)
Test: make clean && make
Change-Id: I6867a004aec0f3752cbbc99cc30e02ca5404b3c4
Prior to this change, when signing APKs, the build system invoked
'aapt dump badging' on each APK, to detect the value to pass into
signapk as --min-sdk-version. Now that signapk uses the apksig
library, it can auto-detect that value on its own, thus avoiding the
need to invoke 'aapt dump badging' and thus speeding up the build
process.
The semantics of signapk's --min-sdk-version flag is changed by this
commit from having the default value of 0 to having the default value
of "auto-detect from APK".
P.S. The get-package-min-sdk-version-int is not removed from
core/definitions.mk in this commnit, because this function is used in
another project's .mk file and thus that .mk file needs to be modified
first.
Test: rm -Rf out/ && make
Change-Id: I0972fcf0abbde9cbf6794e6c05c743c77c8a78f9
This can be used to ship source data as test artifacts next to native
tests. It works for both local builds and the test bundles using
package_modules.mk.
You just specify a file list relative to the local directory, and those
files will be copied next to the executable under
/data/nativetest*/<module>/...:
LOCAL_MODULE := mytest
LOCAL_TEST_DATA := data/file1 file2
/data/nativetest/mytest/mytest
/data/nativetest/mytest/data/file1
/data/nativetest/mytest/file2
If the data is in another directory, you may also specify a different
prefix for the source files:
LOCAL_TEST_DATA := external/skia:resources/f.xml
/data/nativetest/skia_test/resources/f.xml
And there's a new convenience macro to find a list of files in this
format:
LOCAL_TEST_DATA := $(call find-test-data-in-subdirs,external/skia,"*.xml",resources)
I'll expand this to native benchmarks and fuzz tests in a later change,
since they don't have their own module classes yet.
Bug: 30564705
Test: m -j minikin_tests; ls $OUT/data/nativetest*/minikin_tests
Test: m -j continuous_native_tests dist; zipinfo -1 out/dist/*continuous_native_tests*.zip
Change-Id: Ic76a7b62e7f567f259c4ab1510ee97d26600ba9a
Building with LOCAL_STATIC_ANDROID_LIBARIES and LOCAL_USE_APPT2
causes a warning:
build/core/package_internal.mk:143: Empty argument supplied to find-subdir-assets
Only call find-subdir-assets if my_res_dir is not empty.
Also improve the warning message to make it easier to find the module
that caused it.
Test: m -j
Change-Id: I9a71162c7e2ed82f64d6844baca256968ac77317
The last user of this was the NDK, which has been using full paths in
binary.mk. So remove it.
Test: lunch aosp_arm-eng; m -j native
Change-Id: Ida2523a2d19131ee3ef005edb3e5bcf830710b11
This make aidl-cpp write out a dep file that ninja parses correctly.
Test: Manually inspect ninja depfile
Change-Id: I4890a91eb29a6388e17b1ffac23a3dc0ffe6c212
Ninja doesn't need the phony make targets, in fact, the parser doesn't
handle them correctly and ends up duplicating the dependencies. This
shrinks a `m native` deps file from 54M -> 35M on AOSP.
Test: Compare out/build-aosp_angler.ninja before/after
Test: wrote a tool to dump the .ninja_deps, added dedup feature, files
identical after dedup.
Change-Id: Iec7a9a0739e8678c1f4db79c68e423a39b9aad4b
Disable the NATIVE_COVERAGE code when not in use. Provide the proper
PRIVATE_ variables so that the $DISPLAY environment variable isn't
encoded into the ninja file.
Remove PRIVATE_ARFLAGS, which is never set.
Test: compare build-aosp_flounder.ninja
Test: NATIVE_COVERAGE=true build-aosp_flounder.ninja, inspect
Change-Id: I2a52de440fd991cdc5761ff8bd58a474892d2dfc
$(shell) isn't particularly fast in Kati, and they have to be executed
both when reading the makefiles and determining whether the ninja file
needs to be regenerated.
Right now, the regen time is mostly hidden because we run them in
parallel. We've also configured it to ignore any commands that contain
"echo", "date", or the output directory. That happens to remove most
commands that contain side effects, so running them in parallel is fine.
But the side effects contain some important things, like the clean up
necessary when switching products. So I'm removing those filters, and
then we'll need to run the shell commands in sequence, since there will
be side-effects. That makes regen take longer though, so use pure-Make
implementations instead of $(shell) where possible.
This set of changes reduces aosp/master aosp_arm64-eng build $(shell)
usage and time by 2/3:
*kati*: func shell time: 3.135095 / 709
*kati*: func shell time: 1.067331 / 236
Bug: 30947985
Test: Manual test lines for math functions
Test: Compare build-aosp_arm64.ninja before/after
Change-Id: I4fc9d6318957992921972994f277c17918e7e1eb
And ensure compatibility with coverage plugin.
(cherry picked from commit 862bb84d37e3e6ca61080de58f206e512e09d4e0)
Bug: 28876950
Test: Manually tested by some manual activations of the coverage plugin.
Change-Id: I804558a501825357bf0812de626d2957eedbdc13
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
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
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
AUX is a new class, similar to TARGET
While TARGET defines toolchain for Application Processors
AUX is defining toolchains for arbitrary utility cores (DSPs, GPUs,
MCUs, etc). This allows building of non-android sources as part
of Android tree and avoid using prebuilts if source code is avaliable
Bug: 29635686
Change-Id: Ie755ea054b16c3e86369f5fb2ba6eb0b384af77f
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
Use PRIVATE_PREFIX to tell us what is the target class
Bug: 29635686
Change-Id: Ia895e780f741b9cb00c7ee9633055b5363e675a1
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
We supported de-duplicating LOCAL_INIT_RC across multiple architecture
variants in a single module definition, but that didn't work if the
module was defined with two different BUILD_PREBUILT definitions. That's
how we're exporting modules from Soong to Make.
Change-Id: Ifc93b15ef78ea3d8e78005d428a3ec57d7e414e8
Creates a build_system_stats.txt build artifact that contains statistics
on how many BUILD_* modules are defined in a build. Also writes out
information about the Soong module types sent from the Soong build.
Merged-In: Iaf0c7062f542dc6942b5349854f3d49267cac4a5
Change-Id: Iaf0c7062f542dc6942b5349854f3d49267cac4a5
This ensures that we're not accidentally linking the wrong version of
a library with the same name thanks to -L.
Test: Still builds.
Change-Id: I22e9e28412844ff4f8bda42ebbc300ea6574e474
Split the variables that contain header directories into ones that
should be prefixed with -isystem and ones that should be prefixed with
-I in preparation for moving some headers from -isystem to -I.
Add $(wildcard) around SRC_HEADERS to match the soong behavior, and move
users of SRC_HEADERS from config.mk to binary.mk so that the exported
soong value is present.
Test: no changes to build.ninja compile rules
Change-Id: Iadecbbf4351a01e53cb57e721d31f4f836bb82d9
Refactor includes in transform-*-to-o to simplify future changes to the
default include paths.
Test: whitespace-only changes to the compile rules in build.ninja
Change-Id: I766af1f22a4838d933691b6df37530db3ba4e21d
Specifying LOCAL_MODULE_SYMLINKS will create symlinks to the installed
module in the same directory.
Change-Id: Idecb2b75f0c9999eb000eed9a79a989244ccf6c2
When Soong was optional, the make build system needed extra complexity
to ignore Android.mk files that had an associated Android.bp file. Now
that Soong is required and the Android.mk files that were obsoleted by
an associated Android.bp file have been removed, remove all of the logic
that found associated Android.bp files. Android.mk files and Android.bp
files are now handled independently.
Change-Id: Ia6643d151b920689219ca8abd59ede44d230ba35
For acp, we've been using an old prebuilt in prebuilts/sdk, but it's not
part of the SDK. Instead, we'll use a prebuilt in the build-tools
repository.
For ijar, we've been using the host libstdc++ to workaround the lack of
libc++ on some unbundled branches. Instead, use a prebuilt that can use
libc++.
For ziptime, we've been disabling it on unbundled branches, due to the
lack of libc++. Instead, use a prebuilt version of ziptime that can use
the prebuilt libc++.
Change-Id: If80f845ea06f76e3fe6765964e77c864eaf303d0
am: 18023b557b
* commit '18023b557b6d33836de380df397fce10598931a9':
Update Android.mk finder to work with Android.bp files
Change-Id: I87915d75c3bda9c41c926a7c8ad7c650ac085199
The Android.mk finder should stop traversing when it finds an Android.bp
file, and any Android.soong.mk file at the same path should be included.
Update filter-soong-makefiles to accept a mixed list of Android.bp files
and Android.mk files, convert Android.bp files to Android.soong.mk files
if they exist, and ignore Android.mk files that have an Android.bp file.
Update first-makefiles-under to use the new --dir syntax for
findleaves.py and search for both Android.bp and Android.mk files.
Update all-makefiles-under and all-named-subdir-makefiles to search for
both Android.bp and Android.mk files.
Change-Id: Iddc51bf84593d5de3add02f2b2c065da08962af4
am: 1059f37377
* commit '1059f37377fd37cc311db522b4b5689086480d17':
Add build number to apps' version name for non-platform build
Change-Id: Iad8a4f271db54561d605a3f98f59a62e97eb1614
If TARGET_BUILD_WITH_APPS_VERSION_NAME is defined, the build system
will add build number to the apps' default version name.
Bug: 28982976
Change-Id: I536f273b557fe7c935cc4ef1052c3297f8029863