Commit Graph

11280 Commits

Author SHA1 Message Date
Colin Cross
8a098ecc62 Annotate paths and deprecate ExtractSource(s)Deps am: 27b922f53e
am: e5f6f175a8

Change-Id: I548d4f57fd7e66a574a1eca2c05f9262f9ee792a
2019-03-07 11:28:21 -08:00
Colin Cross
4d59c54239 Add path properties mutator am: 1b48842a4b
am: ad566c5829

Change-Id: If96780d98d03a2691a6439552e0adb779e86e5c7
2019-03-07 11:28:10 -08:00
Colin Cross
e5f6f175a8 Annotate paths and deprecate ExtractSource(s)Deps
am: 27b922f53e

Change-Id: I6b4bd574d9dabf006e16f67a5212c63a2a0c7550
2019-03-07 11:05:13 -08:00
Colin Cross
ad566c5829 Add path properties mutator
am: 1b48842a4b

Change-Id: Ib7322a2e6a402f9e2e0b833b5e577fa3289df3eb
2019-03-07 11:05:06 -08: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
Colin Cross
0224b142c0 Merge "Add neverallow rules for java_device_for_host" am: 1361449710
am: 2124eecd58

Change-Id: I87bb7aa6066d94895c1e7e4a9074b721fe1a2f7e
2019-03-07 08:28:17 -08:00
Colin Cross
2124eecd58 Merge "Add neverallow rules for java_device_for_host"
am: 1361449710

Change-Id: I7b60feebd6af1675832ea01d87152a2dabfb28be
2019-03-07 08:23:09 -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
Sasha Smundak
2334536a66 Merge "Do not "escape" newline if comment ends with ESC character." am: e3ca7fd565
am: 5dbf48ee63

Change-Id: I6f4fa03dea7bf86ec0bae5c5ede07e1654e662f1
2019-03-06 20:42:27 -08:00
Sasha Smundak
5dbf48ee63 Merge "Do not "escape" newline if comment ends with ESC character."
am: e3ca7fd565

Change-Id: I2d206fb24ec74e8e051f83a503fb0cac381796e0
2019-03-06 20:38:24 -08: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
f7b91be91f cc_test: emit errors if there's duplicate in srcs am: a61ff2cec3
am: c7da1a6b81

Change-Id: Ieabc1274fafeba3e6f1bddb812537850ddf2cf6a
2019-03-06 18:17:09 -08:00
Jooyung Han
c7da1a6b81 cc_test: emit errors if there's duplicate in srcs
am: a61ff2cec3

Change-Id: Iace7509da2d9bf6cca8f5820ed4e7ac6b93f7316
2019-03-06 18:08:57 -08: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
Nicolas Geoffray
da4ff6407c Merge "Hardcode in dexopt the information that /system/product should be /product." am: 7aa5a56bbc
am: 4505b9852e

Change-Id: Iab586e3050c63ff3dbb6aa1c1af37997560fb42a
2019-03-06 11:06:48 -08:00
Nicolas Geoffray
4505b9852e Merge "Hardcode in dexopt the information that /system/product should be /product."
am: 7aa5a56bbc

Change-Id: I84649f05b186a87c4511f5086b0b45bbc5339389
2019-03-06 10:34:25 -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
Jooyung Han
ba30c798c9 Merge "Add checks for double_loadable dependencies" am: f14277fc3a
am: 4b75790b30

Change-Id: I55a480df1a035ff80531a86e0dcd0f535b088bf4
2019-03-05 19:51:02 -08:00
Colin Cross
3ce8fedd9a Merge "Add modules for converting java modules between host and device" am: e3ad4144db
am: d5f25c7685

Change-Id: I4c54555c8d65f8c059ebf5ed39f7e50e6d1e1c3e
2019-03-05 19:50:15 -08:00
Jooyung Han
4b75790b30 Merge "Add checks for double_loadable dependencies"
am: f14277fc3a

Change-Id: Ida062e0df66d5cc4c0a6f5f895eff102c0788c76
2019-03-05 19:43:56 -08:00
Colin Cross
d5f25c7685 Merge "Add modules for converting java modules between host and device"
am: e3ad4144db

Change-Id: I4836bea8509dfe3aba78811e38f165b101677e2f
2019-03-05 19:43:10 -08: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
Jaewoong Jung
9d2db5ccdf Fixe typos in androidmk. am: b8ba8a5ee8
am: c9631351b4

Change-Id: Ibf5f0d539fd61d5b3cbed80fd9e2f5ed2a043f37
2019-03-05 18:39:46 -08:00
Jaewoong Jung
c9631351b4 Fixe typos in androidmk.
am: b8ba8a5ee8

Change-Id: Ib661b6e3e59986f6f00db2ce9762e84d190ae171
2019-03-05 18:25:38 -08: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
Inseob Kim
4980a79fd7 Merge "Add comment to api_packages property" am: 5d3e2b70b8
am: 79e980ae5b

Change-Id: I3cb4c663694dcac07b3c7c312871efc5ca00b46a
2019-03-05 02:40:02 -08:00
Inseob Kim
79e980ae5b Merge "Add comment to api_packages property"
am: 5d3e2b70b8

Change-Id: I8e5d3fb21143dc669d560c26bab6edb0f1ec4914
2019-03-05 02:36:00 -08:00
Treehugger Robot
5d3e2b70b8 Merge "Add comment to api_packages property" 2019-03-05 10:31:22 +00:00
Inseob Kim
bc32f54c26 Add blueprint:mutated to sysprop properties am: b3f22ca48b
am: fb4d873dd2

Change-Id: I4c296a42f71dea697ed8d8442e90a391e5eb059d
2019-03-04 23:05:07 -08:00
Inseob Kim
fb4d873dd2 Add blueprint:mutated to sysprop properties
am: b3f22ca48b

Change-Id: I10c895eef01153f724389de2794bd141c56b1c3c
2019-03-04 23:01:03 -08: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
15836b9ceb Add dexpreopt_bootjars_test.go am: 762286723a
am: 2c81ab734f

Change-Id: I0fa870f1ac48f7c64a449b16e4180fb9a04ad230
2019-03-04 19:36:11 -08:00
Colin Cross
7cb6f9e601 Move some java test setup later am: c28bb0b8f9
am: 7e2b9c48ca

Change-Id: I1d5279a23925c260e8602c4fb7b2a4c8d1267f66
2019-03-04 19:35:56 -08:00
Colin Cross
d4c4cd24ca Fix RuleBuilder.Restat am: baa676f671
am: ee3c74b457

Change-Id: Id735ac676a33e7f78663575b7f20294937cbf1af
2019-03-04 19:35:42 -08:00
Colin Cross
68193be3be Support testing Rules in Modules and Rules and Builds in Singletons am: 4c83e5ccd4
am: 6a64436220

Change-Id: Iedbaeafe803943dc07c6ea506c1a017759d9eacc
2019-03-04 19:35:26 -08:00
Colin Cross
2c81ab734f Add dexpreopt_bootjars_test.go
am: 762286723a

Change-Id: I47beab59d7ec61652f673de8dd2691fbce7e2677
2019-03-04 19:27:51 -08:00
Colin Cross
7e2b9c48ca Move some java test setup later
am: c28bb0b8f9

Change-Id: Ib22830370d27e853151cc4419f6bbe791568a645
2019-03-04 19:27:41 -08:00
Colin Cross
ee3c74b457 Fix RuleBuilder.Restat
am: baa676f671

Change-Id: Iaa35d96743fe84d98a65a3c355a159739976a479
2019-03-04 19:27:31 -08:00
Colin Cross
6a64436220 Support testing Rules in Modules and Rules and Builds in Singletons
am: 4c83e5ccd4

Change-Id: If0fc3ebf39c1556fa447367f90650325d43c43ec
2019-03-04 19:27:21 -08: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