Commit Graph

1692 Commits

Author SHA1 Message Date
Dan Willemsen 9ff34c0ca8 Update linux_bionic configuration
Add a missing toolchain method, don't require modules to opt in to
linux_bionic.

Bug: 31559095
Test: attempt to build host bionic
Change-Id: Ia5c8e2f127b88f56191b7abc389d5329cfdb0720
2018-10-22 15:46:03 -07:00
Dan Willemsen 4f644da0ad Don't use arch-specific modules when we want a single module
This breaks when two host OSes are enabled for example.

Bug: 31559095
Test: enable host bionic as a second Host OS, attempt a build
Test: treehugger
Change-Id: If52f77d7d3b0755d768028cbddda320303a69e65
2018-10-22 15:46:03 -07:00
Dan Willemsen 0ef639bb59 Allow generating modules once per OS instead of once per Class
When building with two OSes of the same class (Host, etc) enabled,
independently produce variants of each module for each OS, instead of
making `compile_multilib: "first"` select just one of the OSes.

My use case this is for Linux + LinuxBionic, which are both considered
Host class, but this would also applied if we wanted to generate rules
for Linux+Darwin, or some combination of firmware bits (either in
addition to Android in the Device Class, or multiple firmwares in a new
Class)

Bug: 31559095
Test: enable host bionic, see a linux(_glibc) and linux_bionic
      definition for binaries
Change-Id: I55e7f046758b3dc2a31da2c4b20274ec68ece0a0
2018-10-22 15:46:03 -07:00
Dan Willemsen fa2aee1ca4 Remove USE_CLANG_LLD[=false]
This should always be true now. It will be a change for side branches
(build_tools, etc) that weren't setting UseClangLld in the
soong.variables file.

Test: treehugger
Change-Id: I9fd6157fda630bf8bb939677dbcb026f02685f19
2018-10-21 19:54:12 -07:00
Dan Willemsen 2d31a44b8a Stop using DIST_DIR in Soong
We're only using it to distribute files in case of failure, which isn't
well supported currently, but can be handled for now by using the
DIST_DIR environment variable during the command execution.

This was at least one cause that we'd be re-running Soong during every
build server build, as the DIST_DIR values are unique.

Test: m dist
Change-Id: Ibd5e6b6c46695350de80b745bfb6a6aa685033a0
2018-10-20 21:33:41 -07:00
Martin Stjernholm e608208a67 Merge "Improve messages for VNDK dependency errors."
am: c325edce18

Change-Id: I825ac5a438b13eb4c1edff75acfeafe317d2d72a
2018-10-17 05:10:03 -07:00
Martin Stjernholm c325edce18 Merge "Improve messages for VNDK dependency errors." 2018-10-17 11:56:57 +00:00
Logan Chien aceb86e345 Merge "Remove flags from ClangLibToolingUnknownCflags"
am: 0b6bcd4014

Change-Id: I7f7e9e80052e748c1d92f46fee4552c1b4a45a2b
2018-10-17 03:08:54 -07:00
Logan Chien 0b6bcd4014 Merge "Remove flags from ClangLibToolingUnknownCflags" 2018-10-17 09:46:26 +00:00
Logan Chien 61f2d11e75 Remove flags from ClangLibToolingUnknownCflags
This commit removes flags from ClangLibToolingUnknownCflags.  These
flags were added to workaround an old version of clang in
`external/clang`.  Since we have updated to clang-r339409b, we don't
need these workaround anymore.

Bug: 117764794
Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py
Change-Id: Ifbeebf05df5c08ee3bb7d489f39250d8fd5f5acf
2018-10-16 17:52:12 +08:00
Martin Stjernholm 257eb0c933 Improve messages for VNDK dependency errors.
Test: build_test.bash

Change-Id: I8a52664d7bbb05232bc01b32580f926aae98056d
2018-10-16 10:38:57 +01:00
Haibo Huang 3df2d5986a Merge "Add support for cortex-a76 in soong"
am: 2bfa2c852c

Change-Id: Ieabcb61634e3e60f26589837b8c0d3c29d072371
2018-10-15 14:15:52 -07:00
Haibo Huang a31e2bda89 Add support for cortex-a76 in soong
Bug: 117125298
Test: Change a device to be A76 and build
Change-Id: Iae0773d54e57b247c818d44f8044180d5a3f95a8
2018-10-12 23:55:38 +00:00
Evgenii Stepanov 5368c31baf Define HWADDRESS_SANITIZER_GLOBAL_OPTIONS.
am: 109029fb5c

Change-Id: I6fb2bb61f37032d819dcd6dd66e2f232779e8091
2018-10-12 15:01:33 -07:00
Evgenii Stepanov 109029fb5c Define HWADDRESS_SANITIZER_GLOBAL_OPTIONS.
It will be exported in device environment as HWASAN_OPTIONS.

Bug: 112438058
Test: none
Change-Id: I574b46060b3193c9f2351116a91ebc35470ae803
2018-10-12 18:18:13 +00:00
Kostya Kortchinsky b03b69be6d Merge "Scudo minimal runtime support for Soong"
am: d054c225fb

Change-Id: Ia506665582e4668d6ca29d1a1680c889844a95d1
2018-10-12 10:03:30 -07:00
Kostya Kortchinsky d054c225fb Merge "Scudo minimal runtime support for Soong" 2018-10-12 16:49:31 +00:00
Dan Albert e119bd1785 Merge changes I30719eaf,I84812c55,Ifa397b2b
am: 383707f5ea

Change-Id: Iae1c5a75026d1203b07da744906c91d64a1e6907
2018-10-11 20:31:30 -07:00
Treehugger Robot 383707f5ea Merge changes I30719eaf,I84812c55,Ifa397b2b
* changes:
  Better error message for multiple defined symbols.
  Python 3 fix.
  Pylint fix.
2018-10-12 03:16:53 +00:00
Logan Chien 6e07d547bd Merge "Switch include path of header-abi-dumper headers"
am: 3b8f3e91c1

Change-Id: I518fc2fe33016a75d70e797599ea312dc3d96595
2018-10-11 20:09:00 -07:00
Logan Chien 3b8f3e91c1 Merge "Switch include path of header-abi-dumper headers" 2018-10-12 02:56:14 +00:00
Dan Albert 756f2d0e1b Better error message for multiple defined symbols.
Test: nose2
Test: m ndk
Bug: http://b/116629622
Change-Id: I30719eaf29d63d8c6595bbab4e5214a1ce6189ca
2018-10-11 13:50:49 -07:00
Kostya Kortchinsky ad73b2e18a Scudo minimal runtime support for Soong
Scudo is now compatible with the -fsanitize-minimal-runtime, and offers a new
dynamic library that doesn't bundle UBSan.

This patch adds support for this new library in Soong, preferring it over the
full one, unless a UBSan or diagnostic dependency is found.

Test: aosp compiled with m -j
Test: local test enabling Scudo for tombstoned
Change-Id: I17794131db148b33f8a8710ac43302cadf1af314
2018-10-11 11:55:16 -07:00
Pirama Arumuga Nainar 2985a30e1e Merge changes from topic "windows-libcxx"
am: f4ecf76b2d

Change-Id: I9bc7c290899afe5aa6e15730ae812e23ed665c16
2018-10-11 10:22:26 -07:00
Pirama Arumuga Nainar 5f193cb677 Change STL for Windows to libc++.
am: a403cc7254

Change-Id: Ieb1487d7c6dcc200ca0cf1dafa10378803de6b05
2018-10-11 10:22:08 -07:00
Pirama Arumuga Nainar 6048e3c52d Merge "Switch to clang-r339409b"
am: 3558470d28

Change-Id: I75a339f7cc25227a8e709b6267dbeb8797353d22
2018-10-11 10:21:36 -07:00
Pirama Arumuga Nainar f4ecf76b2d Merge changes from topic "windows-libcxx"
* changes:
  Remove --allow-multiple-definitions for 32-bit Windows
  Change STL for Windows to libc++.
2018-10-11 17:00:53 +00:00
Pirama Arumuga Nainar 3558470d28 Merge "Switch to clang-r339409b" 2018-10-11 16:59:27 +00:00
Logan Chien 3ff624f24b Switch include path of header-abi-dumper headers
This commit switches the include path of header-abi-dumper clang headers
to `prebuilts/clang-tools/${os}-x86/clang-headers`.  This decouples the
cross git repositories dependencies.

Bug: 111579848
Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py
Change-Id: I53083298ca7be39b3fbaffb123146c12c189e7c3
2018-10-11 17:11:34 +08:00
Jiyong Park b6e966984d Add ApexModule interface for APEX-aware modules
am: 9d45299ba4

Change-Id: Ica517fea677af7098e7ac082cb15997b25c90f0a
2018-10-11 00:56:00 -07:00
Jiyong Park 9d45299ba4 Add ApexModule interface for APEX-aware modules
ApexModule is the interface for APEX-aware modules. The module type apex
uses the interface to get APEX-specific information from other modules,
such as the list of APEXs that a module should be built for.

A module that is included in an APEX will be built specificaly for the
APEX. This is especially required for shared libraries; we shouldn't
just copy the artifacts built for platform, because they may be linking
against private (=unstable) symbols that are not available to APEXs
which are basically unbundled.

This CL, as a first step, makes cc.Module an APEX-aware module type.

Bug: 112672359
Test: m apex.test; the built apex has all the direct and transitive
shared lib dependencies of the libs and executables listed in Android.bp

Change-Id: I21f6a586654779984f0f5154b2a08b2adbf2168b
2018-10-11 11:19:07 +09:00
Yi Kong 35e8e19cd8 Add an option for libraries to opt out of libcrt
am: 2c188bea78

Change-Id: Ic78a8733437f360d60e96431230df0f02577a865
2018-10-10 18:02:41 -07:00
Yi Kong 2c188bea78 Add an option for libraries to opt out of libcrt
Test: m checkbuild
Bug: 29275768
Change-Id: I9c0999ddc15ad152c47089509f91dc1dc901f7e4
2018-10-10 15:56:14 -07:00
Pirama Arumuga Nainar 8fd5a96959 Remove --allow-multiple-definitions for 32-bit Windows
Bug: http://b/109759970
Bug: http://b/91353691

There are no multiple-defintion errors after switching to clang-r339409
and libc++.

Test: m native-host-cross
Change-Id: I5576b3894ed1d88c9b2e5f4d92e1d3bfadfb029b
2018-10-10 20:10:15 +00:00
Pirama Arumuga Nainar a403cc7254 Change STL for Windows to libc++.
- Stop including libstdc++ headers.
- '-pthread' and 'static-libgcc' are unused when we pass -nodefaultlibs.
We didn't pass -nodefaultlibs for libstdc++.
- Use SjLj exceptions for 32-bit.  libgcc_eh implements SjLj exception
model for 32-bit.
- Disable visibility annotations for libcxx and libcxxabi since we are
only going to support these as static libraries.
- Use Win32 threads.  MinGW pthreads throws an error when building
libcxx since it's pthread_mutex_initializer is not constant (needs a
cast).
- Link libgcc_eh, which needs pthread, which in turn depends on
kernel32.  Wrap the libraries with --start-group and --end-group and
remove duplicates.

Test: Build and test Windows binaries under Wine.

Change-Id: I8be51b004585e11ef51b7d5012f2a51330d1260f
2018-10-10 20:09:37 +00:00
Yi Kong d871ae11f4 Merge "Revert "Revert "Move libgcc to libcrt.builtins"""
am: 38441856ca

Change-Id: If51950dbcef748b58a71cf72b8c2a8f67e7c5bc4
2018-10-10 12:33:56 -07:00
Treehugger Robot 38441856ca Merge "Revert "Revert "Move libgcc to libcrt.builtins""" 2018-10-10 19:08:04 +00:00
Pirama Arumuga Nainar 14b3cb0ab3 Switch to clang-r339409b
Bug: http://b/117499735

Test: clang-tools build, AOSP taimen build and TH
Change-Id: I9fada181e2cb85e65c66672f870b59e8da0be9ce
2018-10-10 18:38:11 +00:00
Dan Willemsen dc1b833df0 Remove GCC-specific toolchain methods
am: bd4abf5dfc

Change-Id: Iaea003158a8fddcd73eee1dcc2c7803687a15e71
2018-10-09 22:46:52 -07:00
Dan Willemsen bd4abf5dfc Remove GCC-specific toolchain methods
Test: m
Change-Id: I06442347ade2d60bc42131b3126ecc17840c9e31
2018-10-09 19:44:54 -07:00
Dan Willemsen 6e9fe7c6ec Merge "Restore lld parts of "Remove cortex-a53 linker workaround for new cpus.""
am: 55e095b6d8

Change-Id: I8f9d87561e02ffbeb0aae0f9435ad971c9bc1e2f
2018-10-09 16:26:41 -07:00
Dan Albert f5b8184abe Python 3 fix.
Test: nose2  # With python3 nose2
Bug: None
Change-Id: I84812c55be0daa58a594752702d866daf3c2d8f0
2018-10-09 15:22:15 -07:00
Dan Willemsen e28663fb28 Restore lld parts of "Remove cortex-a53 linker workaround for new cpus."
https://android-review.googlesource.com/c/platform/build/soong/+/689585
added, but was skipped going into pi-dev-plus-aosp, as the pi-dev
version (which did not have these lld bits) was already merged there.
When pi-dev-plus-aosp was pushed to aosp-master, this got lost.

Merged-In is a random git_master change, since this needs to go
into pi-dev-plus-aosp too, but no further.

Bug: 78133793
Test: git diff aosp-master..master -- cc/config/arm64_device.go
Change-Id: Iea69a2c040d11249e43a76a78859944274ce6a92
Merged-In: I7799feac522a1097ec4271bd7868cd6bfe147ad9
2018-10-09 14:44:46 -07:00
Yi Kong 7df0f30785 Revert "Revert "Move libgcc to libcrt.builtins""
This reverts commit 6fb831bd56.

Bug: 29275768
Test: checkbuild and bionic native tests on arm/arm64/x86/x86_64
Change-Id: I774dea64a209dac673f927115b30170e5470db76
Merged-In: I774dea64a209dac673f927115b30170e5470db76
(cherry picked from commit 85e9ba15b5)
2018-10-09 20:39:50 +00:00
Ivan Lozano 8a33fadc1e Apply minimal runtime to the rest of ubsan.
am: ae6ae1d880

Change-Id: I379d342ade35afc5c17c3cb205eace470f7b3bc9
2018-10-09 08:17:27 -07:00
Ivan Lozano ae6ae1d880 Apply minimal runtime to the rest of ubsan.
Make sure that the minimal runtime gets applied to the rest
of the sanitizers we might use from ubsan.

Bug: 80195448
Test: Build success and checked build flags.
Change-Id: I31b211b80bb1068c153a9b65454a2605933c9568
2018-10-09 08:05:27 -07:00
Dan Willemsen 5d7598005a Remove GCC checks
am: 8536d6b3b7

Change-Id: I1ba28f29238db813a683169a6113baea33095f4c
2018-10-08 19:34:53 -07:00
Dan Willemsen 8536d6b3b7 Remove GCC checks
Clang is always used now, so we can remove all the GCC checks. Removing
GCC-specific configuration will happen in the next CL.

Test: m
Change-Id: I4835ecf6062159315d0dfb07b098e60bff033a8a
2018-10-09 02:16:58 +00:00
Chih-Hung Hsieh cfba3658f4 Merge "Add default -Wimplicit-fallthrough."
am: 230e4c77a5

Change-Id: I15e7cbf40722360d91cafc196e4a9a908338df56
2018-10-08 18:02:54 -07:00
Treehugger Robot 230e4c77a5 Merge "Add default -Wimplicit-fallthrough." 2018-10-09 00:46:21 +00:00