Commit graph

8368 commits

Author SHA1 Message Date
Dan Willemsen
0abd437f6f Unset BUILD_NUMBER in build_test.bash
To make build server incrementals of build_test actually incremental.

Test: Set different BUILD_NUMBERs, run build_test.bash --incremental
Change-Id: Ice0e9a6f6c1dd3a3e0332b98081e82a3df74ce59
2018-10-15 22:36:16 -07:00
Treehugger Robot
153c2f8ba3 Merge "Fix how soong converts LOCAL_STRIP_MODULE." 2018-10-15 23:12:52 +00:00
Haibo Huang
2bfa2c852c Merge "Add support for cortex-a76 in soong" 2018-10-15 21:01:30 +00:00
Treehugger Robot
f4fec6a774 Merge "Make automatically added <uses-library> entries optional" 2018-10-15 20:36:41 +00:00
Jaewoong Jung
59171a4401 Fix how soong converts LOCAL_STRIP_MODULE.
It should be translated to a poperty map with one entry, not a string
value.

Bug: 74083867
Change-Id: Ida659749a63e67eb55184e7c79959f57b8549dad
Test: androidmk_test.go
2018-10-15 19:38:19 +00: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
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
d054c225fb Merge "Scudo minimal runtime support for Soong" 2018-10-12 16:49:31 +00:00
Neil Fuller
e888ebed6a Merge "Expand projects allowed to use no_standard_libs" 2018-10-12 15:03:19 +00:00
Treehugger Robot
a4b0422fc2 Merge "aidegen: Fix bug of generating module dependency information" 2018-10-12 05:05:34 +00: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
3b8f3e91c1 Merge "Switch include path of header-abi-dumper headers" 2018-10-12 02:56:14 +00:00
Treehugger Robot
bbbb78f980 Merge "Support Metalava in java_sdk_library" 2018-10-12 00:50:32 +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
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
Neil Fuller
fe385b001c Expand projects allowed to use no_standard_libs
There are a set of git projects that are part of or
closely related to "core libraries" and will need to
be allowed to compile against core library implementations
(and not stubs) after we've switched the default to use
stubs.

Bug: 113148576
Test: build
Change-Id: Id10b7dd83b173bdbfdb07b404d0e5f1ff621e543
2018-10-11 16:03:39 +01:00
Paul Duffin
d616b6719f Make automatically added <uses-library> entries optional
Test: run aapt dump badging on build apk
Bug: 113800422
Change-Id: I8cdfc3bea0c23e93f44b5707414a7a5a1e3af1c0
2018-10-11 14:32:50 +01:00
Treehugger Robot
3393b26cdc Merge "Directories and executables files in an APEX have x bit set" 2018-10-11 12:36:23 +00:00
patricktu
bb640e0240 aidegen: Fix bug of generating module dependency information
Bug: 117588037
Test: cd $android_root;make aidegen;aidegen -m tradefed
Change-Id: I05712ef3243771605034e4e9a746b8e1081c3516
2018-10-11 18:33:16 +08: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
Treehugger Robot
db69b6691f Merge "Make APEX build rules consistent" 2018-10-11 08:50:32 +00:00
Sundong Ahn
fb2721f2a6 Support Metalava in java_sdk_library
The metalava is supported instead of doclava. However, not all sdk
libraries are available now. So metalava_enabled property is added for
it.
when using metalava, DroidstubsFactory module will be created instead of
DroiddocFactory.

Test: make -j
Test: make apicheck
Bug: 117127012

Merged-In: I7fd10230bfe30a4ef4dceb1a4459145b674668cd
Change-Id: I7fd10230bfe30a4ef4dceb1a4459145b674668cd
(cherry picked from commit 0817d01ab1)
2018-10-11 08:41:57 +00:00
Neil Fuller
039a83fdd3 Merge "Include all core libs in default boot classpath" 2018-10-11 08:35:59 +00:00
Jiyong Park
92905d6b4b Directories and executables files in an APEX have x bit set
Files under /bin and all directories in an APEX now have x (executable)
bit set correctly.

Bug: 117580281
Test: m apex.test, push it to /data/apex and reboot.
adb shell ls -al /apex/com.android.example.apex@1 shows that the
directories have x bit set

Change-Id: I76e4188d86dc9cdf65e9f8e52be1981e25441a6e
2018-10-11 14:24:32 +09:00
Jiyong Park
ab3ceb3855 Make APEX build rules consistent
Don't directly iterate over the copyManifest map to generate the copy
commands. Iterating over a map in golang isn't guaranteed to give
consistent order. This causes the apex build rules to be executed even
when there is no source file change.

Fix the issue by creating a sorted list of the key and then iterate over
the list.

Bug: 117453592
Test: m apex.test; m.apex.test   nothing is built during the second
build

Change-Id: I329a91ec0b6a34cbe745bf9a9ceb0843b63c200c
2018-10-11 14:24:32 +09:00
Jiyong Park
48ca7dc535 Add apex variants
Now, APEX-aware modules (the ones implementing android.ApexModule
interface) are created with multiple variants for each APEX that they
are included.

For example, if a module is included (either directly or indirectly -
via static linking) to two APEXs, the module is built separately for the
two APEXs (and of course separately for platform). This is a first step
to limit the symbol visibility to the modules built for APEXs; platform
private symbols and libs shouldn't be allowed for them.

In addition, the build system now tracks transitive dependencies of
the modules in APEXs. For example, if
native_shared_lib_modules:["libFoo"] then libFoo and its dependencies
are all automatically included to the APEX.

Bug: 112672359
Test: m apex.test; the built apex has additional libs (such as liblog,
libc++, ...) that are dependencies of the ones specified in Android.bp

Change-Id: Id9e3fc486dd4e7e36f8b6799dfb041868c5198d5
2018-10-11 14:24:18 +09: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
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
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
Neil Fuller
1fee9f3dd0 Include all core libs in default boot classpath
To migrate the default compilation over to using
"core platform api" stubs we need to make the "before"
state as close to the "after" state as possible.

The stubs will include all "core libraries" so it
makes sense to include those that contribute to the
"core platform api": okhttp, bouncycastle and conscrypt.

(apache-xml is not included because it doesn't contribute
to the core platform API).

After this change all explicit dependencies to okhttp,
bouncycastle and conscrypt in situations where the
default boot classpath is used can be removed.

A knock-on of this change is that the conscrypt, bouncycastle
and okhttp targets need to be adjusted to explicitly
depend on core-oj / core-libart with no_standard_libs: true
to avoid a cycle.

Bug: 113148576
Test: treehugger
Change-Id: I1677af8d9d48fd026874ebce4c864f39ec1a5a3d
2018-10-10 08:42:12 +00:00
Dan Willemsen
bd4abf5dfc Remove GCC-specific toolchain methods
Test: m
Change-Id: I06442347ade2d60bc42131b3126ecc17840c9e31
2018-10-09 19:44:54 -07:00
Dan Willemsen
6afcd9aab9 Log uses of make and xmllint within the Android Build
Now that we've got prebuilts of make, turn on logging so that
we can find all the users and convert them to the prebuilt.

We also build xmllint as part of the tree, so log uses of that
too.

Test: treehugger
Change-Id: I8a6a5d481dfc709dc0eb3424c51430bc54763c1e
2018-10-09 23:57:45 +00:00
Treehugger Robot
55e095b6d8 Merge "Restore lld parts of "Remove cortex-a53 linker workaround for new cpus."" 2018-10-09 22:51:11 +00:00
Treehugger Robot
8bb0f530f7 Merge "zip2zip: support included an excluded file" 2018-10-09 22:35:26 +00:00
Colin Cross
f4465da1dc Merge "genrule: add $(location) for inputs and outputs" 2018-10-09 22:33:17 +00: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
Treehugger Robot
08914b9c98 Merge changes from topic "soong_jni"
* changes:
  Add android_test_helper_app
  Add support for android_app_certificate modules
  Add support for JNI libraries to android_app modules
2018-10-09 21:50:40 +00: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
Colin Cross
3824771b2d zip2zip: support included an excluded file
Make needs to exclude all files that match a filespec except for
those specified in a list.  Add a -X argument that overrides the
-x argument to allow files be included that were previously
excluded.

Bug: 69500920
Test: zip2zip_test.go
Change-Id: Icc8aebc788b53bcdde73a39c9c7cf3107a049251
2018-10-09 17:48:16 +00: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
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
Treehugger Robot
230e4c77a5 Merge "Add default -Wimplicit-fallthrough." 2018-10-09 00:46:21 +00:00
Colin Cross
08f15ab466 genrule: add $(location) for inputs and outputs
There was no way to select a single source file from a genrule that
has multiple source files.  Make Soong's genrule closer to Bazel
by supporting $(location) for input and outputs.  Change the
label used for tools referenced through filegroups to the name
of the module instead of the name of the file, which means it
matches the string used in the tools property.

Also support :module format in the tools property in preparation
for deprecating the tool_files property and putting both files
and modules in the tools property.

Bug: 117354232
Test: genrule_test.go
Change-Id: Id31a4ac4ff7064076a576c1d8ffeb7c19fc6b9a4
Merged-In: Id31a4ac4ff7064076a576c1d8ffeb7c19fc6b9a4
(cherry picked from commit 098d22b5f6)
2018-10-08 16:05:48 -07:00
Colin Cross
252fc6f422 Add android_test_helper_app
Add a module that can build an APK that will be used by a test.
The APK will be sideloadable, and can be added to a test suite,
but will not autogenerate a test config file.

Test: m checkbuild
Change-Id: Idf325b1c9a2cbcd16b126da3331671e4aed4b3da
2018-10-08 15:26:00 -07:00