Commit graph

1068 commits

Author SHA1 Message Date
Nan Zhang
4988fa2ffe Merge "Fix the typo: "desugar-classpath" to "desugar-bootclasspath""
am: 9758900b56

Change-Id: I72160219c0559e39b83df007f7c607cbed8db5a1
2017-08-08 23:09:24 +00:00
Nan Zhang
f4571792f7 Fix the typo: "desugar-classpath" to "desugar-bootclasspath"
Test: runs "m -j checkbuild tests cts", and then --bootclasspath_entry
shows up in desugar command.

Change-Id: Ibcc8a3f51438723151c57f79e5a1184350efbd30
2017-08-08 13:38:59 -07:00
Tobias Thierer
2bdbb6e935 Omit module-info.class when unzipping jar files.
During the Android build process, multiple .jar files are
unzipped into the same directory. If the .jar is an OpenJDK 9
modular jar (with a module-info.class in the root directory),
the last module-info.class extracted will overwrite any earlier
module-info.class files extracted, and will cause all extracted
class files to be considered part of that module.

Therefore, this would break compilation under OpenJDK 9 (with
-target 1.9 -source 1.9). This CL fixes this by omitting the
module-info.class file (if present) when extracting the .jar.

This essentially turns any modular jar into a regular jar,
replacing the module with corresponding classes on the classpath.
This is sufficient for now because Android does not currently
support module dependencies.

Test: Treehugger
Bug: 38177569
Change-Id: Ia184e64d2f24b8ca79aeab1c00bd5da0386530bf
2017-08-08 20:09:54 +01:00
Colin Cross
a4e638689b Merge "Revert "Revert "Copy resources from classes.jar when using AAPT2"""
am: e2b98ace94

Change-Id: Id0850fff121beab0920e06440c7271d7622387b0
2017-08-04 21:02:35 +00:00
Colin Cross
303567c922 Revert "Revert "Copy resources from classes.jar when using AAPT2""
This reverts commit a7e336d17a.

Reapplies I6649f7f2fbf63ff5001f4731e22960f857726c70 with fix
for jack builds.

Bug: 64272170
Test: https://android-build.googleplex.com/builds/view-workplan?viewType=Table&workplanId=L93000000088657848&nodeType=Trybot
Change-Id: Id66aebfc2c26a4467e6cf25e4372080882f0b286
Merged-In: Id66aebfc2c26a4467e6cf25e4372080882f0b286
(cherry picked from commit 6fedebf936)
2017-08-04 09:35:13 -07:00
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
0dbee7c936 Slightly easier debugging of missing inputs to copy-file-to-target
Test: call copy-file-to-target without any inputs and read the quoted output
Bug: 36792868
Change-Id: I3a78f7ae4535ffe100b72458a3494ee398daf732
2017-07-14 13:04:05 -07: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
Colin Cross
bb7ba04031 Merge "Filter and colorize javac output V3" am: c8387929d1 am: f4ef1db272
am: 2f1488ae86

Change-Id: I73b5ca7a919c299aa062e5814f9f6b165f8c6527
2017-04-18 23:13:27 +00:00
Colin Cross
5f89212e24 Filter and colorize javac output V3
Add soong_javac_wrapper to all javac commands. soong_javac_wrapper
colorizes javac output, and hides noisy messages.

Previously attempted in I7e8fcd2e4e1ed3ff530a8ccfe931ceb7e411e0ad
and I449a61ed2c95b3e1afd51a31a11baab15d97e2f2.

Test: m -j ANDROID_COMPILE_WITH_JACK=false
Change-Id: I9d7a20d766fadab323a4cf95e5734741b3f578bb
2017-04-18 21:04:58 +00:00
Colin Cross
eadaf3663c Merge "Make mini-debug-info stripping pass on already stripped binaries" am: dd63df89d5 am: 4b69a9632e
am: 5040efa694

Change-Id: I75921fd256b694bb4d606c7aee2b3206d9a92d5c
2017-04-14 20:23:20 +00:00
Colin Cross
5e93057da4 Make mini-debug-info stripping pass on already stripped binaries
Prebuilts may already be stripped.  Instead of requiring every stripped
prebuilt to be annotated with LOCAL_STRIP_MODULE := false, just make
the default (mini-debug-info) pass through already-stripped modules
without failing.

Bug: 36793128
Test: m -j checkbuild
Change-Id: Iafc4614ceb91bbbb2e5ff82caefd18753f8961b1
2017-04-13 14:44:26 -07:00
Simran Basi
0b07a30ac8 Merge "Common testcase directories: Clean up duplicates" am: 4d15a84fc0 am: dce141bce8
am: 6f9ebf3c98

Change-Id: I41e04a59620eaf09e7f0bfc4e388ac4f1bb933d1
2017-04-12 08:27:19 +00:00
Treehugger Robot
4d15a84fc0 Merge "Common testcase directories: Clean up duplicates" 2017-04-12 08:10:20 +00:00
Colin Cross
e8ee68bb9b Support java annotation proccessors
The codebase is growing more uses of annotation processors,
through a mixture of LOCAL_ADDITIONAL_DEPENDENCIES and
LOCAL_JACK_FLAGS.  Add LOCAL_ANNOTATION_PROCESSORS and handle
the rest in the build system.

For now we also need LOCAL_ANNOTATION_PROCESSOR_CLASSES to
work around bad behavior in grok (b/25860419).

Test: m -j java
Change-Id: I465b021e65d25ed3ea517333a82ec4ebd63fc038
(cherry picked from commit cde14987ba)
2017-04-11 12:22:53 -07:00
Colin Cross
cde14987ba Support java annotation proccessors
The codebase is growing more uses of annotation processors,
through a mixture of LOCAL_ADDITIONAL_DEPENDENCIES and
LOCAL_JACK_FLAGS.  Add LOCAL_ANNOTATION_PROCESSORS and handle
the rest in the build system.

For now we also need LOCAL_ANNOTATION_PROCESSOR_CLASSES to
work around bad behavior in grok (b/25860419).

Test: m -j java
Change-Id: I465b021e65d25ed3ea517333a82ec4ebd63fc038
2017-04-11 09:56:09 -07:00
Colin Cross
99c83f2bda Merge "Rearrange java library outputs" am: 7b7363fffb am: a4435a5025
am: 09018269a8

Change-Id: I35b5527c4142f9486c6d57498789ba2249d0a4a3
2017-04-06 15:52:26 +00:00
Colin Cross
941b682099 Rearrange java library outputs
Jack can silently handle using a java library as a static java
library by merging in the java library dex file.  This causes
problems when switching to javac, because dex doesn't support
dex merging with multidex enabled?

Make the output files consistent between java libraries and static
java libraries.  Java libraries will now produce:
classes-pre-proguard.jar: the classes before proguard processing
classes.jar: the final jar file containing classes before dexing
javalib.jar: a jar containing classes.dex

Static java libraries will eventually only produce
classes-pre-proguard.jar and classes.jar.  All inter-library
linking is done with classes.jar, so a java library can be
used as a static java library.

There are too many dependencies outside the build system that
expect javalib.jar to exist for static and host java libraries,
so for now continue to build a javalib.jar that is a copy of
classes.jar.

Test: m -j ANDROID_COMPILE_WITH_JACK=false java
Test: m -j java
Bug: 36901093
Change-Id: I6730e2d3ec38004874265b2a690442dec57b33f4
2017-04-05 18:04:37 -07:00
Simran Basi
8a431d9c7d Common testcase directories: Clean up duplicates
This CL addresses the problem that native tests build for multiple
architectures and also build for host.

First it restructures each testcase folder to the following layout:
<testcase>/<testcase>.config
<testcase>/<arch 1>/testcase
<testcase>/<arch 2>/testcase

Secondly it now uses the new soong-zip prefix capability to
separate out host and target testcases in the device-tests &
general-tests zip files.

Bug:36692141
Test: `make device-tests general-tests cts -j` &
      ensured all built successfully.

Change-Id: I4e8b084ee56fa8940914911649ff35507d87eb27
2017-04-05 13:38:20 -07:00
Jaekyun Seok
39f97ae22a Enforce RROs for all the build-time ROs
This CL is to generate every static RRO package for its target package
automatically at build-time.

BOARD_ENFORCE_RRO build variable is added to specify whether enforcing
RRO is required or not.

BOARD_ENFORCE_RRO_EXEMPT_SOURCES build variable is added to specify
the module list of which item should be exempt from enforcing RRO.

Test: tested on bullhead and sailfish
Bug: 34097942
Change-Id: I455b2ce34e66c57a540c299b5e378b7c4e78d5b8
(cherry picked from commit 3070610b72)
2017-03-30 10:43:38 +09:00
Colin Cross
52573ac615 Merge "Revert "Revert "Revert "Add soong_javac_filter to all javac commands"""" am: df69a927d8 am: e088c648c7
am: af35fe9424

Change-Id: I067770d5129653c8502a5db020d963f1a0d8b43b
2017-03-30 01:06:21 +00:00
Treehugger Robot
df69a927d8 Merge "Revert "Revert "Revert "Add soong_javac_filter to all javac commands"""" 2017-03-30 00:53:06 +00:00
Colin Cross
fc8ead6609 Revert "Revert "Revert "Add soong_javac_filter to all javac commands"""
This reverts commit 440079b84b.

Adding the pipe interferes with error codes, which results
in an empty classes-full-debug.jar output file being left
after the failure.  The next build sees the output file with
an up-to-date timestamp and doesn't rerun the failing rule.

Bug: 36666657
Change-Id: I6658edb766d8ba3120f88e3d8d6eda6ea6c691da
2017-03-29 21:01:24 +00:00
Colin Cross
09e82eb89a Merge changes I0508b2cc,I3d6bbc36 am: 767cb900a1 am: 235e342639
am: 916de9606b

Change-Id: I824c89dc8f10912c60313023e5e1eecd610f36e3
2017-03-21 19:44:13 +00:00
Colin Cross
d01997faa6 Use DEFAULT_APP_TARGET_SDK for dx and desugar
DEFAULT_APP_TARGET_SDK is PLATFORM_VERSION_CODENAME (for example 'P')
for non-release builds, and PLATFORM_SDK_VERSION (for example 25) for
release builds.  Use it for dx and desugar, and translate
PLATFORM_VERSION_CODENAME to 10000 to enable features in the current
development version.

Bug: 36087246
Bug: 36118520
Test: m -j ANDROID_COMPILE_WITH_JACK=false
Change-Id: I3d6bbc36a8869e4ced6bb850bc32f37b4cba3f85
2017-03-21 10:23:45 -07:00
Dan Willemsen
402a0aea77 Merge "Revert "install *.so in different paths for their types"" am: 8311d46c86 am: 7195fb8920
am: 235042e404

Change-Id: Ic898d748ad303e5b09321a6ee2f21267ecc3731e
2017-03-17 23:01:53 +00:00
Dan Willemsen
de4e71b27b Revert "install *.so in different paths for their types"
This reverts commit 842a985f90. It's
causing test failures, warnings and complaints, so backing it out and
we'll resolve those before putting it back in.

This also bundles in the revert of a minor warning/error fixup for this
code, and does the correct thing with the CleanSpec.mk (which can't just
be reverted).

Bug: 33681361
Test: m -j
Change-Id: Ic889ce6a4737a497ad6bf633424ce1860713f7d0
2017-03-16 16:54:40 -07:00
Adam Lesinski
15c6791d76 Merge "Add LOCAL_ASSET_DIR support (-A) to aapt2" 2017-03-16 21:56:23 +00:00
Adam Lesinski
981de838d4 Add LOCAL_ASSET_DIR support (-A) to aapt2
Although performing the inclusion of assets/ at a later stage is
preferable, (since aapt just copies the files) do the easy thing and
support what aapt did. In the future perhaps we can zip up the
assets/ directories when also merging in the classes.dex.

Bug: 35461578
Change-Id: I7d7fde43333ea6455c4a1b9113bd25e1d88b7dd5
Test: manual
2017-03-16 04:53:05 +00:00
Adam Lesinski
7932676215 Revert "Add LOCAL_ASSET_DIR support (-A) to aapt2"
This reverts commit 996bc3ce7b.

Reason for revert: Need to update prebuilts, but prebuilts not built by server yet...

Change-Id: I87deb3ed9512278ff40c185059230dbd66524989
2017-03-15 07:00:41 +00:00
Adam Lesinski
996bc3ce7b Add LOCAL_ASSET_DIR support (-A) to aapt2
Although performing the inclusion of assets/ at a later stage is
preferable, (since aapt just copies the files) do the easy thing and
support what aapt did. In the future perhaps we can zip up the
assets/ directories when also merging in the classes.dex.

Bug: 35461578
Test: manual
Change-Id: I7cd36585e7c292e43b5528969900c6ead2b80c0b
2017-03-14 12:28:09 -07:00
Jaekyun Seok
3070610b72 Enforce RROs for all the build-time ROs
This CL is to generate every static RRO package for its target package
automatically at build-time.

BOARD_ENFORCE_RRO build variable is added to specify whether enforcing
RRO is required or not.

BOARD_ENFORCE_RRO_EXEMPT_SOURCES build variable is added to specify
the module list of which item should be exempt from enforcing RRO.

Test: tested on bullhead and sailfish
Bug: 34097942
Change-Id: I455b2ce34e66c57a540c299b5e378b7c4e78d5b8
2017-03-14 23:55:50 +09:00
Jiyong Park
3dd9a1fa0a Merge "install *.so in different paths for their types" am: 55b14bdaa4 am: a2b86b14a5
am: 5219726d7f

Change-Id: I68800d6dfd93d97a4c4b7eb0dbec239f734217ee
2017-03-14 00:31:46 +00:00
Treehugger Robot
55b14bdaa4 Merge "install *.so in different paths for their types" 2017-03-14 00:15:50 +00:00
Jiyong Park
842a985f90 install *.so in different paths for their types
Shared libraries are now installed to different directories depending on
their types.

* NDK libraries: /system/lib/ndk (with symlink from /system/lib)
* 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

However, if LOCAL_MODULE_PATH is explicitly set, then it is respected,
with a warning message. Module owners are highly encouraged to
investigate the warnings and use alternatives to LOCAL_MODULE_PATH;
combination of LOCAL_[PROPRIETARY|OEM|ODM]_MODULE, LOCAL_MODULE_CLASS
and LOCAL_RELATIVE_PATH will cover most of the cases.

Furthermore, for each shared libraries whose path is changed, a symolic
link from the original path to the new path is *temporarily* generated.
e.g. /system/lib/libbase.so -> vndk/libbase.so. This is
to prevent sudden breakage of the code expecting the lib from the old
path. This symbolic links will eventually be removed before O launch
(b/34917183).

Finally, BOARD_SAME_PROCESS_HAL_DEPS is added. It contains the list of
shared libraries implementing the same-process HALs and its internal sub
libraries. This is designed to be defined in BoardConfig.mk

Bug: 33681361
Test: build & run. Libraries must be in the correct directories.
Symlinks from the old path to the new path must exist.

Change-Id: I46130aac09ae65400fd4d0abbc2e12dddd154fb1
2017-03-13 08:27:09 +09:00
Sen Jiang
67b7aaab7d Merge "Remove DBus support." am: cf858d873b am: efcda5173d
am: 3d6b408aea

Change-Id: I183f58049ef63ce8f6bfbd67554199878b7a69cb
2017-03-03 21:02:37 +00:00
Sen Jiang
cf858d873b Merge "Remove DBus support." 2017-03-03 20:54:38 +00:00
Vijay Venkatraman
de308c19d4 Merge "Fix for compile error when BUILD_HEADER_LIBRARY is used" am: 69e8252aec am: e4f88be6ed
am: 2f2d4b79b5

Change-Id: I852d671b730978af3595fa5041689cc37bc3a53a
2017-03-03 04:19:40 +00:00
Vijay Venkatraman
69e8252aec Merge "Fix for compile error when BUILD_HEADER_LIBRARY is used" 2017-03-03 04:10:50 +00:00
Sen Jiang
d1f397e8b4 Remove DBus support.
external/dbus and external/dbus-binding-generator was removed from
the manifest.

Bug: 31602715
Test: make checkbuild
Change-Id: Iea0277720acad8ac0fa630b8745f90fb3c3b5f00
2017-03-02 18:00:21 -08:00
Vijay Venkatraman
465b17fc3c Fix for compile error when BUILD_HEADER_LIBRARY is used
Test: include $(BUILD_HEADER_LIBRARY) in Android.mk and compile
Change-Id: If720be2d73b1c026961c75b65d82887b5dd41442
2017-03-02 11:47:33 -08:00
Steven Moreland
5a9cfecc85 Merge "Add PRODUCT_FULL_TREBLE." am: 5236e11c54 am: 848e9430bc
am: e1de7cd45a

Change-Id: I335f68e8d49538a7539cfb2e751d2c34cb52e260
2017-03-02 04:49:28 +00:00
Steven Moreland
c10f1413d5 Add PRODUCT_FULL_TREBLE.
PRODUCT_FULL_TREBLE: whether the device has Treble fully enabled (no
passthrough hals, vendor.img, split sepolicy, etc..)

PRODUCT_FULL_TREBLE_OVERRIDE: used if someone wants to consider a device
as full Treble even if it didn't launch with Android O.

Bug: 35809750
Test: PRODUCT_FULL_TREBLE set appropriately with
PRODUCT_FULL_TREBLE_OVERRIDE and PRODUCT_SHIPPING_API_LEVEL = 24/25

Change-Id: I069448beaf26c70acb6c45d4228d8fdfe9476410
2017-03-01 19:08:24 -08:00
Simran Basi
fdf88008d7 Merge "Add support for multiple LOCAL_COMPATIBILITY_SUITES & undefined testcase directories." am: 6abedc9b3e am: 22cc401165
am: 7fa662af82

Change-Id: I010caf27bae2b65f47c9d92c37f3d5b456fa6397
2017-02-28 23:50:39 +00:00
Treehugger Robot
6abedc9b3e Merge "Add support for multiple LOCAL_COMPATIBILITY_SUITES & undefined testcase directories." 2017-02-28 23:42:18 +00:00
Simran Basi
6bea37c7fa Add support for multiple LOCAL_COMPATIBILITY_SUITES & undefined testcase directories.
1) Updates the LOCAL_COMPATIBILITY_SUITE line to allow for a
   testcase to belong to multiple suites.
2) Building testcases no longer fails if
   COMPATIBILITY_TESTCASES_OUT_<suite> is not defined. This
   testcase will just not output to that directory.
   This will be utilized by the device-tests and general-tests
   suites that don't require any extra output besides the common
   testcase directory.

Bug: 35394351
Test: 1) Added multiple *TS testcases to cts & vts and verified they
       ended up in the common directory and each suite's testcase
       directory. Specifically tested CtsSplitApp to ensure the
       split usecase still works as well.
      2) Added a CTS testcase to the device-tests suite, built
       device-tests and verified the cts/android-cts/testcases
       copy was not produced.

Change-Id: Ic4c4e87e62be4fc0c5e394d88cc359518346dffa
2017-02-28 12:41:40 -08:00
Dan Willemsen
433e7e4d45 Merge "Add progress indicator to Android.mk includes" am: 353a659a31 am: 100edc4a4c
am: d2445ea0b2

Change-Id: Ib60190f62fc78e261b6d02287bf8f68891bd7d12
2017-02-24 18:01:52 +00:00
Dan Willemsen
353a659a31 Merge "Add progress indicator to Android.mk includes" 2017-02-24 17:50:13 +00:00
Colin Cross
8b0034c435 Merge "Pass min sdk version to dx and desugar" am: bbad7c3e1f am: 4a4325d313
am: 14fce4b072

Change-Id: If9ac3b69957689bd451fc97fe968d79f42a751e9
2017-02-23 18:24:46 +00:00
Colin Cross
bbad7c3e1f Merge "Pass min sdk version to dx and desugar" 2017-02-23 18:18:38 +00:00
Dan Willemsen
33631b3580 Add progress indicator to Android.mk includes
Test: m -j
Change-Id: I1e6fd020a06b49c243be14953d9f417e64ac7b8b
2017-02-22 11:20:51 -08:00
Colin Cross
536ef4e35a Pass min sdk version to dx and desugar
Test: make checkbuild
Change-Id: Idde9712508571ea623126c7d25d2fa67eccf4833
2017-02-22 11:10:37 -08:00