Commit graph

1012 commits

Author SHA1 Message Date
Colin Cross
e99de69665 Merge "Disable desugaring try-with-resources"
am: 28794da1c0

Change-Id: I5a6d131e689922586482d950e933e5ea86e7729e
2017-07-21 20:52:54 +00:00
Colin Cross
28794da1c0 Merge "Disable desugaring try-with-resources" 2017-07-21 20:48:45 +00:00
Colin Cross
bf4ac7a82f Disable desugaring try-with-resources
Desugaring try-with-resources is not necessary for platform builds,
and triggers some problems for apps built as part of the platform
that target SDK versions before 19.  Disable all try-with-resource
desugaring.

Bug: 63180735
Bug: 63900665
Bug: 63901645
Test: m -j ANDROID_COMPILE_WITH_JACK=false checkbuild
Change-Id: I98b827aa1e80b43e6eb7b58254c23c7a4f7dc52d
2017-07-20 15:07:22 -07:00
Tobias Thierer
3a88054509 Merge "Drop obsolete javac -extdirs commandline arg."
am: 43440c22dd

Change-Id: I7d5736b6b5760341aca1a8810f13d999733bc68a
2017-07-20 08:22:03 +00:00
Tobias Thierer
78d2983566 Drop obsolete javac -extdirs commandline arg.
The extension directory defaults to lib/ext and does not
exist by default. Setting it to the empty string de facto
disables this obsolete feature.

AOSP is moving to a hermetic toolchain so this argument
will stop working soon. Further, OpenJDK 9 javac no longer
supports this command line argument when compiling for
-source 1.9 -target 1.9.

This command line argument has been around since the
earliest versions of Android, but is now obsolete.
This CL drops it.

Bug: 63746471
Test: Treehugger
Change-Id: Ia0214c1b192e3ffda10772d777557a81ce346c03
2017-07-18 16:17:15 +01:00
Colin Cross
4cea760106 Merge "Revert "Use dx.jar directly""
am: c7e3e962f8

Change-Id: Icd5402f7cc789224753537c070a91cbf6267ee66
2017-07-18 07:14:26 +00:00
Treehugger Robot
c7e3e962f8 Merge "Revert "Use dx.jar directly"" 2017-07-18 07:08:19 +00:00
Colin Cross
e44e75aa89 Revert "Use dx.jar directly"
This reverts commit e37a3c959a.

Reason for revert: breaks art test runner

Change-Id: Ice0cd3020ddec7f31eb789867a45f047a75a05d0
2017-07-18 05:22:59 +00:00
Colin Cross
4828fcad41 Merge "Use dx.jar directly"
am: c68434c971

Change-Id: Ief2c88d3ba0e93c7eb7bb9db0ac2b0a0b886bcea
2017-07-17 20:45:31 +00:00
Jeff Gaston
6264b662f3 Merge "Update to latest jacoco usage"
am: 483fae7430

Change-Id: Ibc94d5ba6db7690441825dd655b6cb26d989b78d
2017-07-17 20:44:10 +00:00
Colin Cross
c68434c971 Merge "Use dx.jar directly" 2017-07-17 20:40:13 +00:00
Jeff Gaston
aaae43cd24 Update to latest jacoco usage
Bug: 36792868
Test: EMMA_INSTRUMENT_STATIC=true m -j

Change-Id: I419b543283b52be9a72f5c6b10e4cbea68782174
2017-07-14 13:04:05 -07:00
Colin Cross
e37a3c959a Use dx.jar directly
Use $(JAVA) to invoke dx.jar instead of the dx wrapper script.
Also allow the dx command line or the dx jar to be specified on
the command line.  Allows better dependencies on dx.jar, and
doesn't rely on having java on the path.

Bug: 62956999
Test: m -j checkbuild
Change-Id: I5f265132690ad28b3139954fea44eb0c4a43393a
2017-07-07 13:34:33 -07:00
Colin Cross
e885ccf0df Merge "Provide make variables for java binaries"
am: 5e19557eb9

Change-Id: Ib1be7da98214e3b6c27867b80005e18cc68a0d33
2017-07-01 01:36:14 +00:00
Colin Cross
0851df8c82 Provide make variables for java binaries
Replace java -> $(JAVA), etc. to prepare for moving java binaries
out of the path and using full paths to them.

Test: builds
Bug: 62956999
Change-Id: I5dfcd0d4e855ecde69cd127169e9545e59723d12
2017-07-01 01:03:14 +00:00
Steven Moreland
8fb19697da Merge "Move math function definitions." am: b5e90583ef am: d1eab0ea46
am: a2f3561259

Change-Id: I86436840a6c5877901a13384faea6e699f0edfa9
2017-06-02 00:25:16 +00:00
Treehugger Robot
b5e90583ef Merge "Move math function definitions." 2017-06-02 00:11:04 +00:00
Dan Willemsen
9afb656369 Merge "Fix make warning/error colors on Mac" am: a46695c337 am: 6ee5e52f77
am: c9b89ad0fe

Change-Id: I2349136dcf43dd0336bbb8638bd03eab84082f2f
2017-06-01 08:34:58 +00:00
Dan Willemsen
25f2d0ded7 Fix make warning/error colors on Mac
Apparently the default bash echo doesn't support \e even though the man
page says it does. So use \033 instead.

Test: m -j nothing on mac, get colors
Test: m -j nothing on linux, still get colors
Change-Id: I608fa87e3c28bf8f99264d39f9b250008a81235a
2017-05-31 19:20:09 -07:00
Steven Moreland
a64f33668e Move math function definitions.
Created math.mk and moved all math function definitions there.
Then, included this file in config.mk. This allows the functions to be
used by whatever includes config.mk (envsetup and build).

Test: manually setting combinations of PRODUCT_SHIPPING_API_LEVEL
  and PRODUCT_FULL_TREBLE_OVERRIDE and looking at values of
  PRODUCT_FULL_TREBLE.
Bug: 62229856
Change-Id: Icdab4214a1e65ae202411613dbcb9c9ea5f43b09
2017-05-31 20:41:49 +00:00
Miao Wang
b19c923c77 Merge "Update RenderScript build config and definitions." am: dddd7738d0 am: 4751b9e700
am: 527eee8b8f

Change-Id: Ife66e15b0c458a9fb622e56b7ab348e345d780b0
2017-05-26 22:51:36 +00:00
Treehugger Robot
dddd7738d0 Merge "Update RenderScript build config and definitions." 2017-05-26 22:29:36 +00:00
Miao Wang
a9fed83fae Update RenderScript build config and definitions.
Bug: 38342163

  - obj/lib is deprecated and TARGET_OUT_INTERMEDIATE_LIBRARIES will be
  removed. We need to use per-module intermediates directory instead.
  - prebuilts/ndk/current folder is gone. For libm and libc, we just
  need ndk/r10 as stub libs for linking.

Test: mm and made sure this does not affect on device target.
Test: make -j50 FORCE_BUILD_RS_COMPAT=true RSTest_Compat works as
expected.

Change-Id: I8fbf5c10322707849a23c6b0dacc28b028db451e
2017-05-26 13:48:08 -07:00
Tobias Thierer
206b85e3b2 Merge changes from topic 'bug_38177295_checkbuild' am: bc8f82ff25 am: 0556ad1a71
am: 3dd019b9c4

Change-Id: I7dd63314b4aace5f308aca6b28bf4af671f183fa
2017-05-26 15:49:36 +00:00
Tobias Thierer
9cc3c76abd Let signapk access internal APIs under OpenJDK 9 toolchain
signapk relies on internal APIs sun.security.{pkcs,x509},
for example in com.android.apksig.internal.apk.v1.V1SchemeSigner.

This breaks at signapk runtime under OpenJDK 9 because those
packages are not exported by the java.base module.

This CL unbreaks signapk by allowing it to access these internal
packages. In the long term, signapk should migrate away from these
internal APIs (bug 37137869).

Test: make ANDROID_COMPILE_WITH_JACK=false checkbuild tests \
      && make checkbuild tests
      (with OpenJDK 8u45 toolchain on the PATH)
Test: make EXPERIMENTAL_USE_OPENJDK9=true \
      ANDROID_COMPILE_WITH_JACK=false checkbuild
      (with jdk 9-ea+170 toolchain on the PATH)

Bug: 37137869
Bug: 38177295
Change-Id: I64cab83e6eb7b135cf2ad7b523736cb409aaae02
2017-05-25 20:34:22 +01:00
Tobias Thierer
97479ccb7f Desugar: allow reflection over internal APIs.
Desugar reflects over internal APIs at runtime, using the
java.lang.invoke.MethodHandles.Lookup API.

On OpenJDK 9 toolchains, such reflection is only allowed
to packages to which the java.lang.invoke module is opened.

This CL adds an override to open the module to all unnamed
modules (i.e., to Desugar) when running Desugar.

Test: make checkbuild
      (with OpenJDK 8u45 toolchain on the PATH)
Test: make EXPERIMENTAL_USE_OPENJDK9=true checkbuild
      (with OpenJDK 9-ea toolchain on the PATH)

Bug: 38177295

Change-Id: I2cf74a96ea17366dd50b8d92af8e41e812247ef7
2017-05-25 18:14:27 +01:00
Dan Willemsen
4a05738a8e Merge "Fix override warnings when two test suites share an output" am: 5f4274609f am: a0d3365510
am: 9f64ca8413

Change-Id: I5e06436c54f8c6a1e2d90f6e5728604d8b2a3ff5
2017-05-24 03:41:33 +00:00
Dan Willemsen
988a08d009 Fix override warnings when two test suites share an output
Test: (internal master); m -j nothing, check warnings
Test: Spot check differences in build-*.ninja
Change-Id: I160583faa69d090f9b97a8a600598a39a8b1ed9c
2017-05-24 00:42:23 +00:00
Tobias Thierer
57fa914a79 Merge "Fix fragile assumptions about build toolchain. (attempt #2)" am: 48ee187e98 am: b9511c87b6
am: d7f60e4fbc

Change-Id: I7cff67ba4208293eacf7a9346c99b9f964ba270b
2017-05-23 12:26:25 +00:00
Tobias Thierer
0ed47f7fd1 Fix fragile assumptions about build toolchain. (attempt #2)
This CL resubmits a fixed version of commit
e2a8da2683.

This CL applies the following changes:

- explicitly set the path where desugar will dump temporary class files.
  This ensures that the system property is set before it is read during
  InnerClassLambdaMetafactory.<clinit>. Before this CL, the system
  property was set by Desugar.createAndRegisterLambdaDumpDirectory(),
  which may run too late.

- explicitly specify -source 1.8 for droiddoc's javadoc run.
  Previously, the command used the language version of the build
  toolchain, which might fail due the backward-incompatible restrictions
  imposed by the proposed module system.

  Some Android build targets use LOCAL_JAVA_LANGUAGE_VERSION 1.7,
  but droiddoc combines sources from multiple build targets and there
  where no backwards incompatible changes in 1.8, so it should be fine
  to use 1.8 for code from either language level.

Bug: 38318052
Bug: 38225656
Bug: 38177295
Test: make clean && make ANDROID_COMPILE_WITH_JACK=false checkbuild tests \
      && make checkbuild tests
      (using OpenJDK 8 toolchain)

Change-Id: I2fffe6668747f48be44e34c67332af9b8a996d2a
2017-05-22 23:03:24 +01:00
Tobias Thierer
1a48fbca55 Merge "Revert "build/make/core: Fix fragile assumptions about build toolchain."" am: a0203a6544 am: 64517075a5
am: aadebe100d

Change-Id: I97126a25f703974f3829cb1b41c1f710e80cbd4e
2017-05-18 14:41:23 +00:00
Tobias Thierer
a0203a6544 Merge "Revert "build/make/core: Fix fragile assumptions about build toolchain."" 2017-05-18 14:25:15 +00:00
Tobias Thierer
4c764abf37 Revert "build/make/core: Fix fragile assumptions about build toolchain."
This reverts commit e2a8da2683.

Reason for revert: broke build. 

Change-Id: I951cc070adbbbd784aa4f8e171e543c35d0249de
2017-05-18 14:00:29 +00:00
Tobias Thierer
4c1d087d7e Merge "build/make/core: Fix fragile assumptions about build toolchain." am: b371c7756a am: 68587c24a9
am: bbe4662305

Change-Id: I1cdcfa09a9bab0a519ff695a9b6eb86afa5d71bc
2017-05-18 12:21:43 +00:00
Tobias Thierer
b371c7756a Merge "build/make/core: Fix fragile assumptions about build toolchain." 2017-05-18 12:04:31 +00:00
Tobias Thierer
e2a8da2683 build/make/core: Fix fragile assumptions about build toolchain.
- explicitly set the path where desugar will dump temporary class files.
  This ensures that the system property is set before it is read during
  InnerClassLambdaMetafactory.<clinit>. Before this CL, the system
  property was set by Desugar.createAndRegisterLambdaDumpDirectory(),
  which may run too late.

- explicitly specify -source 1.8 for droiddoc's javadoc run.
  Previously, the command used the language version of the build
  toolchain, which might fail due the backward-incompatible restrictions
  imposed by the proposed module system.

  Some Android build targets use LOCAL_JAVA_LANGUAGE_VERSION 1.7,
  but droiddoc combines sources from multiple build targets and there
  where no backwards incompatible changes in 1.8, so it should be fine
  to use 1.8 for code from either language level.

Bug: 38318052
Bug: 38225656
Bug: 38177295
Test: make clean && make checkbuild docs
      (using OpenJDK 8 toolchain)

Change-Id: Ie5fe0502dfe2f99fc58b1a723b7c18d5896a2646
2017-05-17 22:53:38 +01:00
Alan Leung
1f5a362c97 Merge "Allows DX alternative Jar." am: 26d769ea3f am: 16168c016d
am: 5065fe2130

Change-Id: I6763da75914cd41c1bf3f78593c276c171401d0b
2017-05-16 22:05:53 +00:00
Alan Leung
83857b6cbd Allows DX alternative Jar.
Test: m -j20 ANDROID_COMPILE_WITH_JACK=false DX_ALT_JAR=/mnt/m02/dx_alt.jar

Change-Id: I6163280101ff973bc8202a82d2fed42cf0ce6209
(cherry picked from commit b147846b67)
2017-05-16 13:34:42 -07:00
Dan Willemsen
0d1967d571 Merge changes Id0d167e6,I290a02b0 am: 90573e75a8 am: 9efa174836
am: a4d4cf335c

Change-Id: Ia59d32b0d533c4d37ac6f8950fbfb179c34b5db3
2017-05-10 02:52:21 +00:00
Dan Willemsen
5ec6bbc3d5 Implement clean-path
We shouldn't give non-clean paths to tools -- if a/b/../file was
specified, we can simplify that path to a/file, and not need to create
a/b just to make the path name work.

The testcases come from golang's filepath.Clean tests, this should be
compatible with that implementation.

Bug: 37716307
Test: TEST_MAKE_clean_path=true m -j blueprint_tools
Change-Id: I290a02b0a1e4a7c2b9255bca3c881589b521c402
2017-05-05 20:50:47 -07:00
Andreas Gampe
0d32327f3e Merge changes Idf48f45f,Id2a72fe7,If83e1df2 am: 2be7eb9161 am: 42ecd83de6
am: 6e43153ffd

Change-Id: I83e62e023e922a5283b0c70aaa403241bdeeae83
2017-05-04 04:56:59 +00:00
Treehugger Robot
2be7eb9161 Merge changes Idf48f45f,Id2a72fe7,If83e1df2
* changes:
  Build: Disable leak sanitizer for ijar
  Build: Disable leak sanitizer for llvm-rs-cc
  Build: Disable leak sanitizer for aapt
2017-05-04 04:47:04 +00:00
Colin Cross
761d673df4 Merge "Support LOCAL_JACK_ENABLED := javac_frontend" am: 64ed2f2478 am: d6a3273faa
am: eb2457b89e

Change-Id: I98104d161dcc709a764cb86750d3217538863fdb
2017-05-02 18:15:12 +00:00
Colin Cross
b17f285169 Support LOCAL_JACK_ENABLED := javac_frontend
Allow working around Jack bugs by using javac to compile *.java
to class files, and then pass through Jack for desugaring,
proguarding, and dexing.

Also make ANDROID_COMPILE_WITH_JACK=false override LOCAL_JACK_ENABLED.

Bug: 37483961
Test: m -j checkbuild
Test: Add LOCAL_JACK_ENABLED := javac_frontend to a target
Change-Id: I2189055aac9deccc36b8eab8e949796dddadf7a1
2017-04-28 13:39:12 -07:00
Andreas Gampe
48d9a5c80b Build: Disable leak sanitizer for ijar
Temporary workaround.

Bug: 37756495
Test: ASAN_OPTIONS= SANITIZE_HOST=address mm
Change-Id: Idf48f45f0c33fc57af29574c8591a532144d4623
2017-04-28 10:36:12 -07:00
Andreas Gampe
83c5c474b8 Build: Disable leak sanitizer for llvm-rs-cc
Temporary workaround. Disable leak detection and container
overflow.

Bug: 37755219
Test: ASAN_OPTIONS= SANITIZE_HOST=address m
Change-Id: Id2a72fe7170123f8652f96a0fed29d03f99ae03b
2017-04-28 10:36:12 -07:00
Andreas Gampe
c5bb0d736e Build: Disable leak sanitizer for aapt
Temporary workaround.

Bug: 37750224
Test: SANITIZE_HOST=address m
Change-Id: If83e1df25890717d18b841fa65635427ba2ee36a
2017-04-28 10:36:12 -07:00
Dan Willemsen
4e9e5d526c Merge "Rewrite link type checking" am: e4d92ef568 am: d76aaed983
am: e834d5f059

Change-Id: I02342b80077a7e1e36e61d1f9384d3b104a982c1
2017-04-20 15:15:19 +00:00
Dan Willemsen
e4d92ef568 Merge "Rewrite link type checking" 2017-04-20 15:04:08 +00:00
Dan Willemsen
b47d4e9cf1 Rewrite link type checking
All the new features are turned off for now, since multiple branches and
products need to be verified before they can be turned on. So everything
should behave the same as today, except for no partition-based
warnings.

Instead of the current link type checks that happen during the build,
run as many as possible immediately after loading all the Android.mk
files. If we're allowing missing dependencies ('mm',
ALLOW_MISSING_DEPENDENCIES, tapas, etc), we'll defer the link type
checks to during the build. If we're not allowing missing dependencies,
we'll produce a better error message to the user about the missing
dependencies.

See core/main.mk for a description of the storage format.

This also remove the partition-based type checking. It hasn't worked all
that well, particularly with ASAN builds. The new VNDK checks will
handle the most pressing cases.

Test: Verify all link_type files and dependencies are the same:
  grep link_type: out/build-aosp_arm64.ninja | sed -E "s/ rule[0-9]+//" | sort
Change-Id: Id643658b9d9e84f99f5db0d526aad88c1f5d3417
2017-04-19 22:41:32 -07:00