Commit graph

10360 commits

Author SHA1 Message Date
Colin Cross
baa676f671 Fix RuleBuilder.Restat
RuleBuilder.Restat wasn't being propagated to the rule.

Test: rule_builder_test.go
Change-Id: Ie64c8076692ea10a0c47ed5a8832e3f553bea0fc
2019-03-05 03:17:33 +00:00
Colin Cross
4c83e5ccd4 Support testing Rules in Modules and Rules and Builds in Singletons
Add support for TestingModule to return RuleParams for rules created
by the module.

Refactor TestingModule to use helpers, and use the helpers to
implement a similar TestingSingleton.

Use the new functionality to test RuleBuilder's module and singleton
rules.

Test: none
Change-Id: I8348c56ff5086d0c49401f5a00faf7c864e6b6f3
2019-03-05 03:17:26 +00:00
Colin Cross
87ecbfe107 Update manifest merger to use binary
Manifest merger is now a java_binary instead of a collection of jars,
it can use the single binary as the dependency.

Bug: 112607039
Test: m checkbuild
Change-Id: Iea6c97c99a3bb09952fed2b25437b644f4e863f8
2019-03-04 22:02:01 +00:00
Colin Cross
0b9f31fb08 Replace *Escape with *EscapeList
Follow the change to blueprint to make *Escape take and return a string
and add *EscapeList that take and return slices of strings.  Fix up
a few places that were unnecessarily converting a string to a slice
and back to a string.

Test: m nothing
Change-Id: I3fa87de175522205f36544ef76aa2f04aef1b936
2019-03-04 18:11:53 +00:00
Pirama Arumuga Nainar
7abf560cb0 Merge "Enable coverage universally if COVERAGE_PATHS includes "*"" 2019-03-04 16:31:51 +00:00
Mark Salyzyn
f57bfee1d1 Merge "Add required: to debuggable" 2019-03-04 15:14:02 +00:00
Treehugger Robot
4be65809d7 Merge "Ignore missing prebuilt_apis of java_sdk_library" 2019-03-04 07:20:55 +00:00
Treehugger Robot
cc5b384ea5 Merge "Build System: Collect native dependent information from cc.go." 2019-03-04 06:01:10 +00:00
Inseob Kim
38449af64f Ignore missing prebuilt_apis of java_sdk_library
Building java_sdk_library without defining prebuilt_apis has been
failing with weird error messages. So one have to touch empty txt files
and create prebuilt_apis module, even when the java_sdk_library is
brand-new and has no previous versions. This commit fixes it so that API
check against previous version is skipped, in the case of missing
prebuilt_apis.

Note that Current api txt files (placed under api/ directory) are still
needed (make update-api)

Bug: 126259114
Test: tries to build without touching empty api txt files.
Change-Id: I93630f4139cbf502621693ec315dc06c0d07d1c3
2019-03-04 10:56:53 +09:00
bralee
3f49f4d469 Build System: Collect native dependent information from cc.go.
Bug: 126957990
Test: 1. m aidegen
      2. $ANDROID_HOST_OUT/bin/aidegen-dev frameworks/native -v
      3. open out/soong/module_bp_java_deps.json
         check *.a and *.so files are added.

Change-Id: I82ba49d023621908f0be12abf529553aee45fa5b
2019-03-04 06:58:15 +08:00
Colin Cross
247e0cfaa4 Don't add static libs resources to implemenation jars
Static dependency resources will already be in the resources jar
and the implementation and resource jar, they shouldn't be in
the implementation jar.

Test: m checkbuild
Change-Id: I4d4dab1d2e55e92ba9a95a66b246c721b9bf6410
2019-03-03 11:34:47 -08:00
Julien Desprez
afbddd8ddd Merge "Autogenerate some extra_options based on some build properties" 2019-03-02 00:44:54 +00:00
Pirama Arumuga Nainar
4e128282f2 Enable coverage universally if COVERAGE_PATHS includes "*"
http://b/116873221

This will be used in a target in the build server to build all native
code with coverage.

Test: 'm NATIVE_COVERAGE=true COVERAGE_PATHS=* nothing' works as
expected.

Change-Id: I55d644ed9212c4ab0f1e4a00aac3a467fcf2a463
2019-03-01 16:17:53 -08:00
Treehugger Robot
29496d750b Merge "Update reference doc link to ci.android.com" 2019-03-02 00:06:12 +00:00
Mark Salyzyn
aaf53538bb Add required: to debuggable
Permit product_varables: { debuggable: { required: ["remount"], }, },
so that we can add debug dependencies between build objects.

Test: compile
Bug: 122602260
Change-Id: Ibb4c5bf368f90fdb007d30b6c1da63cb9d4c6467
2019-03-01 15:14:52 -08:00
Treehugger Robot
c8f83aef50 Merge "Revert $(LOCAL_PATH) handling for certificate and additional_certificates properties." 2019-03-01 22:47:53 +00:00
Dan Willemsen
b2fbbbb993 Update reference doc link to ci.android.com
The built reference documentation is now hosted publicly.

Test: check the link in gitiles
Change-Id: I69c90f2d74f1e7535054aed115930a293057ad48
2019-03-01 13:13:20 -08:00
Julien Desprez
eb7398ea79 Autogenerate some extra_options based on some build properties
If an Android.bp specifies Isolated=true, make sure
it's tagged as not-shardable, since b/126376458 is not
resolved.

Test: make bionic-benchmarks-tests (with and without isolated=true)
Bug: 124024827
Change-Id: I2210c15b84f9b30e1cc23b426d463b34cf9ef94f
2019-03-01 11:42:17 -08:00
Sasha Smundak
aa7fdad7f3 Revert $(LOCAL_PATH) handling for certificate and
`additional_certificates` properties.

Bug: 122728056
Test: builtin tests
Change-Id: I96f84bf7396447b0207438a4073c864f2d9b1ab7
2019-03-01 11:11:10 -08:00
Colin Cross
6db4d4e613 Optimize CPU time when running d8 and r8
Pass -XX:+TieredCompilation -XX:TieredStopAtLevel=1 to the JVM to
reduce the time spent JITing, which in local experiments reduced
the CPU time of R8 while increasing the wall time, and reduced the
total number of runnable threads.

Without the new flags:
$ time out/soong/host/linux-x86/bin/r8-compat-proguard -injars out/target/common/obj/APPS/Dialer_intermediates/classes.jar ...
real	0m30.090s
user	4m35.337s
sys	0m12.853s

With the new flags:
$ time out/soong/host/linux-x86/bin/r8-compat-proguard -JXX:+TieredCompilation -JXX:TieredStopAtLevel=1 -injars out/target/common/obj/APPS/Dialer_intermediates/classes.jar ...
real	0m35.674s
user	2m45.135s
sys	0m9.531s

The increase in wall time should be offset by the better parallelism from
the reduced CPU time.

Bug: 119270658
Test: m checkbuild
Change-Id: I8fc78b5ef1f8c6f51fd97a29461b96ae2b35cada
2019-03-01 15:28:19 +00:00
Colin Cross
292d6cfd73 Merge "Move boot image oatdump phony rules into Soong" 2019-03-01 15:27:35 +00:00
Paul Duffin
e28d0c0ff3 Merge changes Ib0389900,Ib2d69dea
* changes:
  Fix hiddenapi issue when REMOVE_ATB_FROM_BCP=true
  Improve hiddenapi processing so it does not require white list
2019-03-01 09:04:39 +00:00
Colin Cross
c9a4c36634 Move boot image oatdump phony rules into Soong
The boot image oatdump rules depend on the details of dexpreopting
the boot image.  Instead of exporting all of the necessary values
to make, move the rules into Soong instead.  Also removes the
ART_DUMP_OAT_PATH variable, and moves the output to
out/soong/boot.*.oatdump.txt.

Test: m dump-oat-boot
Change-Id: I055b1c39918ba3425c8393b3e1b5359df055472a
2019-02-28 22:00:21 -08:00
Treehugger Robot
f8711f053c Merge "Add support for including py_binary and *_go_binary in apexs" 2019-03-01 03:57:51 +00:00
Jaewoong Jung
ce3de3df0f Merge "aapt2 flag for target manifest package override" 2019-03-01 03:24:25 +00:00
Treehugger Robot
10d21fdcb9 Merge "Add path valid check" 2019-03-01 02:34:58 +00:00
Alex Light
778127a041 Add support for including py_binary and *_go_binary in apexs
These additional binary types are useful for some apexs. Add the
ability to include them. Due to the nature of the resulting artifacts
only py binaries with embedded launchers and host go binaries are
supported.

Test: m com.android.support.apexer
Bug: 119332365
Bug: 119332362
Change-Id: I27c253d3647cf7bbe15896610d7a74a5f93e8bec
2019-03-01 01:56:14 +00:00
Jaewoong Jung
4102e5dca3 aapt2 flag for target manifest package override
This change adds an aapt2 flag, rename-instrumentation-target-package,
when an android test's instrumention target module's manifest package
name is overridden.

Bug: 122957760
Test: app_test.go, atest DocumentsUITests
Change-Id: I7116a51ec5ec9d61a20cd28509b3af0e383730d7
2019-02-28 15:41:45 -08:00
Treehugger Robot
ef36053829 Merge "Revert "Add override_module."" 2019-02-28 23:10:33 +00:00
Alex Light
6a48032fc9 Merge "Add java_* 'services:' field" 2019-02-28 17:05:01 +00:00
Jaewoong Jung
acb6db331b Revert "Add override_module."
This reverts commit aa65e17016.

Reason for revert: Not compatible with PRODUCT_PACKAGES, and so has very limited use.

Change-Id: Ib141d3984a6f12bb50989e66037494c466b066f1
2019-02-28 16:22:30 +00:00
Paul Duffin
719fed4e95 Fix hiddenapi issue when REMOVE_ATB_FROM_BCP=true
If the android.test.base is not on the bootclasspath then its stubs
should not be used as input to the hiddenapi processor.

Bug: 73711752
Test: make REMOVE_ATB_FROM_BCP=true droid && atest -p cts/tests/signature
Change-Id: Ib03899001e4350c9ad9e757e9e6d7d41bb0a3896
2019-02-28 16:15:44 +00:00
Paul Duffin
d2acecaeb7 Improve hiddenapi processing so it does not require white list
Rather than have a special white list to contain the names of modules
that provide additional hiddenapi for modules on the bootclasspath
this defines a convention that such modules must have a name which is
of the format <x>-hiddenapi, where <x> is the name of the module on the
bootclasspath.

Bug: 73711752
Test: make droid && flashall -w && atest -p cts/tests/signature
Change-Id: Ib2d69dea9541b60a9bb81496f00edb65036d1ebb
2019-02-28 16:13:20 +00:00
Paul Duffin
724c5fd813 Merge "Revert "Support libraries (not just boot jars) that have hiddenapi"" 2019-02-28 13:25:08 +00:00
Roland Levillain
2833d984fb Merge "Fix soong.android.RuleBuilderCommand.FlagWithList's comment." 2019-02-28 10:58:52 +00:00
Sundong Ahn
ae418acbab Add path valid check
The path valid check is added for avoiding panic message

Bug: 126612123
Test: tapas tradefed-all && make -j40

Change-Id: I76b79d5040db7168d8a8879f64349846005333b5
2019-02-28 16:51:53 +09:00
Treehugger Robot
b709575a75 Merge "Add override_module." 2019-02-28 03:46:23 +00:00
Alex Light
7f004a765b Add java_* 'services:' field
Some libraries rely on the java.util.ServiceLoader system to access
classes. Allow java_* targets to specify the services that should be
exposed there.

Test: m jdi-support
Bug: 124507633

Change-Id: I253a87033563e3aebc50250fe2252d80d2883815
2019-02-27 23:14:47 +00:00
Jaewoong Jung
be977a0edd Merge "Add a filename to anchor links in build docs." 2019-02-27 22:38:19 +00:00
Jaewoong Jung
aa65e17016 Add override_module.
This new module type replaces the inherit-package function in make by
allowing developers to override the name, the certificate, and the
manifest package name of an android_app module.

Bug: 122957760
Fixes: 123640028
Test: app_test.go + BrowserGoogle
Change-Id: Iefe447e7078b25039233221361ef95c83a29973a
2019-02-27 14:35:39 -08:00
Patrice Arruda
368a97286b Merge "Add a host prebuilt module type for usr/share." 2019-02-27 22:10:31 +00:00
Colin Cross
2cdd5df7cc Fix Rel() after ReplaceExtension or InSameDir
Copying p.rel doesn't work, as rel needs to match the end of the
value in path.  Apply the same transformation to p.rel as p.path.

Test: paths_test.go
Change-Id: I42d676c6c4fc18d9852c1a73f25e5a791d7553d0
2019-02-27 20:23:25 +00:00
Jaewoong Jung
d10f484eee Add a filename to anchor links in build docs.
The href base added by I8a8ac0f9ba6c0d57ed83db2155955a95e070a265
doesn't really play nice with anchor links. This fixes the issue.

Fixes: 126550408
Test: m soong_docs
Change-Id: If62411a6391fd8151fa40cb2ecf32c5006797d6c
2019-02-27 11:15:00 -08:00
Roland Levillain
2da5d9a5fe Fix soong.android.RuleBuilderCommand.FlagWithList's comment.
Test: n/a
Change-Id: I96158244feaaaa25ada02275e20418ac30218004
2019-02-27 16:56:41 +00:00
Paul Duffin
c02e834ad6 Revert "Support libraries (not just boot jars) that have hiddenapi"
This reverts commit e5b5657f87.

The reverted change was added in order to gather the information about
the hiddenapi that is needed for the runtime to enforce the hiddenapi
accessibility rules. Without it the build broke with the following
error when the android.test.base library was not in the
PRODUCT_BOOT_JARS list:

AssertionError: Error processing: frameworks/base/config/hiddenapi-greylist.txt
The following entries were unexpected:
  Ljunit/framework/TestSuite;->isPublicTestMethod(Ljava/lang/reflect/Method;)Z
  Landroid/test/AndroidTestCase;->setTestContext(Landroid/content/Context;)V
  Landroid/test/InstrumentationTestCase;->runMethod(Ljava/lang/reflect/Method;I)V
  Landroid/test/AndroidTestCase;->getTestContext()Landroid/content/Context;
  Ljunit/framework/TestCase;->fName:Ljava/lang/String;
  Ljunit/framework/TestSuite;->isTestMethod(Ljava/lang/reflect/Method;)Z
  Please visit go/hiddenapi for more information.

However, it turns out that the runtime does not currently enforce
access to the hiddenapi of libraries that are not on the
PRODUCT_BOOT_JARS list. Gathering hiddenapi information for a library
not on the PRODUCT_BOOT_JARS list breaks the
CtsHiddenApiBlacklistApi27TestCases and
CtsHiddenApiBlacklistApi28TestCases test modules which use that
information to ensure that correct runtime behavior.

This change is being reverted simply because it does not work.

Bug: 126519737
Bug: 73711752
Test: make REMOVE_ATB_FROM_BCP=true droid and make droid
Change-Id: I1b4a7786b1061effa0e2d37832afa8570953a06e
2019-02-27 12:49:21 +00:00
Treehugger Robot
6bd446620c Merge "Whitelist Offline.getProbes(..)." 2019-02-26 22:01:41 +00:00
Nicolas Geoffray
9ce33353c5 Merge "Add a DEX2OAT_BOOTCLASSPATH variable." 2019-02-26 20:38:32 +00:00
Patrice Arruda
300cef9856 Add a host prebuilt module type for usr/share.
This is almost the same as prebuild_etc except the base path.

Bug: 122616578
Test: prebuilt_etc_test.go
Change-Id: I512b17a88062403225ae6ec248f857c88fccf47a
2019-02-26 09:18:35 -08:00
Treehugger Robot
b42c1aa8e4 Merge "Handle $(LOCAL_PATH) in androidmk" 2019-02-26 16:30:28 +00:00
Nicolas Geoffray
07b4007f1d Add a DEX2OAT_BOOTCLASSPATH variable.
Bug: 119800099
Test: m
Change-Id: If4b49b1bed33564b9237f8ae2ac35ef0d631703c
2019-02-26 12:55:37 +00:00