Commit graph

8331 commits

Author SHA1 Message Date
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
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
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
Colin Cross
bd01e2abee Add support for android_app_certificate modules
Some android_app modules need certificates located outside their
directory.  Instead of requiring paths from the root of the tree,
add an android_app_certificate module that exports the certificate
files.

Test: m checkbuild
Change-Id: Icbf3898894f3eb857e2d907e3e58dd072c6fabe9
2018-10-08 15:25:54 -07:00
Colin Cross
b1a5e9cadf zip2zip: add flag to uncompress files
Add -0 flag to convert files in a zip to stored instead of deflated.

Bug: 69500920
Test: zip2zip_test.go
Change-Id: I6c2b10f3b200a53a3339e3c97a78f65192b309ca
2018-10-08 15:20:56 -07:00
Colin Cross
a4f08813a3 Add support for JNI libraries to android_app modules
Make android_app modules a MultiTargets module, which means the
common variant will have a list of Targets that it needs to handle.
Collect JNI libraries for each Target, and package them into or
alongside the APK.

Bug: 80095087
Test: app_test.go
Change-Id: Iabd3921e1d4c4b4cfcc7e131a0b0d9ab83b0ebbb
2018-10-08 15:20:56 -07:00
Colin Cross
e40b4eaeb0 Export cc module types and mutators needed for JNI testing
JNI testing will need to create basic native shared library
modules, export the minimum mutators and module types for
the required dependencies of a native shared library.

Bug: 80095087
Test: cc_test.go
Change-Id: Ibe7bc88b69cb0851291cb09a4c0c6cdb421b8651
2018-10-08 15:20:56 -07:00
Colin Cross
ee0bc3b290 Add multi-target variants
Allow modules to specify that they will handle multiple targets in
the common variant.  This will be used by android_app modules to
handle JNI libraries from multiple architectures.

Bug: 80095087
Test: m checkbuild
Change-Id: Iede3e9c23b64fb516341c3ae08074a322b511d40
2018-10-08 15:20:21 -07:00
Chih-Hung Hsieh
bd783f13c1 Add default -Wimplicit-fallthrough.
After we fix all existing such warnings, it can be changed to an error.

Bug: 112564944
Test: make checkbuild
Change-Id: I61ee3a24a3f992ef018cfe6c995e957416551183
2018-10-08 22:12:35 +00:00
Dan Willemsen
1c7e0a235b Merge changes from topic "update_make_flags"
* changes:
  Update flags passed to make
  Stop using GCC in toolchain_library
2018-10-08 21:34:46 +00:00
Treehugger Robot
445a4843cc Merge "Remove Sepolicy_split." 2018-10-08 20:58:35 +00:00
Steven Moreland
d6ea749030 Remove Sepolicy_split.
It's not referenced anywhere anymore (or filled out).

Test: m nothing (parses Android.bp files)

Change-Id: I5a90bcc1ea949ee054c452eefeb2cfc2640cfaa6
2018-10-08 10:33:41 -07:00
Dan Willemsen
25cc01f160 Update flags passed to make
Remove more GCC-specific flags, TARGET_(arm|thumb)_CFLAGS now contains
pre-filtered clang flags, and GLOBAL_CLANG_CFLAGS_NO_OVERRIDE now
contains all flags instead of just the clang additional flags.

Test: m
Change-Id: I61e4c5a92113d4ff3b95261783269dc1d226c57a
2018-10-07 23:50:34 -07:00
Dan Willemsen
feea4dff66 Stop using GCC in toolchain_library
Instead, hardcode the ~dozen paths into build/soong/Android.bp, which
will unblock removing more GCC support.

Bug: 114286031
Test: m
Change-Id: I2508432e00b1469141f01e667f3c6a2fe30cd805
2018-10-07 23:50:34 -07:00
Treehugger Robot
f4fe9dcbd2 Merge "Add quotes to sourcepath" 2018-10-08 04:29:28 +00:00
Sundong Ahn
56dce44269 Add quotes to sourcepath
If Srcs contains only srcjar, sourcepath is null and an error occurs. So
if sourcepath is null, we will use the "-sourcepath "" ".

Test: m -j
Bug: 112397488
Change-Id: I03ac0074fc041203fa1b427d4b4a418af44e85e2
2018-10-08 02:22:08 +00:00
Treehugger Robot
17ccb45a5a Merge "Add methods to get source file path and subdir of prebuilt_etc" 2018-10-06 06:18:18 +00:00
Treehugger Robot
66ee92f3c1 Merge "Revert "Disable performance-noexcept-move-constructor check."" 2018-10-05 23:01:46 +00:00
Yi Kong
d48fec1b90 Merge "Revert "Move libgcc to libcrt.builtins"" 2018-10-05 22:11:49 +00:00
Yi Kong
6fb831bd56 Revert "Move libgcc to libcrt.builtins"
This reverts commit 77e62dbf59.

Reason for revert: caused boot failure on mirror-aosp-master-with-vendor

Change-Id: I594df35878616dba8990d044d7cd529458a601b6
2018-10-05 22:10:04 +00:00
Colin Cross
2a07692643 Add tests for genrule command expansion
Add tests for expanding variables in a genrule cmd property.

Test: genrule_test.go
Change-Id: I8288b8616d518bb5f24a892c4e59f68d95055d0a
2018-10-05 21:29:14 +00:00
Elliott Hughes
ecdeb1e705 Remove sum(1) from the list of approved binaries.
No-one should be using BSD sum in 2018.

Bug: N/A
Test: treehugger
Change-Id: I9aa313e111217a2d73ba41eaf49035d8293b5785
2018-10-05 19:59:58 +00:00
Chih-hung Hsieh
fac4eec15e Revert "Disable performance-noexcept-move-constructor check."
This reverts commit 1b5470afe1.

Reason for revert: Most of these warnings were fixed.

Change-Id: I63ada2b7d6f3d6a446a8fbfc9221dee668c7a30b
2018-10-05 18:45:06 +00:00
Jiyong Park
c43e0ac0dd Add methods to get source file path and subdir of prebuilt_etc
The path and dir are used by apex to include prebuilt files in APEXs.

Bug: 112672359
Test: m apex.test
Change-Id: I780edc8f15e00e644c41fa2eb9dc73c25339c727
2018-10-05 14:13:50 +09:00
Treehugger Robot
a1afb6e006 Merge "Switch perl to logging" 2018-10-05 03:54:30 +00:00
Colin Cross
886d45d8dd Merge changes Ibf8af35f,I32edd26b,I981875bb
* changes:
  Make prefer32 a lambda
  Clean up archMutator
  Make more java modules defaultable
2018-10-05 00:17:07 +00:00
Dan Willemsen
3eec9c57ca Switch perl to logging
To find the users and see if we can get rid of it.

Test: treehugger
Change-Id: I149f8daee6e21b35840ea1788de7f3e310eb5fba
2018-10-04 23:26:12 +00:00
Yi Kong
1b9970727f Merge "Move libgcc to libcrt.builtins" 2018-10-04 22:09:55 +00:00
Yi Kong
77e62dbf59 Move libgcc to libcrt.builtins
libgcc is kept behind libcrt.builtins to provide unwinder symbols and
any other missing symbols.

libc and libm are excluded from the switch due to some symbols being
hidden in libcrt.builtins but not in libgcc. These will be addressed in
a separate CL.

Bug: 29275768
Test: checkbuild and bionic native tests on arm/arm64/x86/x86_64
Change-Id: Icc85bf88513e989a4b1547564405a22cf847db8a
2018-10-04 03:03:19 +00:00
Colin Cross
a9d8bee9f3 Make prefer32 a lambda
prefer32 needs to be set differently for app and native modules.
Make it use lambda provided by the module type instead of trying
to make archMutator figure it out.

Test: m checkbuild
Change-Id: Ibf8af35fdd3e1721725539d1f5452f4439d2125c
2018-10-03 14:31:10 -07:00
Colin Cross
5eca7cb229 Clean up archMutator
Use a variable for module.base() and separate the full list of
targets for the class from the filtered list of targets for the
module.

Test: m checkbuild
Change-Id: I32edd26bcbaff0baf433d0581f253b8a5c8b81f3
2018-10-03 14:31:10 -07:00
Colin Cross
48de9a4ef5 Make more java modules defaultable
Make java_import, android_library and android_library_import modules
defaultable, and add some missing property structs to java_defaults.
Also use InitJavaModule everywhere.

Test: m checkbuild
Change-Id: I981875bbec5d1f87bae73f36a385e0b77c56c368
2018-10-03 14:31:10 -07:00
Pirama Arumuga Nainar
b83de950e7 Remove --allow-multiple-definion linker flag for 64-bit Windows
Bug: http://b/109759970

r335286 fixed this for 64-bit Windows.  This remains broken for 32-bit
Windows.

Test: m native-host-cross
Change-Id: I4d11b83d51db055406c6723aad89efd1b86b9b7b
2018-10-03 11:40:23 -07:00
Treehugger Robot
0d7fd7f70a Merge "sdk_version <= 28 implies Java 1.8" 2018-10-03 14:41:02 +00:00
Jiyong Park
4584a8ac8e sdk_version <= 28 implies Java 1.8
When sdk_version is equal to or less than 28, java_version is implied to
1.8 unless it is explicitly specified. It was 26 originally, and is now
updated to 28 which is the most recent API version.

Bug: 117069453
Test: EXPERIMENTAL_USE_OPENJDK9=true make apex_aidl_interface
Change-Id: I18ebe3ec51ada54103f6d203b9bfae8ec6ea5d90
2018-10-03 18:05:04 +09:00
Treehugger Robot
72cf0a8479 Merge "Add DevicePrefer32BitApps to Soong" 2018-10-03 03:05:08 +00:00
Treehugger Robot
be08f6b507 Merge "Use SoongJavacWrapper for javadoc" 2018-10-03 01:57:54 +00:00
Nan Zhang
40b41b4038 Use SoongJavacWrapper for javadoc
Test: m -j docs; javac_wrapper_test
Bug: b/116874473
Change-Id: I51d440c815d3db1a0a5dc26ad4e376189dc0aefe
2018-10-02 16:45:37 -07:00
Treehugger Robot
5b4a8eb854 Merge "Don't set targetSdkVersion to '1' for libraries" 2018-10-02 22:04:28 +00:00