Treble genererated project name feature character no accepted by
CMake. So far only @ is a problem.
Change-Id: Iac460033f1181f46ab8205e5706271f99ab798d3
For some library, the order of includes is important. e.g: library
can include "system/window.h". Dependending on the dependency order
this could mean libs/nativewindow/include/system/window.h or
system/core/include/system/window.h
This patch changes search path storage from map to array in order
to preserve order the order in which they were received from
soong.
Change-Id: I8ef788633985f4ed04ec3432686eb1427f73d600
Test: Manual
* changes:
Add support for binary and static library and prebuilts
Rename to cc_prebuilts_library_shared
Fix installing prebuilts with no source module
Add cc_prebuilt_library_static and cc_prebuilt_binary module types.
Bug: 35576244
Test: Add cc_prebuilt_library_static and cc_prebuilt_binary modules
and verify they are used
Change-Id: I708ec7b1ed1a0eddae083159575ae04d5ea25a37
Rename cc_prebuilts_shared_library to cc_prebuilts_library_shared
to match cc_library_shared.
Test: builds
Change-Id: I2f48263c3a0830a99ace4e2374de4a702d48c2e4
This reverts commit 4c48f724e1. It's
causing test failures, warnings and complaints, so backing it out and
we'll resolve those before putting it back in.
Bug: 33681361
Test: m -j
Calling android.NewContext() in tests results in a context that
contains all the mutators, module types, and singletons, which
causes unexpected interactions in unit tests. Create an empty
context instead, and add in only the necessary mutators, module
types, and singletons.
Bug: 36366816
Test: soong tests
Change-Id: Ic61262c37e3436b3ad4ccaca18b737021c304be6
CFI enabled components need ar to use the gold linker. This CL adds
that.
Bug: 36290748
Test: Enabling CFI for a Soong component builds without error.
Change-Id: Icbf78fa1ca0d845350516b4dd345b54fbb7ef847
Adds the ability to set custom flags for ar in Soong, similar to how
they can currently be set for make.
Bug: 36290748
Test: sanitize.go is able to correct set custom ar flags for CFI. CFI
enabled Soong components build and boot without issue.
Change-Id: I3212793aa84ba51df910c184d8bb376b3650376e
This adds a toolchain definition for LinuxBionic that only supports
Clang/64-bit. It pulls pieces from the x86_linux_host and x86_64_device
configs, and uses the android clang triple, with some manual overrides.
To enable building this, set your soong.config file to:
{"Host_bionic": true}
Bug: 31559095
Test: out/soong/{Android,make-vars}-aosp_arm64.mk the same with or
without host bionic turned on
Test: No change to out/soong/build.ninja before/after this change
Change-Id: Id97dda8bd9aa670c32aed31fbe6aaa8175e70b59
This breaks when I enable a second host configuration for host bionic.
Make non-arch modules !Device and !Host by adding "Generic" as the zero
value. Make the SkipDeviceInstall config only apply to Device modules.
Test: out/soong/build.ninja is identical expect for comments
Change-Id: I6e2bd3814a9968554d3901a508d822d5c79d08a0
Shared libraries are now installed to different directories depending on
their types.
* NDK libraries: /system/lib/ndk
* VNDK libraries: /system/lib/vndk
* VNDK-ext libraries: /system/lib/vndk-ext
* Framework-only libraries: /system/lib
* Vendor-only libraries: /vendor/lib
* Same-process HALs: /vendor/lib/sameprocess
In addition, a new module type vndk_ext_library is added. It is almost
identical to cc_shared_library but it introduces another attribute
'extends'. This is use to reference the vndk library that this vndk-ext
library is extending.
For example, in order to extend a vndk library libFoo:
cc_library {
name: "libFoo",
srcs: [...]
}
---------------------
vndk_ext_library {
name: "libFoo-extended",
srcs: [...]
extends: "libFoo"
}
Then, libFoo will be installed as /system/lib/vndk/libFoo.so and
libFoo-extended will be installed as /system/lib/vndk-ext/libFoo.so.
Note that file name of the latter is libFoo.so, not libFoo-extended.so:
file name of an extending module is automatically set to that of the
extended module.
Bug: 33681361
Test: build & run. Libraries must be in the correct directories.
Change-Id: Ia1eb3940605d582a252c78da0f3a5b36fdab062b
Instead of whatever happens to be in PATH.
Test: port install gcc5; attempt to build host binaries
Change-Id: If4af32596edd6fd3e459c3d574ab0ff495f236ff
Prototypes in the bionic headers are annotated with `__INTRODUCED_IN`
tags that are processed by bionic/tools/versioner into their usable
form (tags replaced with `#if __ANDROID_API__ >= foo` guards). We've
previously done this as a periodic manual step with the results
checked in to prebuilts/ndk, but that's been a huge hassle for me.
Make the tool a part of the build instead.
Test: make checkbuild
Bug: http://b/35673791
Change-Id: I2f5c1aeae239ac4ab6616eb5c71360e3055f86d5
And support the reverse translation in androidmk.
Test: Use a cc_library_headers using LOCAL_HEADER_LIBRARIES in make
Test: androidmk with LOCAL_HEADER_LIBRARIES
Test: androidmk with soong's Android-*.mk file for BUILD_HEADER_LIBRARIES
Change-Id: I17adedb62151f62e67e2168b09ad87f1d5648df6
Header libraries were building an empty .a file but setting
LOCAL_MODULE_CLASS := SHARED_LIBRARIES. Make the static and shared
checks in libraryDecorator.AndroidMk explicit.
Bug: 35228396
Test: builds, examine out/soong/Android-${TARGET_PRODUCT}.mk
Change-Id: I5653ae92bb41d440d8c3ff4b6d509be188feb961
Adds the -fsanitize-blacklist option for CFI, using the built in
blacklist at external/compiler-rt/lib/cfi/cfi_blacklist.txt.
Also refactors the CFI cflags and ldflags into cc/makevars.go to
ensure they're consistent across Soong and make projects.
Bug: 30227045
Test: ENABLE_CFI=true m -j40 builds and boots.
Test: The blacklist prevents runtime errors that otherwise occur.
Change-Id: I91c5420478e7290061d89338a86abdef69c67fe2
library.static() was being used to determine if a library was static,
shared, or header only, which resulted in header only libraries
behaving like shared libraries, when they should be treated as static
libraries with no sources. Explicitly use library.static(),
library.shared(), and library.header() instead.
Bug: 35228396
Test: builds, manually examine changes to build.ninja and Android.mk
Change-Id: I51729992cc6338deda1396b86f12bc9f73e674d8
This is configured the same as make -- a global NATIVE_COVERAGE=true
flag to allow native coverage, then COVERAGE_PATHS=path1,path2,... to
turn it on for certain paths.
There are .gcnodir files exported to Make and saved in $OUT/coverage/...
files which are `ar` archives containing all of the compiler-produced
.gcno files for a particular executable / shared library.
Unlike the Make implementation, this only passes links the helper
library (automatically through --coverage) when one of the object files
or static libraries being used actually has coverage enabled.
Host support is currently disabled, since we set -nodefaultlibs, which
prevents libclang_rt.profile-*.a from being picked up automatically.
Bug: 32749731
Test: NATIVE_COVERAGE=true COVERAGE_PATHS=system/core/libcutils m -j libbacktrace libutils tombstoned
$OUT/coverage/system/lib*/libcutils.gcnodir looks correct (self)
$OUT/coverage/system/lib*/libbacktrace.gcnodir looks correct (static)
$OUT/coverage/system/lib*/libutils.gcnodir doesn't exist (shared)
$OUT/coverage/system/bin/tombstoned.gcnodir looks correct (executable)
Test: NATIVE_COVERAGE=true COVERAGE_PATHS=external/libcxxabi m -j libc++
Confirm that $OUT/coverage/system/lib*/libc++.gcnodir looks correct (whole_static_libs)
Change-Id: I48aaa0ba8d76e50e9c2d1151421c0c6dc8ed79a9
This CL disables CFI for 32-bit ARM processes, which is broken due to
a compiler error in the most recent version of clang.
Bug: 35157333
Test: ENABLE_CFI=true m -j40 does not enable CFI for 32-bit processes
Change-Id: I52ccf60d91ff1a2af4cf024376b7d70f87040674
The "required" field within "phony" module in .bp file has to be
non-empty. And "phony" module doesn't contain any "src" files.
Bug: b/32981153
Test: make -j out/soong/build.ninja
Change-Id: Iaa2009467c44702572b97ca9cbd02c1d368c8d83
Mips toolchain does not have ld.gold.
ARM change is a workaround for LLVM r290384.
Bug: 33678192
Test: make ENABLE_CFI=1
Change-Id: I189ffd42760f0ea8d151717337b9355b37cb207b
Allow tests to specify a data property that lists files or filegroup
modules that will be packaged alongside the test. Also add a path
property to filegroup modules to allow shifting the path of the
packaged files, and add ExpandSourcesSubDir to expand the filegroup
sources while including a shifted relative path in the Paths objects.
Test: soong tests, manually adding data to a module
Change-Id: I52a48942660e12755d313ef13279313361b4fc35
-pie triggers a bug in glibc's linker when used with goma
(https://sourceware.org/bugzilla/show_bug.cgi?id=16381). Allow
the clang build to disable -pie for host modules through the
DISABLE_HOST_PIE environment variable so it can produce a toolchain
that works with goma.
Bug: 15814177
Bug: 34722791
Change-Id: Ic664a1b821aaeaf2bde14b0afa1a1975e31300cb
The linker uses libc++_static but needs to avoid the libc.a
dependency. It does this by setting `stl: "none"` and manually
linking libc++. This behavior matches make.
A better approach would probably be to generalize system_shared_libs
to system_libs and apply those to static executables the same way we
do for dynamic ones, but that's a patch for another day.
Test: make checkbuild
Bug: http://b/34740564
Change-Id: Ie9da0d49a453a220593e8ec2ee721e9af9378007