For every file which we can run clang-tidy (C/C++ clang-built), we add a
new build node that depends on the object file (since clang-tidy does
not export a depfile), and is depended on by the link step. This is
better than how we're doing it in make, since calling tidy can be turned
on or off without needing to rebuild the object files.
This does not attempt to port WITH_TIDY_ONLY from Make, since the way
that it works is broken (due to the lack of a depfile).
Bug: 32244182
Test: WITH_TIDY=true mmma -j bionic/libc
Test: ./soong (Setting ClangTidy: true)
Change-Id: I40bbb5bb00d292d72bf1c293b93080b5f9f6d8ea
So that we can represent other files that get generated along with the
objects, like the gcno coverage information, and per-file clang-tidy
runs.
Test: Soong's build.ninja identical before/after
Change-Id: I5c553a153c436d5403549f62c73fe79c5f101779
LOCAL_SANITIZE_DIAG works for ubsan, too.
Bug: 22033465
Test: build a test target with cfi and diag { cfi } properties.
Change-Id: I9cd8e8df9b330430b321709d7f05b4da0294e771
Our minimum build version listed on source.android.com is 10.10. Change
the minimum used SDK to 10.10, but keep the deployed version at 10.8 so
that our distributed tools still work on older versions.
CoreBluetooth/CoreBluetooth.h isn't available directly in older SDKs,
but we need to include it in the 10.12 SDK.
Test: `m -j` with 10.11, 10.12 SDKs.
Test: Verified the builders all have at least 10.10 sdk available.
Change-Id: I82321875b8b3a4099ea829ce2d75e1af29cb38c6
.proto files are translated to .pb.cc and .pb.h files, which are then
compiled normally.
Bug: 32286026
Test: mmma -j system/extras/perfprofd
Change-Id: I538071424d667aacf35b4b8bfebe217f5f092726
None of the direct users of compileObjs were using any of its
complexity (generated sources, excluded sources, extra sources). Move
the complexity back in to baseCompiler.compile.
Test: m -j
Change-Id: I2e59d216682c00dd12a1395cf2448827d1c48023
This was causing extra rebuilds for fresh builds. Update with the latest
blueprint changes.
Test: m blueprint_tools, fewer rebuilds
Change-Id: I6b82e9cafa6e84f4089c6f90372bddcd6f85b0ea
Host builds were compiling without -Wl,--no-undefined because of an ASAN
issue. Pass -Wl,--no-undefined for host builds unless sanitzers are
enabled. Also fix LOCAL_ALLOW_UNDEFINED_SYMBOLS on darwin, where
disallowing undefined symbols is the default.
Test: m -j host
Test: m -j SANITIZE_HOST=address host
Bug: 32305815
Change-Id: Ia4bb305a50b1c1048b119f75726d52f82e21438c
This field points to the license file for the headers being shipped.
Test: make ndk && less $SOONG_OUT/ndk/NOTICE
Bug: None
Change-Id: I386f4e6f6d9776f422ffc09b8dab69e1911b08a4
Darwin x86_64 warns with -read_only_relocs:
ld: warning: -read_only_relocs cannot be used with x86_64
Only pass it for darwin x86.
Test: m -j on darwin
Change-Id: I080afb83d777587d14b60c8cd24b59005a275275
This adds the new macOS SDK version to the supported version list.
Surprisingly it simply works like this.
Test: make adb aapt
Change-Id: Ic72cee7345b5f49b6a743c70bd266866a06bc459
Pass -std=c++14 instead of -std=gnu++14 (or whatever the current default
is) when "gnu_extensions: false" is specified in the blueprints files.
Bug: 32159540
Test: builds
Change-Id: If206228a972129d9574bcf50ddff283b7e7d3fd7
Define the default -std values in global.go, export them in makevars.go,
and use them in compiler.go.
Test: builds
Change-Id: Ia2ae01f63e182d0ad7f371e6d32184bff35a8897
Use a temporary directory as the build directory during tests so files
don't get written to the source tree.
Also add a few more tests for prebuilts with no file specified.
Bug: 31800129
Test: m -j, make sure .soong.environment is not written to the source tree
Change-Id: I623bc114b2ff534c8df9fb3ce273e804711f8f05
The prebuilt tests are accidentally writing a .soong.environment file to
the build/soong/android directory, disable them until TestConfig() is
fixed to prevent writing to the source tree.
Bug: 31800129
Test: m -j, make sure .soong.environment is not written to the source tree
Change-Id: I3b7d47e42111ecababe275b7a9ff0d08bcebfc7a
Support prebuilt shared libraries as an initial proof-of-concept of
prebuilts. Future changes will support binaries and static libraries,
and the ability to select which to use based on something besides
blueprint properties.
Test: TestPrebuilts run during m -j
Change-Id: I6e84da667e9005ae11844bad01d25cbe4ced1ce3
Mutators are registered into a global variable, and then into the
context when it is created. Only call registerMutators once so that the
same mutator is not listed multiple times in the global variable when
multiple contexts are created.
Test: go test -v android/soong/android
Change-Id: Ie9e3ed09a89b848462b898476cdfb81a90c64bd3
This matters for C files that are also built for Windows. Previously they'd
be compiled with -std=gnu99 for the host but [effectively] -std=gnu89 for
Windows.
Bug: http://b/32019064
Test: builds, and can build libcrypto_utils without a manual -std= line
Change-Id: I9c5cc7832220b5c3d6a007ff10d076e26fd8c75d
Blueprint is going to abdicate responsibility for determining the name
of a module. Add a name property, and a method to retreive the name.
Test: build.ninja identical
Change-Id: I09c6f5283cd6e28ad4b04c24c5ab8b00f71ae2ab
Register mutators inside lambdas that are called in a defined order to
correctly order mutators before and after the arch and deps mutators.
Test: build.ninja identical
Change-Id: Iefe2a3515aee8570e76a6e76925db4cda0e9e822
Mutator registration is tightly coupled with the android package, move
all registration from the soong package to the android package.
Test: build.ninja identical
Change-Id: Ie183d0b52cc7431c9e05b231934d189208ef1efe
-isystem hides all warnings. The warnings in hardware/libhardware/include
have been cleaned up, so move it from -isystem to -I.
Test: m -j
Bug: 32018017
Change-Id: I9a602d5e1bd021638d3a92d93af3d2a18ab4caa7
-isystem hides all warnings. The warnings in system/media/audio/include
have been cleaned up, so move it from -isystem to -I.
Test: m -j
Bug: 31997134
Change-Id: I1c0b68935d643992dd9fc7f76583bed286e49325
Using new .KATI_READONLY extension.
Test: build/tooks/kati_all_products.sh on AOSP master and internal
Change-Id: I71794c1268456c3403a351c1b242f1e78b060355
-isystem hides all warnings. The warnings in frameworks/native/include
have been cleaned up, so move it from -isystem to -I.
Test: m -j checkbuild
Bug: 31752268
Change-Id: Ie3656348b5b2a1828dec790aa047635ac0fe6d86
The google-benchmark library is disabled on Darwin, so we cannot create
host benchmarks. Instead of having every user specify this, put the
logic in Soong. Then if we decide to support it later, it's an easier
switch.
Test: build.ninja identical before/after on Linux
Test: Ignores failing cc_benchmark_host on Darwin
Change-Id: I61f3a571fd160d8e479a512992bc68601f1c9b28