Adds Soong support for -fsanitze-minimal-runtime when using
the integer overflow sanitizers. This makes the crashes due to these
sanitizers less mysterious.
Bug: 64091660
Test: Compiled and checked the generated compiler commands
Test: Checked program that overflows for the abort reason
Change-Id: Ieeceaf6c35c8371592952d3b8b977aefc11601c5
Bug: http://b/73127367
Bug: http://b/68659946
These new prebuilts have fixes for the bugs mentioned above.
Test: Build and verify that issues in both bugs above are fixed.
Change-Id: I410a43b70920d509118f8e6fdb012ef6b078d657
Merged-In: I410a43b70920d509118f8e6fdb012ef6b078d657
(cherry picked from commit 4a825ee14a)
Bug: http://b/73127367
Bug: http://b/68659946
These new prebuilts have fixes for the bugs mentioned above.
Test: Build and verify that issues in both bugs above are fixed.
Change-Id: I410a43b70920d509118f8e6fdb012ef6b078d657
We can simply revert this patch to work on these warnings independently.
Bug: http://b/72331526
Bug: http://b/72331524
Bug: http://b/72330874
Test: Build
Change-Id: I9cec51578a1c6de33fb6f832c758b9916c61b735
This architecture only existed for unbundled use, but even the NDK is
removing support in their r17 release, so just remove support for it.
Test: build/soong/build_test.bash -only-soong
Change-Id: I4bd23babf567128d2d242cbdee3311abb198dd7c
This just copies most of what exists for clang on Linux, but doesn't
actually turn on clang support.
Bug: 69933068
Test: m nothing; compare ninja files
Change-Id: I2cf203026e7ced32004a91d7f3baf4a6415085eb
Wrap blueprint.PackageContext so that the *Func methods can provide
an android.Config instead of an interface{}. The modified signatures
means that every method in ModuleContext and SingletonContext
that takes a blueprint.PackageContext now needs to be wrapped to
take an android.PackageContext.
SingletonContext wasn't previously wrapped at all, but as long
as it is, wrap everything like ModuleContext does. This requires
updating every Singleton to use the android-specific methods.
Test: builds, all Soong tests pass
Change-Id: I4f22085ebca7def6c5cde49e8210b59d994ba625
Bug: http://b/69481735
While Clang supports -mcpu=kryo, the GNU assembler doesn't. Use
Cortex-a53 instead, which is close to Kryo. The current alternative of
using Krait causes problems when also using armv8, which is not
available in Krait.
Test: Build marlin with internal CL 3248394 cherry-picked.
Change-Id: I571739e6ab4f1b37fafb304ecad2865c9394e04f
* When -Wno-error and -Werror are not used:
add -Wall to the front of cflags
if the project is in the WarningAllowedProjects,
otherwise add -Wall -Werror.
* Add -Wall -Werror to ndk_library build targets.
* Collect names of modules with -Wno-error or without -Werror,
and pass them to makefile variables:
SOONG_MODULES_USING_WNO_ERROR
SOONG_MODULES_ADDED_WERROR
SOONG_MODULES_ADDED_WALL
* Generate ANDROID_WARNING_ALLOWED_PROJECTS for old makefiles.
Bug: 66996870
Test: normal build
Change-Id: I31385e12b80ca946c7395a5a184ef259b029aac6
This reverts commit 20823f95e6.
Reason for revert: caused a minor performance regression in some benchmarks.
Bug: 69470341
Test: builds
Change-Id: I1a852b5d7a2aa1d08ecb54617898f814cddd7600
-fomit-frame-pointer was only being set for arm and mips. Since
we always use unwind tables and not frame pointers to unwind, and
since ART generated code does not use frame pointers, just turn
off frame pointers everywhere to gain an extra register.
Bug: 68951394
Test: m checkbuild
Change-Id: I9237d486a0c0215cdafd96d66712082df0eba785
These flags were added for gcc, but are always stripped out when
compiling for clang. Since gcc is barely used, removed them.
Bug: 68855788
Bug: 68947919
Test: m checkbuild
Change-Id: Iae2bda9808dd9499848ce145ccdf71c4c490b80e
Move -fdata-sections and -fno-short-enums to global device flags.
-fdata-sections was not previously set on x86[_64], -fno-short-enums
was not previously set on mips[64].
Bug: 68855788
Test: m checkbuild
Change-Id: I68e64888d5414fc022366eb2b6c5cd92c28a5542
It was previously set on arm[64] and mips[64], this will cause it
to be set for x86[_64] too.
Bug: 68855788
Test: m checkbuild
Change-Id: I75af16e7d259963ad633cc664929144332bb435d
Bug: http://b/68236396
This warning only needs to be enabled for frameworks/base/core/jni.
Test: Build the topic
Change-Id: I9f6aab2045f135d691696f9fd461c895a5aadb38
When the following lines are specified in the BoardConfig.mk
TARGET_2ND_ARCH_VARIANT := armv8-a
TARGET_2ND_CPU_VARIANT := generic
The resulted binaries won't be built using 32-bit armv8-a integer
division instructions. Instead, division routines are used because
the build system will set a compiler option "-march=armv7-a", and
hence overwiting the previous "-march=armv8-a", when
TARGET_2ND_CPU_VARIANT is set to generic (or unset).
Bug: 67446726
Test: lunch aosp_arm64; make -j; emulator # boot to home screen
Also verify -march=armv7-a is not specified in the compiler
command line and the resulted binary actually uses integer
division instructions.
Change-Id: I430687aa5a658d2ec9f325a66d849b4c8898c7d5
-fno-canonical-system-headers is required for gcc to use relative
paths to system headers in deps files, and is stripped out for
clang. Move it to the global flags so it affects windows gcc builds.
Bug: 68719465
Test: m checkbuild
Test: prebuilts/build-tools/linux-x86/bin/ninja -f out/combined-${TARGET_PRODUCT}.ninja -t deps | grep -E '^[[:space:]]*/' | sort | uniq
Change-Id: Ia9befd7cf8cfd714241e636fb786c319aecc79fe
-fomit-frame-pointer was specified twice, once for arm and once for
thumb. Move it to the shared cflags.
Bug: 68855788
Test: m checkbuild
Change-Id: Iab1299c247808f1a2542b468084600b7c32996e8
Move ldflags that are specified for all devices into
deviceGlobalLdflags, and add them to linker.go:
-Wl,-z,noexecstack
-Wl,-z,relro
-Wl,-z,now
-Wl,--build-id=md5
-Wl,--warn-shared-textrel
-Wl,--fatal-warnings
-Wl,--no-undefined-version
Bug: 68855788
Test: m checkbuild
Change-Id: I82561b4189287d7638006f9e298c5151f9930c5e
-Wl,--gc-sections is already added by library.go and binary.go for
anything that uses bionic.
Bug: 68855788
Test: m checkbuild
Change-Id: I229199045ef8595d69c07fcf1aa6bbdc0b753fe3
Move cflags that are set on all devices to deviceGlobalCflags:
-fno-canonical-system-headers
-ffunction-sections
-funwind-tables
-fstack-protector-strong
-Wa,--noexecstack
-D_FORTIFY_SOURCE=2
-Wstrict-aliasing=2
-Werror=format-security
Bug: 68855788
Test: m checkbuild
Change-Id: Iefec689fdd2749013d0cc003b3abec674a85fb74
Move all the flags that are used everywhere (or should be used
everywhere) into cc/config/global.go:
-no-canonical-prefixes
-fno-exceptions
-Wno-multichar
-O2
-g
-fno-strict-aliasing
Also remove flags that are already in noOverrideGlobalCflags:
-Werror=pointer-to-int-cast
-Werror=int-to-pointer-cast
x86 and x86_64 were specifying -fstrict-aliasing, but that was
being overriden later by -fno-strict-aliasing, so remove it.
ARM devices still override -fno-strict-aliasing to -fstrict-aliasing
when using ARM (vs. Thumb) instruction set.
Bug: 68855788
Test: m checkbuild
Change-Id: Ia2b5891bdefb60f974ad92b4b84a8548c2dcc7dc
This reverts commit 33c252c2f1.
I have a fix to the crashes that this CL set was causing, and have
uploaded it as a patchset to this revert.
This also contains a partial fix that was initially submitted
separately as
https://android-review.googlesource.com/#/c/platform/build/soong/+/524295/
Bug: 30227045
Test: ./art/test/testrunner/run_build_test_target.py -j110 art-asan #no
build errors
Test: m -j50 ASAN_OPTIONS=detect_leaks=0 SANITIZE_HOST=address # no
build errors
Change-Id: I3e53549fa03413d35d9a952f04de1e7629e1f06d
This reverts commit d4b484b070.
Rationale: second in group of commits that left aosp_x86_64 not
building. (See https://android-build.googleplex.com/builds/
submitted/4426589/aosp_x86_64-eng/latest/logs/build_error.log)
Bug: 30227045
Test: builds
Change-Id: I38ab5284c614d6ee68e7359219bd75c7d50131be
This CL makes multiples changes in preparation for platform-wide CFI.
(a) Adds a second -version-script=... to the command line
when building components that use a version script. This ensures that
__cfi_check is also exported, and allows CFI to be enabled for these
components.
(b) Adds both topdown and bottom up mutators for CFI to help propagate
dependencies correctly for components that may need CFI disabled.
(c) Fixes an issue with the mutators to correctly apply settings to
both generated variants
(d) Fixes issues when components have more than a single visibility
flag.
Bug: 30227045
Test: SANITIZE_TARGET=cfi m -j40 # dependencies are correctly built
# with/without CFI
Change-Id: I44793cc03bcbcdaa957cc49c7240b87d7c9db327
LLVM r275480 does not recognize flto flags, suppress the option in clang
libTooling tools for now.
Bug: 62839002
Test: mma
Change-Id: Ia9d80b46320e551a93dbff780405d8ff8ad73f35
Leave '__unix' and '__unix__' defined on mips/mips64, like arm.
This is needed to avoid a warning in external/libcxx project.
Test: successful build and boot aosp_mips-eng
Test: successful build and boot aosp_mips64-eng
Change-Id: I8f0e17bdbeffd5078c19aa7506564b8e79a9c945
include_deprecated -> include_jni
include_jni only includes jni.h. Other dependencies which
are provided as part of libnativehelper can be included
by using libnativehelper or by using them with in their
proper location (e.x. nativehelper/JNIHelp.h).
Bug: 63762847
Test: modules find their headers
Change-Id: I8674d2feed08bd80c1fc7b54e3ee38b9ee3484b2
Bug: http://b/65598278
The profile runtime depends on libgcc for some symbols (only under some
circumstances - armv5, ndk r14, static executables). Since Android
build passes -nostdlib and adds libgcc manually, the profile runtime
gets passed to the linker later than libgcc.
Instead, explicitly add the profile runtime to the linker command (and
pass one other flag added by the clang driver to the link).
Test: Build a library with profile instrumentation that otherwise fails
instrumented build.
Change-Id: I24b34cebd2c3bb6a540f8f4c465ace1be4eb90f3
Signed-off-by: Pirama Arumuga Nainar <pirama@google.com>
Move these flags from the normal flags to the toolchain flags, since we
want them to always apply.
Test: Add #ifdef __ANDROID__ to crtbegin.c, check to see if it's set for host bionic
Change-Id: I382dd229e3e4a889bc916f6f8e1248c7debb8fad
We've only got one user of this currently, but since it needs the
location of the toolchain, and different flags based on 32 vs 64-bit,
it's easier just to add support than to get this into a genrule.
Test: Convert external/mdnsresponder to Soong, build
Change-Id: I6c19a82bc14f6ab556f6cc5f37164862ba5f9083
This reverts commit 80b27e4e20.
Fixed CTS build issue by adding -march=armv7-a in cts/tests/tests/os/jni/Android.mk since the library built here needs/uses instruction (swp) obsolete in ARMv8.
Bug: 64964151
Test: lunch aosp_arm64-userdebug; make -j cts
lunch aosp_x86-userdebug; make -j cts
lunch aosp_sailfish-userdebug; make -j cts
lunch aosp_bullhead-userdebug; make -j cts
Change-Id: I6ccafce043e101c769ad370a81ffa0eb62719b5e
Add armv8-a as a valid/supported 32-bit arm architecture variant. If
some known armv8-a core, like cortex-a53, cortex-a73, etc. is specified
as TARGET(_2ND)_CPU_VARIANT, the associated TARGET(_2ND)_ARCH_VARIANT
will be treated as if armv8-a is specified.
Bug: 62895439
Test: "bionic-unit-tests-static --gtest_filter=*strlen*" on Nexus 4
(armv7-krait), emulator (armv7), and sailfish (armv8-kryo).
The test binary for the first 2 is built with armv7-a as its
TARGET_ARCH_VARIANT; The test binary for the last is built with
armv8-a as its TARGET_2ND_ARCH_VARIANT.
TARGET(_2ND)_CPU_VARIANTs of both binaries are set to "generic".
Change-Id: I53bee2974346cf485b2da54cf7aad010b0425910
Enabling the lto property for a module builds that module and all static
dependencies with LTO.
LTO (link-time optimization) allows the compiler to optimize and
generate code for the entire module at link time, rather than
per-compilation unit. LTO is required for Clang CFI and other
whole-program optimization techniques. LTO also allows cross-compilation
unit optimizations that should result in faster and smaller code, at the
expense of additional compilation time.
Test: make -j12 libc with lto: true for libc
Change-Id: Ib8baefedf60e02701d44673a7c473e0845730101
Gold recognizes a different set of emulation strings to specify targets
than the bfd linker accepts. Clang only passes bfd emulations to the
linker, so we need to override these with the versions accepted by gold
when using gold.
Gold normally picks up the correct target from the first ELF input file
if it cannot parse the emulation parameter. However when using LTO, all
objects may be bitcode files, which causes gold to rely on the passed
--oformat or -m parameter to determine the proper target. If gold cannot
parse the emulation string passed by clang, it fails to link.
Test: build LTO version of libc
Change-Id: I38e78bb912fd3cc5fb7b4a762284f50ddd4f3998
LL-NDK, VNDK-core, VNDK-SP libraries are exported to make as
SOONG_LLNDK_LIBRARIES, SOONG_VNDK_CORE_LIBRARIES, and
SOONG_VNDK_SAMEPROCESS_LIBRARIES. This can be used to auto-generate
ld.config.txt from a template.
Bug: 64013660
Test: BOARD_VNDK_VERSION=current m -j successful
Test: check out/soong/make_vars*.mk and look for SOONG_*_LIBRARIES
Merged-In: I0f4c5d05d9cd28c3fc9fdcca6ce0e6eaeaacbe8d
Change-Id: I0f4c5d05d9cd28c3fc9fdcca6ce0e6eaeaacbe8d
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
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
With the latest Clang we do not have issue with beqc instruction,
so allow generation of compact branches for mips.
This reverts commit 3d6a38d601.
Change-Id: I6dbb5d1fce08bd714cc9a0318d50de5765cff038
Add a list of flags which are not understood by clang LibTooling tools
and filter them out of the Cflags the tools are invoked with.
Test: In frameworks/av, make libmedia vendor_available (this invokes
header-abi-dumper on this module), mm -j64.
Bug: 62447349
Change-Id: I46f017212b89f4331145c999103d0ed44da0abaf
* Cortex-A15 supports VFPv4 instructions
Test: make otapackage
Test: Built angler with 32 bit variant set to cortex-a15.
Test: Boot this version of the angler, ran bionic unit tests.
Change-Id: I94f00c9486ece201aa2c230308b9f90b0209dc4a
This reverts commit 4068a5db6c.
Now the Mac xcode-select and xcrun goes through Config.HostSystemTool,
which will grab $PATH through Config.Getenv
Test: m -j (on mac)
Change-Id: I2632c4fdb2ec961e59944cf02ff165e0fd3c869d
Also, update flags for cortex-a53.
Bug: 37647380
Test: Built target with cortex-a73 for both 32 bit/64 bit.
Test: Built target with cortex-a53.cortex-a57 for both 32 bit/64 bit.
Test: Ran bionic unit tests, ran art target tests.
(cherry picked from commit 1d9aa26d44)
Change-Id: I3325f60add7f424f8cca53c22919fc481ef5e787
Moving the last users of a sanitizer runtime library to soong was
causing the runtime library to stop getting installed. Declare
the dependency so make keeps installing it.
Test: builds
Change-Id: Ieeb9ad5c04ac8df0d1a74239da393dac5cab2b03
Remove -Wa,-mmxu option because clang doesn't support it.
Test: successful build of mips32r2-fp-xburst arch variant
Change-Id: I0c3da5dee0bb3acb44e75991b4763b061acc86e1
Remove the last -isystem for global include directory (besides
bionic).
Bug: 31751828
Test: builds
Change-Id: I8f38332de8f0cffd5c56b9b5ebeacbaaf3a4faea
Merged-In: I8f38332de8f0cffd5c56b9b5ebeacbaaf3a4faea
(cherry picked from commit d13a457a45)
References to an MSA architecture feature were added in
I3cadc29434dbd5fdb3aa780198414e90f9572ec5, but never added
to the build system.
Test: builds
Change-Id: I178813824a21475e013f7e8209d9473466ab821c
Add -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS to clang extra cppflags
to make libcxx always emit thread safety annotations. Note that this
won't generate additional warnings on projects that don't already use
-Wthread-safety.
Test: treehugger
Change-Id: I517a96571d77be119510c981bc2cbaddb41dee95
Current modules must use armv7_a_neon to specify source files that
compile only with neon. If a future arch variant also supports neon,
all these modules will fall back to non-neon. Support a neon arch
feature that modules can use instead. Similarly, support dspr2 for
mips.
arm_device.go was also mixing armv7-a-neon with armv7_a_neon. Use
armv7-a-neon consistently, and fix the - to _ when creating the
property structs.
Test: m -j checkbuild
Change-Id: I24d3764280ab3bcbb9a73c0934edc9b99fc7f6a0
Clang now generates a SHF_MERGE section that is rejected by GNU as on
Mips64. Change to use integrated assembler for Mips and Mips64.
Bug: 37423073
Test: external/clang/build.py
Change-Id: I8eae5cf370b930119eb6892db960f5f70777312f
* GCC and Clang both support this, so we may as well simplify
the logic.
Test: make otapackage
Test: verified that the options are exactly the same, just slightly different order.
Change-Id: I8c2e9f3875cb662db708c799c9ce54f9fdd55981
Instead of using the NDK headers and libraries, add LL-NDK specific
headers and library stubs for VNDK users. This allows us to provide an
expanded liblog interface.
Test: aosp_arm; m -j
Test: Enable BOARD_VNDK_VERSION on aosp_arm; m -j
Test: Inspect out/soong/build.ninja before/after (w/o vndk)
Change-Id: Ic85f07fa10c695b5baab10c41f5e0ad38700bf3d
Clang supports specific CPU targeting and optimization
for Kryo.
This switches us to using the specific Kryo targeting
when Clang is used. For other compilers, we fallback
to cortex-a57 targeting.
Also, move the replaceFirst function to a shared location.
Bug: 36728278
Test: Built and booted sailfish, ran bionic unit tests and art tests.
Test: Disassembled libc.so before this change and after and looked at
Test: the differences. Mostly the results were the order of instructions
Test: changing.
Test: Verified with the clang person (srhines) that our clang has this support
Test: and that it appears to be mostly instruction scheduling changes.
Change-Id: I4ee73d8bcc1e4f5eccb162c18937811fe199b16f
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
* Use mcpu=cortex-a57, since it is the closest to Kryo.
* Clang doesn't support Kryo as a target yet.
Bug: 36728278
Test: Built and booted a sailfish using Kryo.
Change-Id: Ic0c9588d86fba41896e50e3f0cf0d2b310ffee93
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
* Kryo is closer to Krait than to cortex-a53, so choose Krait defaults.
* Made together with Jake Weinstein (xboxfanj)
Bug: 36728278
Test: Built and boot sailfish set up as kryo.
Change-Id: I04fa0a1dca6f97ae19202d28ee3ce8a59bf169b5
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
As of the latest clang python wrapper, clang is being executed with an
absolute path. That means that clang-provided headers are written with
absolute paths in the debug info, making the builds non-reproducible
(especially with ccache).
So keep our current PWD=/proc/self/pwd -fdebug-prefix-map=/proc/self/cwd=,
but add a new -fdebug-prefix-map=$PWD/= to rewrite these absolute paths.
Bug: 36463318
Test: m -j libc adb; grep for path names
Test: spot check objdump -W before/after, see only expected diffs.
Change-Id: Ic2cdfca051d3c38b753fd5c1fcbeaca8bafc29ae
TSAN_RUNTIME_LIBRARY is used by external/clang/Android.mk to get the
name of the per-arch TSAN runtime. This CL also factors-out common code
out of functions that construct names of the sanitizer libraries.
Test: python external/clang/build.py with all CLs in this topic
Change-Id: Ie5fac242c0d5a9296ab8936db927a4c934061aa4
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
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
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
-isystem hides all warnings. The warnings in
frameworks/native/opengl/include have been fixed, move it from
-isystem to -I.
Test: m -j native
Bug: 31751828
Change-Id: If182ab5664e22f0cfd5be8cb1d0309d07dc85ceb
Export a list of libraries in the VNDK, which is currently empty.
Take in Make's global BOARD_VNDK_VERSION, and use that as the SDK
version for modules that specify use_vndk: true.
Modules that use the vndk have some configuration as if they were
building against the NDK (the absence of globally defined headers), but
in other cases look like platform modules (using the platform libc++,
for now).
This change does not attempt to enforce any linking constraints, that
will come in a later patch.
Test: out/soong/build.ninja doesn't change
Change-Id: I3be206b67015ac5177b7eef4a451c579e3dc903f
Add AppKit, Foundation and Security to darwin for libchrome.
Add -lm and -lversion to windows for llvm.
Test: m -j libLLVMObject
Change-Id: Ie5c922d3fbb41fba1de5f1ce9e530683bf411c5a
Bug: http://b/31532493
As I have been updating to LLVM ~4.0, there are numerous locations where
3.8 is hard-coded, and unable to be overridden. This change adds a new
function for getting the ClangShortVersion(), which can look at
environment variables that override this value (particularly useful for
two-stage compilation, where version numbers change between builds).
Change-Id: Iaec19908cf47b3b2317844d6e1329f7bcd81f022
Move some cc ctx.Host() / ctx.Device() checks over to using
ctx.toolchain().Bionic(). There will be more changes, these are just the
obvious ones dealing with host_ldlibs / crt / system libraries.
Bug: 31559095
Test: out/soong/build.ninja is identical
Change-Id: Ibba60483b4ab0e01f6996eb7d883120e4acc1830
-isystem hides all warnings. There were no warnings in
hardware/libhardware_legacy/include, hardware/ril/include, or
libnativehelper/include, move them from -isystem to -I.
Test: m -j native
Bug: 31751828
Change-Id: I64cf08b6f6a7f2cfbb19f7d3cc2d2cc9f0157a38
This matches what Make did.
Bug: 32244182
Test: WITH_TIDY=1 m -j
Test: WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=* m -j
Test: WITH_TIDY=1 DEFAULT_EXTERNAL_VENDOR_TIDY_CHECKS=* m -j
Change-Id: I12ee413829d35e20f21f8ca49bb315ea831a6506
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
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
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
Define the default -std values in global.go, export them in makevars.go,
and use them in compiler.go.
Test: builds
Change-Id: Ia2ae01f63e182d0ad7f371e6d32184bff35a8897
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
-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
-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
Split CommonGlobalSystemIncludes out of CommonGlobalIncludes in
preparation for moving global includes from -isystem to -I.
Bug: 31492149
Change-Id: Ib935ea038cdbf9515dc2ab68d7fff924c370906a
Bug: http://b/31317834
Clang generates invalid beqc compact branch instruction. Disable
compact branch generation until clang is updated to include r278824,
which fixes the issue.
Error:
/tmp/backtrace_test-6a4a4f.s:6603: Error: invalid operands
`beqc $zero,$1,$BB31_ 6' clang++.real: error: assembler command
failed with exit code 1 (use -v to see in vocation)
Test for mips and mips64: cd system/core/libbacktrace && mma
Change-Id: I0b0f189e126621dbadb317ba711993e45004348d
Bug: http://b/30421084
Change-Id: I8b65669ef9f60f85202295de117d3806d3a5b1f6
Test: Tested build, boot and common usage for several devices in AOSP
and internal branch.
and export the library name to make. Refactor the code a bit to avoid repeating the library name
multiple times.
Bug: 22033465
Test: Ran external/clang/build.py for aosp-llvm
Change-Id: I25eb3858eb92e1dd493b09524d559802551b2547