These compiler flags weren't being properly added to ToolingCFlags,
which was causing clang-tidy to complain a lot about incompatible
redeclarations of library functions. Moving them to compilerFlags()
causes them to be added to ToolingCFlags.
Bug: None
Test: mma in bionic/. clang-tidy now shows 7,142 fewer high-severity
warnings.
Change-Id: If5148858d9db143a3dd9b0ce6c970258ec4ff9cb
If owner is specified in a defaults module, we shouldn't concat that
with the owner specified in a module using that defaults module. A
string pointer will produce the correct behavior (overriding the default)
Bug: 37330627
Test: out/soong/Android-*.mk looks correct after this change
Change-Id: I64574e2ba81c11b042248d7a44702ec4534ee932
Ie922dfc59787514b55fd15e7b97728732714e939 updates
build/blueprint/build.ninja.in, update soongs to match to avoid
rebuilding minibp after every bootstrap.
Bug: 63720725
Test: m -j && m -j
Change-Id: Ib06bc39efae148aaa6d5d8c2ac1b1d41d8ec00d9
Also export the corresponding variable to make.
libnativehelper's include_deprecated contains all of the
headers that are currently used by libraries without
the "nativehelper/" prefix.
The current count of this is this:
2 ScopedLocalFrame.h
4 JniInvocation.h
4 ScopedBytes.h
5 AsynchronousCloseMonitor.h
6 toStringArray.h
7 ScopedStringChars.h
38 JniConstants.h
41 ScopedPrimitiveArray.h
79 ScopedUtfChars.h
80 UniquePtr.h
100 ScopedLocalRef.h
467 JNIHelp.h
Now we can remove each file from the global header include
on a file by file basis.
Bug: 63762847
Test: libs find their headers
Change-Id: Iffc0c1ceb55cc59dc4a70c75d7c0b9ce8397b2cf
Add support for excluding paths from having integer_overflow applied to
them when using SANITIZE_TARGET=integer_overflow via an
INTEGER_OVERFLOW_EXCLUDE_PATHS make variable. This covers the soong side
of the change.
Bug: 30969751
Test: Build with SANITIZE_TARGET=integer_overflow
SANITIZE_TARGET_DIAG=integer_overflow
INTEGER_OVERFLOW_EXCLUDE_PATHS=<path> and confirmed this was no
longer being applied to binaries in that path.
Change-Id: I298b772f5425da28dff1cf007825be19558db3a8
If BOARD_VNDK_VERSION is set, and a module is set to
`vendor_available: true` it is installed in /system and /vendor.
However, if the module is a VNDK library, it must be
installed at `/system/${LIB}/vndk` instead of /vendor/${LIB}.
For those modules, need following to set.
vendor_available: true,
vndk: {
enabled: true,
support_system_process: true,
},
`support_system_process` is optional to define.
If it is defined to true, the module is regarded as vndk-sp.
link-type check for VNDK modules is added to make sure that VNDK
modules only link to other VNDK shared libraries or LL-NDKs.
move the ABI checks to VNDK from all of vendor_available.
Bug: 38304436
Test: attempt to compile with BOARD_VNDK_VERSION:=current
Test: Use `vendor_available_vndk: true` for VNDK modules and compile
with BOARD_VNDK_VERSION:=current
Change-Id: I409268e0b7f05a9d01697bf9f9f4726b5aac631f
This was causing us to rerun minibootstrap every build.
Bug: 63720725
Test: m -j nothing; m -j nothing
Change-Id: Iedd18b54d34f3f20580d0522a4a7d9c5f216caaa
Fix mutator registration for tests to allow different tests
in the same package to register different mutators.
Allow tests to track the resulting ModuleBuildParams objects
to use in assertions, and provide helpers for getting them.
For example:
config := android.TestConfig(buildDir)
ctx := android.NewTestContext()
ctx.RegisterModuleType(...)
ctx.MockFileSystem(...)
ctx.ParseBlueprintsFile("Android.bp")
ctx.PrepareBuildActions(config)
ctx.Register()
// Get the Inputs value passed to the javac rule for the foo module
inputs := ctx.ModuleForTests("foo".Rule("javac").Inputs
Test: java_test.go
Change-Id: I10c82967f5f3586d2c176f169906b571ed82fc73
The build now uses a prebuilt javac binary distributed with the
source, checking the host java version is no longer required.
Test: m -j checkbuild
Bug: 62956999
Change-Id: Ieef83481d0e6d68371bbd8a422f870ffe2bbb428
Converting java to use Path objects incorrectly used PathForModuleSrc
for a path that might not exist, use ExistentPathForSource instead.
Test: java_test.go
Change-Id: I50e4e315a10ab08c4e72065094ae29844874f5e4
This was causing android/soong/ui/build to rebuild sometimes when it
didn't need to.
Test: `m -j nothing; grep "B compile" out/.soong_ui.trace` repeatedly
Change-Id: I5d33271a7b037f53674a0d312d8da1746eed8eaa
It will cd to $TOP before running soong_ui itself, so that soong_ui
still runs from the top of the tree. ORIGINAL_PWD is saved so that we
can reference that later (for example, to move 'mma' implementation into
Go).
Test: cd system; ../build/soong/soong_ui.bash
Test: Set absolute / relative OUT_DIR or OUT_DIR_COMMON_BASE and repeat
Change-Id: Icb67a3ee6a3358cca50300755c8953419fc19437
MAKELEVEL and MAKEFLAGS were are both unset by makeparallel when invoked
from Make. In preparation for removing the Make wrapper (and
makeparallel), strip them in soong_ui as well.
Add MFLAGS for completeness.
Test: m -j
Change-Id: I029f9464d11b432e979b32ede360450f4facb038
Make supports specifying all types of variables on the command line
(using =, :=, +=, and other variable references. When running soong_ui
through make/makeparallel these all effectively become environment
variables.
So in preparation to remove the Make wrapper, support a simplified form
of this syntax, roughly equivalent to what the shell supports if
specified before the command (<NAME>=<VALUE>).
Test: m -j blueprint_tools
Change-Id: I08fa2b86710f282e619b0cc324a3e5bbaf62d26e
In preparation to remove Make/makeparallel from soong_ui startup, we
need to preserve compatibility with the different ways that make
supports the -j option.
Nothing changes unless Make/makeparallel is removed from the startup.
Once that is removed, not specifying a -j value will be equivalent to
'-j' instead of '-j1', like Ninja. A value will also be supported when
specifying -k, like Ninja (though specifying it alone will be equivalent
to '-k 0').
Test: m -j blueprint_tools
Change-Id: I9d5d59bedd4f6e5cca76bdb4cd47e0b5b7d523f0
This was breaking SANITIZE_TARGET (and likely others)
Test: SANITIZE_TARGET=address m -j nothing
Test: out/soong/build.ninja is identical before/after
Test: out/soong/Android-aosp_arm64.mk is identical before/after
Change-Id: Ic0d6774025761ec9ae9240c109895ab8032e4784
device_kernel_headers is a built-in heder-only lib that provides device-specific
kernel headers. The header path is configured via a new product variable
SystemIncludeDirs, which is currently the mirror of
TARGET_PROJECT_SYSTEM_INCLUDES in the make world.
Note: generic kernel headers (bionic/libc/kernel) have been added to the
include path by default. "device_kernel_headers" module is for device-specific
kernel headers such as /device/*/*/kernel-headers.
Note 2: this is opt-in for Android.bp modules (i.e. header_libs :
["device_kernel_headers"] required.) while it is always provided to
Android.mk modules.
Bug: 62939405
Test: choosecombo to aosp_sailfish (or any other Pixel/Nexus targets)
BOARD_VNDK_VERSION=current m -j gralloc.msm8996 (or any other vendor
libs using vendor-specific kernel headers)
Change-Id: I81c60abc13942c89fff723d1544b27a81b300db0
Adds the SANITIZE_TARGET=integer_overflow build option to apply signed and
unsigned integer overflow sanitization globally. This implements the
Soong side of the build option.
An additional build option is provided to control whether or not to run
in diagnostics mode, controlled by SANITIZE_TARGET_DIAG. This works the
same way that SANITIZE_TARGET does and currently only supports
'integer_overflow' as an option.
A default sanitizer blacklist is added to avoid applying sanitization
to functions that are likely to exhibit benign overflows.
Bug: 30969751
Test: Building with and without the new flags, device boot-up, tested
various permutations of controlling the new flags from build files.
Change-Id: Ibc8a8615d3132f1a23faaf1cb4861f24c5ef734a