Commit graph

10486 commits

Author SHA1 Message Date
Andrei-Valentin Onea
fdd1457fa6 Merge "Differentiate system and test apis in whitelist" 2019-03-08 16:22:11 +00:00
Colin Cross
1255a561e6 Fix ALLOW_MISSING_DEPENDENCIES=true builds
Don't error out immediately if a SourceDepTag dependency is missing
if ALLOW_MISSING_DEPENDENCIES=true is set.

Test: forrest on unbundled build
Change-Id: I9077013e09e3ad0e90ae5163b26aace5b263e63a
2019-03-07 21:43:10 +00:00
Treehugger Robot
38bfc16c18 Merge "dumpvars += BOARD_VNDK_VERSION" 2019-03-07 21:23:55 +00:00
Colin Cross
937664a50a Add test for ctx.ExpandSources
Test: TestExpandSources
Change-Id: Ib2168b00618a45b2a36c4b158c6c02c4727a960b
2019-03-07 18:36:46 +00:00
Colin Cross
27b922f53e Annotate paths and deprecate ExtractSource(s)Deps
Add `android:"path"` to all properties that take paths to source
files, and remove the calls to ExtractSource(s)Deps, the
pathsDepsMutator will add the necessary SourceDepTag dependency.

Test: All soong tests
Change-Id: I488ba1a5d680aaa50b04fc38acf693e23c6d4d6d
2019-03-07 18:36:35 +00:00
Colin Cross
1b48842a4b Add path properties mutator
Add a mutator pass after DepsMutator that visits every property
struct in every module looking for properties that have a tag
`android:"path"`, and automatically add a SourceDepTag dependency
on any module references (":module-name") found.  Uses a cache to
store the mapping of property struct type to locations of
properties with the tag.

Test: android/path_properties_test.go
Change-Id: I38c0497843dde4890e9342c3a6f0b402c0720742
2019-03-07 18:36:24 +00:00
Steven Moreland
0002028c09 dumpvars += BOARD_VNDK_VERSION
Dump variable in log to track remaining targets which don't set it.

Bug: 122954981
Test: $ grep VNDK out/soong.log
2019/03/07 09:22:04.235604 build/soong/ui/build/dumpvars.go:109: BOARD_VNDK_VERSION current

Change-Id: I34146c752a4bf0d799374bb93cc0d75b0f1b048c
2019-03-07 09:28:35 -08:00
Treehugger Robot
1361449710 Merge "Add neverallow rules for java_device_for_host" 2019-03-07 16:14:45 +00:00
Colin Cross
c35c5f9824 Add neverallow rules for java_device_for_host
java_device_for_host and java_host_for_device should rarely be
used and could cause problems if used incorrectly, so restrict them
to only the necessary projects through a neverallow whitelist.

Bug: 117920228
Test: neverallow_test.go
Change-Id: I37dce489c2fb8bca71bd46dbabaaa514bf6f7eee
Merged-In: I37dce489c2fb8bca71bd46dbabaaa514bf6f7eee
2019-03-07 15:23:21 +00:00
Treehugger Robot
e3ca7fd565 Merge "Do not "escape" newline if comment ends with ESC character." 2019-03-07 04:29:45 +00:00
Jooyung Han
a61ff2cec3 cc_test: emit errors if there's duplicate in srcs
In general "srcs" property allows duplication in the list.
But when cc_test's "test_per_src" property is set "true",
there will be variants according to "srcs" list.
Therefore, it should fail if there is a duplicate entry
in srcs list.

Bug: 113629474
Test: mma
Change-Id: I543624459c30dd296494a3a80e28ce5503a3ea2f
2019-03-07 01:57:57 +00:00
Sasha Smundak
e10952b442 Do not "escape" newline if comment ends with ESC character.
Fixes: 127521510
Test: manual
Change-Id: I88a8eb2ca94b8aa06e2682d2c14f9e74f5ada286
2019-03-06 16:46:23 -08:00
Peter Collingbourne
bd19db0da6 Remove workarounds for old compiler versions.
LLVM r349610 was released, so these workarounds are no longer required.

Bug: 112907825
Change-Id: Ia6ba0034881f2ab657d8420df3047c21757c7d9b
2019-03-06 10:48:36 -08:00
Nicolas Geoffray
7aa5a56bbc Merge "Hardcode in dexopt the information that /system/product should be /product." 2019-03-06 17:57:36 +00:00
Treehugger Robot
f14277fc3a Merge "Add checks for double_loadable dependencies" 2019-03-06 03:29:20 +00:00
Treehugger Robot
e3ad4144db Merge "Add modules for converting java modules between host and device" 2019-03-06 03:26:44 +00:00
Jooyung Han
a70f067899 Add checks for double_loadable dependencies
Vendor-available libs can be double-loaded if LLNDK libs depend
on them. Currently soong checks only 'direct' dependency bewteen
LLNDK and VNDK lib. With this change, soong checks if every dependencies
from LLNDK is also LLNDK or VNDK-SP or marked as 'double_loadable:true'.
This change causes many libs to be marked as 'double_loadable'.

Bug: 121280180
Test: m -j
Change-Id: Ibc1879b6fd465a3141520abe0150018c3051c0a7
2019-03-06 11:18:21 +09:00
Colin Cross
3d7c9827d5 Add modules for converting java modules between host and device
java_device_for_host and java_host_for_device allow treating a
device module as a host module and vice versa.  They will be useful
for converting layoutlib and robolectric to Soong, as these modules
run device java code on the host.

Bug: 117920228
Test: device_host_converter_test.go
Change-Id: Ia9a371fb41a97bc16338097f3ce8b40099744167
2019-03-05 23:09:45 +00:00
Jaewoong Jung
b8ba8a5ee8 Fixe typos in androidmk.
Replace contitional with conditional.

Test: androidmk_test.go
Change-Id: Ic261701f4588b9b8b6d3560598831368c3422508
2019-03-05 22:29:58 +00:00
Nicolas Geoffray
2464ef4975 Hardcode in dexopt the information that /system/product should be /product.
On-device compilation will always see paths starting with /product. This CL
makes sure preopt does the same.

Test: m && check odex files
Bug: 126415372
Change-Id: I5764e7f22bffb97b7093f351d7b97bbe5fb1f2f1
2019-03-05 14:14:04 +00:00
Treehugger Robot
5d3e2b70b8 Merge "Add comment to api_packages property" 2019-03-05 10:31:22 +00:00
Inseob Kim
f63c2fb897 Add comment to api_packages property
Bug: N/A
Test: N/A
Change-Id: I38791170993484cdae26edee9595a74802853176
2019-03-05 05:23:45 +00:00
Inseob Kim
b3f22ca48b Add blueprint:mutated to sysprop properties
Because this flag is used internally by sysprop_library.

Bug: N/A
Test: m -j
Test: build cc_library with setting sysprop property and fail
Change-Id: I478889b8923f99407a067e5b9efee9322c3e5ae8
2019-03-05 03:45:41 +00:00
Colin Cross
762286723a Add dexpreopt_bootjars_test.go
Add a test that exercises the dexpreopt_bootjars.go singleton.

Test: dexpreopt_bootjars_test.go
Change-Id: I01d4f6e22f6ff7b809af043391d7b6209dcb8675
2019-03-05 03:17:51 +00:00
Colin Cross
c28bb0b8f9 Move some java test setup later
Move ctx.Register() from testContext() to run() so that tests can
register more singletons before the env singleton is registered.
Any singletons registered after the env singleton will hit an error
if they attempt to read an environment variable.

Move setDexpreoptTestGlobalConfig from TestConfig to run() so that
a test can set their own custom config after TestConfig but before
run().

Test: All Soong tests
Change-Id: Iec47f4b7898736f583cbd6bd53e4d02a035f4fb2
2019-03-05 03:17:42 +00:00
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
Andrei Onea
e04da07dfe Differentiate system and test apis in whitelist
@SystemApi and @TestApi entries in the whitelist can now be
differentiated from the rest of the public apis.

Test: m
Change-Id: Ie6a0108540cffe11992739d6391531401378f14b
2019-03-01 17:44:13 +00: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