cc modules can use __ANDROID_VENDOR_API__ to read BOARD_API_LEVEL
that is the API level of the vendor surface.
Bug: 313822931
Test: check ninja commands to have -D__ANDROID_VENDOR_API__=<version>
Change-Id: I868b88ae72b4f60bc3d5ad567fbacd2222dd62d7
LOCAL_JETIFIER_ENABLED, LOCAL_NO_PIC, LOCAL_PREBUILT_STRIP_COMMENTS,
LOCAL_RMTYPEDEFS, and *.vts sources are never used. Remove them
and the code related to them.
Test: no change to out/build-aosp_cf_x86_64_phone.ninja
Change-Id: I2ca9e674602057cc163b8bc28b0c57a0b7cc4361
Nothing ever reads ALL_DEPS.*.LICENSE, and its an ever-growing list
that is sorted every time, which is extremely expensive.
notice_target is never set after I4cddf9a381a1258bdc2b1b42be72c447df10d234,
remove all the related code.
Test: no change to out/build-aosp_cf_x86_64_phone.ninja
Change-Id: I0fa6a46e62ef8aa78873b43d3064b57b1c54de51
Soong didn't have any explicit references to these paths because it
depends directly on the modules, but the make side of the build still
needs to construct these paths explicitly.
I removed a bunch of dead code that made the fix less obvious while I
was here.
Bug: None
Test: treehugger
Change-Id: I1a283a3bc98a94fc5481c869b3b0a4eacf69d859
Bug: b/261642850
Test: Build and check warnings. Add two xfail tests in art and see the
results locally.
Change-Id: I122ee2cbfa37bdb71026781efe6cb7131b873ae0
There are still devices that set BUILD_BROKEN_USES_BUILD_HOST_* and
build host modules in Make. Add basic support for building against
libc_musl in Make when USE_HOST_MUSL is set.
Bug: 258535366
Test: build a host tool defined in Android.mk file in internal branch
Change-Id: I9150be749bbeaac2ac5a33b2cf915004aa3033df
build_test is only run on presubmit in internal master
for cls that change build/make and a few other repos,
but notably not build/soong. Add this cl to a topic
with a build/soong change we'd like to test with build_test.
Bug: 220375749
Test: Presubmits
Change-Id: I3e2f59e5f341cce486368dac9bf2f28f265e53fd
There are some module definitions in the Makefile, which needs to be
built with API imported module. This change replaces existing
dependencies from the Makefile, to append suffix on the reference, so it
can be linked to API imported modules.
Bug: 243736650
Test: 'ALLOW_MISSING_DEPENDENCIES=true m halutil' succeeded.
Change-Id: I12baa36e41c0c69228be5f0d08fb4c18eb8a22b1
MODULES_ADDED_WALL is deceiving and it actually meant which modules are
allowed to have warnings (do not automatically append -Werror flag).
Test: presubmit
Bug: 233183337
Change-Id: Ia2eb972d3d76ba245840f9872cbcc66d2894dab3
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