Commit graph

8513 commits

Author SHA1 Message Date
Søren Gjesse
ccdf23f37e Merge "Don't include data resources when running R8"
am: 49c1cb35f3

Change-Id: Ida81a239bcb279a9123db13bcbbcc2d1005201c4
2018-09-17 23:34:08 -07:00
Søren Gjesse
49c1cb35f3 Merge "Don't include data resources when running R8" 2018-09-18 06:22:21 +00:00
Pirama Arumuga Nainar
18415bbb52 Merge "Link msvcr110.a after mingwex.a"
am: cc737f6fe0

Change-Id: I490b3a68e8994b6265118002359ff52563c32367
2018-09-17 22:37:18 -07:00
Treehugger Robot
cc737f6fe0 Merge "Link msvcr110.a after mingwex.a" 2018-09-18 05:20:36 +00:00
Sundong Ahn
19144c8861 Merge "Change the dist file path for sdk library"
am: 6b3cc607f3

Change-Id: I59bfa592850dec8297b6fef4a2319316f63790f2
2018-09-17 19:56:14 -07:00
Treehugger Robot
6b3cc607f3 Merge "Change the dist file path for sdk library" 2018-09-18 02:29:44 +00:00
Colin Cross
5067db9d02 Allow instrumenting android_test modules.
android_test modules should have Instrument = true like android_app
modules so that they get instrumented when EMMA_INSTRUMENT=true.

Bug: 115929955
Test: m EMMA_INSTRUMENT=true
Change-Id: I2c0e8ab95d2cdc47fc28af9c7264ab544d0e7a28
2018-09-17 16:46:35 -07:00
Pirama Arumuga Nainar
e5d974d67a Link msvcr110.a after mingwex.a
Bug: http://b/115909626

Some executables linked with msvcr110.a before mingwex.a loop on start
up with the following message:
    err:ntdll:RtlpWaitForCriticalSection section 0x7fdcb000 "?" wait
        timed out in thread 0009, blocked by 0000, retrying (60 sec)

https://android-review.googlesource.com/c/758688/ has a reproducer.

Test: The reproducer above works, and verify that few Windows binaries
behave correctly (print help message and such).

Change-Id: I837f421532d86f73713d70b3d93609b50d238af9
2018-09-17 23:33:28 +00:00
Colin Cross
d546014474 Merge "Don't attempt to deflate when compression level is 0"
am: 37dc2c26f0

Change-Id: I83e4e6d7e81d08bf7922edb72111c73be2c380b2
2018-09-17 14:28:48 -07:00
Colin Cross
37dc2c26f0 Merge "Don't attempt to deflate when compression level is 0" 2018-09-17 21:20:59 +00:00
Jiyong Park
afe9fa5432 Merge "Add OutputFile to cc.Module"
am: cc2746d1f2

Change-Id: I1c8c59dd6ea327cdaa9b6aca3db9008ef6690200
2018-09-17 13:22:03 -07:00
Treehugger Robot
cc2746d1f2 Merge "Add OutputFile to cc.Module" 2018-09-17 20:03:09 +00:00
Sundong Ahn
4fd04bb506 Change the dist file path for sdk library
The dist file path is changed from apistubs/{api_scope}/*.jar to
apistubs/{owner}/{api_scope}/*.jar. it makes easy to get stub files
when updating prebuilts/sdk by making it possible to distinguish
between Android libraries and Google libraries.
And Onwer() function is added to ModuleBase for getting onwer info.

Test: make -j40 PRODUCT-sdk_phone_armv7-sdk dist sdk_repo
Change-Id: I50069aff6664901e6c9129d69643a414ee5e41d0
2018-09-17 09:43:30 +00:00
Dan Willemsen
2e224cae8e *_OUT_INTERMEDIATE_LIBRARIES has been removed from Make
So LOCAL_COPY_TO_INTERMEDIATE_LIBRARIES is no longer necessary. And just
export the object paths directly to make instead of copying into the
intermediate libraries directory.

Test: m
Change-Id: Iba1523aec642fc81e9bf61da3125f714e91cd557
2018-09-15 10:46:17 -07:00
Colin Cross
d321629155 Don't attempt to deflate when compression level is 0
soong_zip -L 0 would attempt to compress with deflate at compression
level 0, then pick store instead of deflate because the overhead of
deflate would always make it larger than the uncompressed size.  Just
use store instead.

Test: m checkbuild
Change-Id: I69610bd755b55d97a47b8c6cf4fbbee3b5632db6
2018-09-14 20:20:13 -07:00
Colin Cross
db52052a65 Don't pass -pie for Windows binaries
am: 446c666672

Change-Id: Ib25160a25da26811ea34435e2d7dc532b3eaf7c3
2018-09-14 18:23:30 -07:00
Colin Cross
446c666672 Don't pass -pie for Windows binaries
Passing -pie to clang for Windows binaries causes a warning:
clang-7: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]

Bug: 115776263
Test: m checkbuild
Change-Id: Ie502a05dac32c192c38953c684dc80d1db24b792
2018-09-14 23:02:31 +00:00
Mathieu Chartier
cff48ff9d3 Merge "Change LibartImgDeviceBaseAddress to 0x60000000"
am: 1278a6ce77

Change-Id: I370b69e381b6500f2953ec1fef069697d211ebdd
2018-09-14 12:58:09 -07:00
Mathieu Chartier
1278a6ce77 Merge "Change LibartImgDeviceBaseAddress to 0x60000000" 2018-09-14 19:35:45 +00:00
Søren Gjesse
24f1702872 Don't include data resources when running R8
The change https://r8-review.googlesource.com/c/r8/+/26482 made R8
process data resources by default. This is not expected for the
Android Platform build

Test: m -j PRODUCT-aosp_x86-userdebug core-oj
Change-Id: Idb17e39dae524dacf4b258c9f27be86e3179667f
2018-09-14 15:20:42 +02:00
Colin Cross
570e96acc1 Merge changes from topic "hostdex"
am: ec06db2709

Change-Id: I55875e8bdabeaf4f5a444e605af1f851709c32e8
2018-09-13 17:24:09 -07:00
Colin Cross
ea5d9b3744 Allow '$' in some paths
am: fe4bc36f87

Change-Id: If830da8b53928a8b563f8afc49289ca52cfeaa23
2018-09-13 17:23:43 -07:00
Nan Zhang
ae21e36c8a Add Api level annotations support for Metalava.
am: 9c69a126d5

Change-Id: Ic7af49f60a89bf1a7285b5988b4b6a0fcb5f14c7
2018-09-13 17:18:02 -07:00
Colin Cross
ec06db2709 Merge changes from topic "hostdex"
* changes:
  Allow exclude_java_resources to affect java_resource_dirs
  Allow '$' in some paths
2018-09-13 22:49:21 +00:00
Colin Cross
cedd4768f5 Allow exclude_java_resources to affect java_resource_dirs
Allow excluding files from directory globbed by java_resource_dirs.

Test: java_test.go
Change-Id: I9922842248be1a386ab111a5187608438638ffb1
2018-09-13 18:28:03 +00:00
Colin Cross
fe4bc36f87 Allow '$' in some paths
The icu resource directories contain filenames that have '$'
characters.

Allow paths returned by the Glob functions to contain '$', on the
assumption that real paths on disk are unlikely to contain strings
that are valid ninja variables.  Fix the Build rules to escape any
paths that are passed as Path arguments.  Fix the resource rules to
manually escape the paths that are passed as strings.

Test: m checkbuild
Change-Id: Ie631bc6d96259e592adb280491a365c0df7ed0e2
2018-09-13 18:27:50 +00:00
Jiyong Park
c20eee3605 Add OutputFile to cc.Module
APEX needs to know the location of the output file of cc.Module to copy
it to an intermediate directory and package there.

Bug: 112672359
Test: m apex.test
Change-Id: Iaa19b29c2859df96f50716001dbd57df3f596050
2018-09-13 12:45:00 +09:00
Nan Zhang
9c69a126d5 Add Api level annotations support for Metalava.
Test: m -j docs with Api level annotations enabled.
Bug: b/78245848

Change-Id: Ife93899cdcf5b54ee0c75003c295aa4b917d3dba
2018-09-12 16:32:01 -07:00
Nan Zhang
7817e98fff Merge "Split doclava run from metalava target."
am: c747535cc2

Change-Id: Id3fa2afc6c61ea57d2896e7d3b93f3069841ca70
2018-09-12 13:39:18 -07:00
Nan Zhang
c747535cc2 Merge "Split doclava run from metalava target." 2018-09-12 18:15:11 +00:00
Neil Fuller
702a9f638c Add a new sdk_version "core_platform_current"
am: 3c979c3348

Change-Id: I6432d30e8a114be4330f52b8f5d63f38bd235ebb
2018-09-12 08:04:59 -07:00
Neil Fuller
3c979c3348 Add a new sdk_version "core_platform_current"
Add a new sdk_version "core_platform_current"
value to java_library.

This adds the ability to compile system code against the
core platform API stubs. These stubs will contain the public SDK
API _and_ a selection of extra methods just intended
for use by system code (e.g. framework .jar) and
which must be preserved if "core" is modularized to
retain source and binary compatibility. Methods
outside of the core platform API must not be relied upon.

Future changes will adding methods to the core platform API and
switch targets over to use the stubs.

As soon as feasible, (hopefully) the default for when
unspecified will be changed to be the same as specifying
core_platform_current and build rules will have to explicitly
specify when they want to compile against the core library
implementation directly.

Bug: 113148576
Test: mmm libcore/mmodules/core_platform_api_client_demo
Change-Id: I72a03f28a4c38b4232e513a088c2d4e962c98868
2018-09-12 07:29:26 +00:00
Nan Zhang
1598a9e099 Split doclava run from metalava target.
Originally when metalava sees arg: "--generate-documentation", it will
create a seperate process to invoke javadoc/dokka.

Now this is handled by our build system. Basically metalava target will
only generate a .srcjar file. Any other droiddoc target which generates
docs can depend on this metalava target.

By doing this, if multiple doc targets depending on the same metalava
sources. The metalava won't need to be re-run by multiple times which
could cause quite some timing overhead.

Test: m clean && m -j core-docs and
compare the results using md5sum between the old and new content.
also m clean && m -j core-current-stubs-gen-docs and
compare the results using md5sum  between the old and new content.
Bug: b/78245848

Change-Id: If7deef0da738645efe7d3a8376ff2bb3dec92c01
2018-09-11 15:41:50 -07:00
Colin Cross
83c49af8c2 Merge "Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules"
am: b1dff80c0e

Change-Id: I8c36a86c4bcfabe542583843794c1bb0329ce1ce
2018-09-11 15:01:30 -07:00
Colin Cross
e3d6836f02 Merge "Enable toc support for Darwin and Windows"
am: d3ab493fa0

Change-Id: I5041fd3a6fc03ddd2f143de275755d7e5efd8a8d
2018-09-11 15:01:14 -07:00
Tobias Thierer
0c928f3459 Merge "Enable Java 9 language support through java_version: "1.9" alone."
am: bc21394679

Change-Id: I71b6f7a475945664409ae0ba036e9ed33c6d8550
2018-09-11 15:00:59 -07:00
Colin Cross
b1dff80c0e Merge "Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules" 2018-09-11 21:51:25 +00:00
Treehugger Robot
d3ab493fa0 Merge "Enable toc support for Darwin and Windows" 2018-09-11 21:43:04 +00:00
Treehugger Robot
bc21394679 Merge "Enable Java 9 language support through java_version: "1.9" alone." 2018-09-11 21:40:55 +00:00
Tobias Thierer
06dd04f20e Enable Java 9 language support through java_version: "1.9" alone.
Some logic in java.go was conditional on TargetOpenJDK9(), which in
turn relies on a global build flag (EXPERIMENTAL_USE_OPENJDK9=true).
This CL changes the logic in collectBuilderFlags() to check for
javaVersion greater or equal "1.9" instead, which is true when either
EXPERIMENTAL_USE_OPENJDK9=true (global) or javaVersion "1.9" (a
per-build target attribute).

Because the value of flags.javaVersion isn't available there,
TargetOpenJDK9()-dependent logic in Module.deps() was changed to
be unconditional; as far as I understand, this means that system
modules deps will be built regardless of whether they're needed
later in the build. This will probably slow down the build
unnecessarily until the first user of these system modules appears
(expected soon), but probably not by much.

There is some TargetOpenJDK9() related logic remaining in droiddoc.go,
but this doesn't seem to break the build of Java 9 language sources
and is probably no longer needed now that metalava is used for
generating the stubs (thanks to Nan!), and those do not contain any
Java 9 language features.

Bug: 112443425
Test: Checked that Java 9 language support works on AOSP after
      this CL without a need for EXPERIMENTAL_USE_OPENJDK9=true,
      ie. after also patching CL http://r.android.com/646840 ,
      "make docs droid cts" completes, the device boots and
      Java9LanguageFeaturesTest passes.

Change-Id: I393b97a7b3bb4c1c3d06580c639e94ff6cf916ff
2018-09-11 19:54:28 +01:00
Colin Cross
b60190a4f8 Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules
Export Soong cc modules to Make using a new soong_cc_prebuilt.mk that
bypasses all of prebuilt_internal.mk, dynamic_binary.mk and binary.mk.
This also means that stripping is handled in Soong instead of Make.

Relands If9008c50920779048480f5eeeb0084f26006c998 with fixes for
mac builds.

Bug: 113936524
Test: m checkbuild
Change-Id: I9710ff57f0793f36eb889eabd08bd60a365a88dd
2018-09-10 23:12:12 -07:00
Colin Cross
b496cfd9d2 Enable toc support for Darwin and Windows
Bug: 113936524
Test: m checkbuild
Change-Id: I0f2030ad75daae2cbe44e8cbedad329d33df55f7
2018-09-10 23:12:11 -07:00
Dan Willemsen
84fc41083f Merge "Default BUILD_BROKEN_PHONY_TARGETS to false"
am: bd4e9cc42a

Change-Id: I226585bb23c1b2cec16b354043ac9d8080a396bd
2018-09-10 18:58:00 -07:00
Treehugger Robot
bd4e9cc42a Merge "Default BUILD_BROKEN_PHONY_TARGETS to false" 2018-09-11 01:50:02 +00:00
Colin Cross
6d54d291c8 Make manifest_fixer.py keep targetSdkVersion high with min_sdk_version
am: 7b59e7b2d0

Change-Id: I5acccdf24e02d3d06b0c76107af363076f8b57ff
2018-09-10 17:07:27 -07:00
Colin Cross
1e6d807d67 Fix manifest_fixer_test.py
am: 496d66d425

Change-Id: Ie43662c13a0c5847422f7188471bddf8e4d2260d
2018-09-10 17:07:22 -07:00
Colin Cross
091f645959 Merge "Revert "Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules""
am: cf7d5ab6d6

Change-Id: I27654214955fadaa4e454f5fe09158d76782da1c
2018-09-10 14:44:12 -07:00
Colin Cross
7b59e7b2d0 Make manifest_fixer.py keep targetSdkVersion high with min_sdk_version
targetSdkVersion should stay as "current" when min_sdk_version
is set but sdk_version is not.

Bug: 112438448
Test: atest CtsTelecomTestCases
Change-Id: I11dc27eccd31200d1ce27c7e332106bb825651b4
2018-09-10 14:41:56 -07:00
Colin Cross
496d66d425 Fix manifest_fixer_test.py
Fix tests after I8fcf0c5f452707565ba1808f6fe552ffed055c47.

Test: manifest_fixer_test.py
Change-Id: Ie55e28b537b960a5e0f4785eda2c0f619b89275c
2018-09-10 14:41:56 -07:00
Colin Cross
cf7d5ab6d6 Merge "Revert "Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules"" 2018-09-10 21:36:38 +00:00