ALL_GENERATED_SOURCES contains the generated sources of modules
defined in Make. They always have a path inside the intermediates
directories. The only readers of ALL_GENERATED_SOURCES are filtering
for files in the output directories, and will never match anything.
Test: m checkbuild
Change-Id: Ic9af8761d445fa90088f838c385bd2aea3bc3048
Bug: http://b/215753485
This allows enabling a new warning from the compiler update for
first-party code. This is less precise than the check in build/soong
(also overrides for vendor/google, for e.g.) because of being written in
Make.
Test: With new clang, verify the following:
lunch oriole;
m out/target/product/oriole/obj_arm/SHARED_LIBRARIES/libexynosdisplay_intermediates/libresource/ExynosMPP.o
Change-Id: I13080fec71e282c4b528a6d01b967b1c0c4aef02
Link against the libunwind.a shipped with the NDK so it matches what's
linked into the NDK's libc++_shared.so.
For arm32, binary.mk and cxx_stl_setup.mk had been adding two different
versions of the LLVM unwinder to the same linker command-line. Remove
the duplicate one from cxx_stl_setup.mk.
-Wl,--exclude-libs is now unnecessary because the symbols are marked
hidden in the archive itself.
Bug: http://b/153025717
Test: device boots, manually inspect some linker command lines
Change-Id: Ie7182bd565014348b16448976dc6587d2885ba99
__ANDROID_VNDK__ is defined for the modules that are able to use the
VNDK libraries. As both product and vendor variants define
__ANDROID_VNDK__, we don't know if a module is built for vendor or
product on build time.
__ANDROID_VENDOR__ and __ANDROID_PRODUCT__ macros can be used to
specify the image-variant-dependent codes.
Bug: 180646847
Test: m nothing
Change-Id: I9a37607b1e1e4e16eab02fb6c96d1a92158c96b8
In Make, clang-tidy and clang run in the same action, but only clang can
be remoted via RBE/GOMA. So to prevent running up to 500 clang-tidy
instances at the same time and overloading the machine, use the local
pool when using clang-tidy. This does limit the parallelism of the clang
actions attached to clang-tidy, but hopefully that's not that much of a
problem. Clang-tidy isn't enabled by default (opt-in per-build /
per-module), and Soong does not run into this problem.
Bug: 162615762
Test: m WITH_TIDY=1 nothing; build-aosp_flame.ninja is identical before/after
Test: use_rbe m WITH_TIDY=1; inspect build-aosp_flame.ninja, see local_pool
Change-Id: I7dd196fcf4183d175b9608d3d48cdcdf81b514ce
Merged-In: I7dd196fcf4183d175b9608d3d48cdcdf81b514ce
Dependencies of makefile modules are being redirected according to
SOONG_CFI_STATIC_LIBRARIES and SOONG_HWASAN_STATIC_LIBRARIES. But the
variables are shared among all variants (e.g. core, vendor, product,
arch), which can cause build error.
This splits the Makefile variables into several lists, one list per each
arch and each image variant, to correctly make the redirection.
Bug: 162476652
Test: build and inspect ninja
Change-Id: I8a46804d4b7c1c485e59e10710cc514a89333fa4
- Adds makefile and which files are installed to the SOONG_CONV CSV file
- Updates soong_to_convert.py to be able to parse that
- Adds new script that is more detailed.
- Outputs that file as part of the droidcore build to
$(OUT_DIR)/target/product/$(TARGET_DEVICE)/mk2bp_remaining.html
Test: m out/target/product/$(get_build_var TARGET_DEVICE)/mk2bp_remaining.html
Change-Id: I7c380b6070754f4329bf3965595751e4dac794a0
Rename `CoveragePath` and `CoverageExcludePaths` as
`NativeCoveragePath` and `NativeCoverageExcludePaths` (resp.).
Also, populate `NativeCoveragePath` and `NativeCoverageExcludePaths`
from environment variables `NATIVE_COVERAGE_PATHS` and
`NATIVE_COVERAGE_EXCLUDE_PATHS` (resp.).
Test: m nothing
Bug: 158212027
Change-Id: I409dbb04b09744a7bd95a4b69361e858b9f89e23
Instead of using `x := $(x) foo`, make sure `x` is initialized first,
then use `x += foo`.
For a aosp-master/aosp_crosshatch-userdebug build, this takes the build
from 49s to 33s (no significant difference in peak memory)
Bug: 158488548
Test: build-aosp_crosshatch.ninja is the same before/after
Change-Id: I41fb7611030dd3ba824f896a9c9eadbdd218f464
Everything should be getting device specific kernel headers from the
device_kernel_headers header library these days.
This does change the behavior of system libraries on devices using the
VNDK -- they no longer get device-specific kernel headers by default, as
we generally expect the system image to be device-independent. The few
libraries that may still need this can use:
LOCAL_HEADER_LIBRARIES += device_kernel_headers
Test: treehugger
Change-Id: I90ccb921d58b8d27dd0118a974202696e0af745f
Revert "Add sdk mutator for native modules"
Revert submission 1242911-sdk_version_variant
Reason for revert: b/153394225
Reverted Changes:
Ife99745fb:Use libnativewindow for platform variant of libagq...
I1bae84c43:Use libnativewindow for platform variant of androi...
I6e6021ed3:Use stl to depend on libc++
Ife99745fb:Use libnativewindow for platform variant of libRSS...
I2c9f439b9:Fix static dependency on libprotobuf-cpp-lite-ndk
Iff2aff9cf:Set sdk_version for cc_genrules used by modules wi...
I7d72934aa:Add sdk mutator for native modules
Ief378a007:Use sdk variant of Soong modules when LOCAL_SDK_VE...
Bug: 149591340
Change-Id: I6cd4de221ece29e48d58a8b1297dc2512b2dad13
Fixes: 153394225
Soong now makes a variant of native modules that set sdk_version.
Use the new variant for native modules or apps with JNI that are
defined in Make and set LOCAL_SDK_VERSION.
Test: m checkbuild
Bug: 149591340
Change-Id: Ief378a007e43b0aea31fd5845410bbffec0ffae6
With kernel support being removed for execute-only memory layouts,
remove support for XOM until there's kernel support again.
This allows us to gain the code-size improvements from
"-z noseparate-code".
Bug: 147300048
Test: Compiled binaries no longer marked XOM by default.
Change-Id: I08a054e903b202f513d3b3381afd606bb87cf257
This allows BOARD_VNDK_VERSION to be set to old versions. With VNDK
snapshot and vendor snapshot installed, newer system and older vendor
image can be built in the same time.
Bug: 65377115
Test: 1) VNDK_SNAPSHOT_BUILD_ARTIFACTS=true m dist vndk vendor-snapshot
Test: 2) install snapshot under source tree
Test: 3) set BOARD_VNDK_VERSION and boot cuttlefish
Change-Id: Ic5fefc8bcb866584b27f021a429cb6670a2e3048
Similar to native:vendor, native:product can use VNDK libs but not
vndk_private.
It is activated when PRODUCT_PRODUCT_VNDK_VERSION is set.
This restores the reverted commit
4e7e76fe5a (aosp/1197274).
The problem of the original CL was assuming no modules have both
LOCAL_PRODUCT_MODULE and LOCAL_USE_VNDK in the old implementations.
But many vendor modules in the targets without setting
PRODUCT_PRODUCT_VNDK_VERSION in old branches had both flags that
caused link failures.
To make it no-op without PRODUCT_PRODUCT_VNDK_VERSION, I defined
LOCAL_USE_VNDK_PRODUCT that is set to true if
PRODUCT_PRODUCT_VNDK_VERSION is defined and LOCAL_PRODUCT_MODULE is
true.
Bug: 146620523
Test: build with PRODUCT_PRODUCT_VNDK_VERSION := current
Change-Id: I344c7dc1c47f08706c101e486ff07c3f10aff8ac
This reverts commit 4e7e76fe5a.
Reason for revert: build breaks (bid: 6147225) and postsubmit test fails.
There are some modules that have both "product_specific: true" and "vendor_available: true", which tags the module as "native:product" unintentionally.
We need to clean up these cases first and revisit this CL.
Bug: 146620523
Bug: 147987741
Change-Id: Ib07543235d72a135b6b732aaa909c147d2df832b
Similar to native:vendor, native:product can use VNDK libs but not
vndk_private.
It is activated when PRODUCT_PRODUCT_VNDK_VERSION is set.
Bug: 146620523
Test: build with PRODUCT_PRODUCT_VNDK_VERSION := current
Change-Id: Icfd94dfc30e77581991799d9e2f408f57da22cea
Also, prefer
-Wl,--execute-only
rather than
-Wl,-execute-only
Bug: 139945549
Bug: 146144180
Test: m
Change-Id: I4a07978c7a84a0a7e841b9e059305b0f443d0e95
Suggested-by: Ryan Prichard <rprichard@google.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
See the Changes.md addition for more details.
Test: treehugger (build_test on downstream branches)
Change-Id: I6ad6b454a6fccf93772fda26cfc7dd6bbfc07c40
Exclude vendor/ and hardware/ from the manually written binder interface
whitelist.
Bug: 136279235
Test: interfaces in excluded directories are not checked against whitelist.
Change-Id: I71152995466a25e92b6d0b153538ebfc1b252f5b
No device in our tree use this obsolete thing now.
OEM devices with libhealthd should define health HAL
2.1 instead.
Test: builds
Fixes: 127677771
Change-Id: I1861452a3f7fc97ee20615c8f9f25422f9f507e2
To remove '../' and other strangeness from compiler arguments, which run
into problems with remote execution:
Android.mk: LOCAL_C_INCLUDES := $(LOCAL_PATH)/include/bar/..
foo.c: #include "foo.h"
include/foo.h
In this case, we'll send foo.c and include/foo.h, but include/bar may be
empty, and not exist on the remote server. So while the file is there,
you may not be able to access it.
There's also a byproduct of removing extra '/' and './' components,
which should be harmless.
Fixes: 144109314
Test: diff build-aosp_arm.ninja before/after; scan diffs
Test: treehugger
Change-Id: Id2eceba76fbf9b1524487e82cb5c8903c815e45f
Use of -Weverything blocks build system changes and toolchain updates
on new warnings. Forbid it in the build system. Developers can
experiment with -Weverything on their module by adding it to their
Android.mk file and building with
m ANDROID_TEMPORARILY_ALLOW_WEVERYTHING=true
Fixes: 143713277
Test: manual
Change-Id: Ifca9ad45301b0d51f18b5ae85cfb9e5b89fbef3f
Use .KATI_NINJA_POOL := none to mark rules that can run in RBE or
goma when they are enabled, which along with passing
--default_pool=local_pool will allow moving remoteable jobs into
the remote pool without relying on hacks in kati.
Fixes: 143938974
Test: inspect pools in build-${TARGET-PRODUCT}.ninja for m USE_RBE=true
Test: inspect pools in build-${TARGET-PRODUCT}.ninja for m USE_GOMA=true
Change-Id: I08615ae1f2eaef9ff0ba253b8aa3d83ab57ebb27
The NDK is built like this. Having it for app builds within the Android
build system allows us to distinguish platform code from app code.
This is specifically to distinguish AIDL interfaces using libbinder_ndk.
'myBinder-ndk_platform' libs will use additional functionality that
'myBinder-ndk' libs won't use (in the future, these may be separate
variants with the same name, see b/121157555).
Bug: 136027762
Test: using this to distinuish code in NDK vs platform code
Change-Id: I27471b9184e8d67fc51c8eace317f92b3f0f3539
Now that ONE_SHOT_MAKEFILE no longer exists, we don't have to rely on
the filesystem to store this informtion.
This removes ~16.7k files from our build graph
(aosp-master/aosp_arm64-eng), though only about 600 of them were being
used in a normal build.
Test: treehugger
Change-Id: I3ac12f5ea7f11d25064109a0599bc5be1976fba5
Bug: http://b/119086751https://android-review.googlesource.com/c/837025 disabled lld relocation
packing globally and enabled it for soong modules targeting pie and
above. Turn it on for Android.mk modules as well.
Test: grep for -Wl,pack-dyn-relocs=android in
out/build-aosp_<device>.ninja
Change-Id: I81b8625073aa6b364219b8cf3122b69c95ec7589