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
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
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
-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
The toc optimization had been disabled for host builds to ensure that
the timestamp of the final binary changed whenever its implementation
changed, in order to support rerunning host tools that were modified
during incremental builds. However, only the final install rule must be
re-run to update the timestamp, and not the link rule.
Update the shared library install dependencies to use normal
dependencies instead of order-only dependencies for host modules, and
then enable the the toc optimization for host modules. If the
implementation of a library changes it will be reinstalled, and
libraries or binaries that depend on it will also be reinstalled.
Also move toc generation to happen on the packed, stripped library,
which is what will be used for linking, to ensure that it is available
at link time when depending only on the toc file.
Bug: 26015464
Test: m -j; touch system/tools/hidl/Annotation.cpp; m -j, verify
out/soong/host/linux-x86/bin/hidl-gen is updated
Change-Id: I8953261d2209376f3dccbf0b1a93f7af4e45c4d0
toc path was including the build directory twice, which breaks builds
with absolute paths to the build directory.
Test: m -j
Bug: 26014946
Change-Id: Ibc0856d1b22a44ec0c297f5dd84a932fde9f20af
This sets up the proper dependencies within Soong by adding the imported
dependencies into GeneratedHeaders, and re-exporting them as necessary.
It also exports them to Make using the new LOCAL_EXPORT_C_INCLUDE_DEPS.
Bug: 31742855
Test: Inspection, build hardware/interfaces (pending)
Change-Id: I6a10ceec377a97966baa9d4876b90fcda391dd01
Strings like cflags in Android.bp files are parsed by blueprint,
written to build.ninja files, parsed by ninja, and then passed to
/bin/sh -c. This had resulted in a combination of blueprint
(\"), ninja ($$), and shell (\$) escaping being necessary.
Update Soong to automatically handle ninja and shell escaping in
cflags and ldflags.
Bug: 31221587
Test: m -j
Change-Id: Ibe087b2788b355b73c3225b5928870619a0a53bc
We prepended Soong's binary installation path to PATH, but now
rebuilding binaries that are in Soong and exported to Make produces
inconsistent results. From an empty out directory:
Run `m -j hidl-gen`, PATH will get a hidl-gen binary in out/host/...
Run `m -j android.hardware.tests.foo@1.0`, PATH will get a new hidl-gen
binary in out/soong/host/...
Make a change to hidl-gen, then run `m -j hidl-gen`. The hidl-gen first
in PATH is still the one without the changes.
Bug: 31742855
Test: m -j hidl-gen showcommands
Change-Id: If01a76d10d786dac6f16f31d1142634af4964228
* changes:
Remove shared lib name checks
Add export_generated_headers
Support multiple outputs for genrule
Parse genrule's cmd property
Expose HostToolPath on the cc module to fix genrule.tool
Now that we're no longer using -l, we don't need to strip off the "lib"
prefix and ".so" suffix. Therefore we don't need to make sure the prefix
and suffix exists.
Bug: 31742855
Test: Attempt to link android.hardware.* (hardware/interfaces/*)
Change-Id: I38555014cdc0e430f94359e173bb09e35d45c44e
Similar to export_shared_library_headers, this will export headers
imported from a gensrcs or genrule.
Bug: 31742855
Test: Add export_generated_headers, ensure it's in out/soong/Android-*.mk
Change-Id: Ieadefd007ece8b249f011a258a9c5b27f5d3f594
-isystem hides all warnings. The warnings in system/core/include have
been cleaned up, so move it from -isystem to -I.
Test: lunch aosp_angler-eng && m -j
Test: lunch aosp_bullhead-eng && m -j
Test: lunch aosp_flounder-eng && m -j
Test: lunch aosp_fugu-eng && m -j
Test: lunch aosp_shamu-eng && m -j
Bug: 31492149
Change-Id: I29967428c2c45f753dabe21b65913fb08fdcabc4
The MinGW update now includes pthread.
Test: update BoringSSL to use pthreads on Windows and compile
Change-Id: Id85d9fd3e03a310e07e0093ca80cefaf10fe8930
Host builds may build binaries that must have ASAN disabled. Convert
host ASAN to use variants. Since there is only one install location for
shared libraries, don't install the non-ASAN variant at all for now.
Test: mmma -j art SANITIZE_HOST=address
Change-Id: Iacefecac93df44823316624b4c540c24f643fb80
Singleton rules need to manually specify Optional: true, or they will be
built for any ninja invocation that has no targets specified.
Test: m -j on tradefed build
Change-Id: Ifc060b25bc32e664c48731eb8a0d963b73574591
Split CommonGlobalSystemIncludes out of CommonGlobalIncludes in
preparation for moving global includes from -isystem to -I.
Bug: 31492149
Change-Id: Ib935ea038cdbf9515dc2ab68d7fff924c370906a
This only applies to shared libraries on the device, and like stripping,
we'll let make do the actual packing if we're embedded in Make.
Change-Id: I1585d74ecfc41e18dcbb5ffb70005adf007cc941
Otherwise this was changing every time, and causing Kati to find
make_vars-*.mk different every time.
Test: with https://android-review.googlesource.com/274439
Change-Id: I731b3b2fd434314bf6e8b7c2ec5310b9623512a5
This was always being set in cc.Module.AndroidMk(), so we don't need to
declare it again. This was causing problems for cc_binary modules that
were using the NDK, since LOCAL_NDK_STL_VARIANT must be used instead.
Test: Manually put ifneq ($(LOCAL_CXX_STL),none); $(error) checks
Change-Id: If937b7b5ad30936e08c99f62ccf83b78d196dbfe
Make gtest property a *bool so it can be overriden by defaults.
Make per-test install directory come after relative_install_path
property.
Change-Id: I2da38965c99c40415a39bf97b706b2d40bb082d6
Remove cc.Customizer, its functionality has been replaced by
android.PropertyCustomizer, and it is not used.
Change-Id: Ice32d554015b0800707bc042b187984f73df7979
Track the primary architecture selected for each class based on the
module's multilib setting and the global config. Fixes building
binaries with multlib set to first and DevicePrefer32BitExecutables set,
and fixes symlinks to binaries with multilib set to prefer32.
Bug: 31452121
Test: mmma -j art HOST_PREFER_32_BIT=true
Change-Id: I75094df42f3273f6d613e4058eaa565957174c28
Allow CustomizeProperties to override the dynamic linker by setting a
DynamicLinker property. Needed by art, which overrides the linker for
device-on-host testing.
Change-Id: Ia4cb5a85b9a995d8138da33eb13543addf3b38cc