Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date: 2011-04-12 10:57:22 +0100
Allow a device to generically define its own headers
We have a few cases of devices including specific versions of projects
just because of modified headers (msm_mdp.h comes to mind), and I just
had enough of ifdeffing header files for specific cases (the P990 needs
a lot of these).
Now... if a target defines a TARGET_SPECIFIC_HEADER_PATH, any headers in
there will take precedence over the standard ones; for example, on the
p990, I have
TARGET_SPECIFIC_HEADER_PATH := device/lge/p990/include
which makes, for example, the
device/lge/p990/include/hardware_legacy/AudioHardwareInterface.h be
used instead of
hardware/libhardware_legacy/include/hardware_legacy/AudioHardwareInterface.h
whenever a source file uses <hardware_legacy/AudioHardwareInterface.h>
Change-Id: I41b62668b60e3f62a6ebd3738d8d2675103a81e6a
build: fix target header overlay
LOCAL_C_INCLUDES as defined by the makefile should be put AFTER
the overlay includes so the overlay always takes precedence.
Change-Id: I489b2aab6dbacd9122d834f85e07b63ed1271f07
Author: Jan Altensen <info@stricted.net>
Date: 2020-09-10 15:18:49 +0200
soong: add TARGET_SPECIFIC_HEADER_PATH
Change-Id: I582ae8e6e010016b33fd9b020b723e5fc2dc442b
Change-Id: I3c885fe504ce4f646001697119cffd674db9ec49
This is a combination of 3 commits.
This is the 1st commit message:
build: add kernel header dependency if module uses kernel headers
Many of the QCOM components use kernel headers, but don't declare
the dependency on them. This is fine in CAF because of the way they
build the boot.img before anything else. In CM, we don't build the
boot.img the same, so we run into a race between the kernel build &
these modules... and the modules lose.
Warn about modules that have this missing dependency, and add it for
them so we don't have to modify each Android.mk.
Change-Id: I95f1e47b5ef440f6f5d8f64a0c3f38d9572e839e
============================================================================
This is the commit message #2:
build: Switch kernel header inclusion
The build is switching to the target INSTALLED_KERNEL_HEADERS to
declare dependencies on kernel headers.
Change-Id: I913e74681b02dfcf1eaed3d1e47ff4ab2300b12d
============================================================================
This is the commit message #3:
build: Automatically replace old-style kernel header includes with new header lib
Since we do this via soong and the result is a header library, just replace all
legacy include paths that point to the old header location with calls to the new
header library. Since we no longer have the legacy include, we can also remove
the additional dependency.
This reverts commit fa798218e5b7f96e12ab3acc9d47a3f26a140777.
Change-Id: I716955534e50831e6568ca01e480aa8b90075d92
LOCAL_USE_VNDK property refers if the module uses VNDK, and this
property is being used to check if the module is installed in vendor or
product. However, the term no longer makes sense with VNDK deprecation,
so it should be renamed. Similar to change in aosp/2897612, rename
LOCAL_USE_VNDK as LOCAL_IN_VENDOR or LOCAL_IN_PRODUCT.
Bug: 316829758
Test: AOSP CF build succeeded
Change-Id: I2da2e2027ccabbcfbb444abc6828addeb3b22e13
LOCAL_USE_VNDK property refers if the module uses VNDK, and this
property is being used to check if the module is installed in vendor or
product. However, the term no longer makes sense with VNDK deprecation,
so it should be renamed. Similar to change in aosp/2897612, rename
LOCAL_USE_VNDK as LOCAL_IN_VENDOR or LOCAL_IN_PRODUCT.
Bug: 316829758
Test: AOSP CF build succeeded
Change-Id: Icfd1707953eba2e29044468ab6728b39d7998048
This is to align with build/soong to support clang coverage.
- support env CLANG_COVERAGE and CLANG_COVERAGE_CONTINUOUS_MODE.
- support kill -37 signal to dump coverage.
- support build clang coverage together with hwasan.
Bug: 309894892
Change-Id: I14f75d7fdfdf872d2db3bbceb2c10d6572bcfebf
Like soong modules, pass LOCAL_MIN_SDK_VERSION to clang when it's set.
Bug: 317676192
Test: manual check (set LOCAL_MIN_SDK_VERSION as 34 for wpa_supplicant
and see if generated build commands has android34)
Change-Id: I48928e54417f47f2e0c2417f04e5893764c3edb9
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