Commit graph

965 commits

Author SHA1 Message Date
Jiyong Park
48af68cf58 Merge "Ensure that PathsForModuleSrc works with prebuilts" am: 3ed757ab3a
am: 2b77cefa1b

Change-Id: I7766815b06d8673e98e8d3a97943c966c342f5f5
2019-04-19 21:06:14 -07:00
Jiyong Park
683c699acd Fix: PathsForModuleSrc does not work for a replaced dependency am: f2976304f7
am: 581569e4cc

Change-Id: I7fee54cf5aa62f5b58b88a4a04e600619b488806
2019-04-19 02:09:52 -07:00
Jiyong Park
d4671111ef Ensure that PathsForModuleSrc works with prebuilts
prebuilt_test is amended to ensure
f2976304f7 is not broken.

PathsForModuleSrc is called to check if the file is from correct module
(either from source or prebuilt module)

Bug: 130627486
Test: m

Change-Id: Ic5f467fbc2837727df92102530687e967cd5529f
2019-04-19 17:57:33 +09:00
Jiyong Park
f2976304f7 Fix: PathsForModuleSrc does not work for a replaced dependency
PathsForModuleSrc does not work if a source module is replaced with a
prebuilt module. This is because the function uses GetDirectDepWithTag
with the name of the original source module. Since the dependency is
replaced and the prebuilt module has the name "prebuilt_<name>", the
search always fails.

Fixing this by re-implementing GetDirectDep* functions inside Soong
using VisitDirectDep.

Bug: 130627486
Test: m
Change-Id: I68d52668283c429d5e93c7f2c81f6a8db1f24893
2019-04-19 13:48:33 +09:00
Dan Willemsen
9d1dc04e2d Merge "TARGET_FS_CONFIG_GEN is a list, not a single path" am: 3c4a9159c9
am: 8fa04304e7

Change-Id: I9e2450bfc99d592c2e272cb298fbc53fee112755
2019-04-18 12:53:35 -07:00
Dan Willemsen
54879d193e TARGET_FS_CONFIG_GEN is a list, not a single path
Bug: 130787336
Test: m oemaids_header_gen oemaids_headers passwd group
Test: Set TARGET_FS_CONFIG_GEN to a list of paths
Change-Id: Ic1f7d38239f3f805ca0723c24005d3e18a811870
2019-04-18 17:16:41 +00:00
Colin Cross
f449d2aedb Merge "Use LoadHook to create modules in java_sdk_library" am: 59d4a31063
am: 414d337702

Change-Id: Ide9449f45066883662d05946fbbd43b142ec208f
2019-04-17 01:46:32 -07:00
Treehugger Robot
59d4a31063 Merge "Use LoadHook to create modules in java_sdk_library" 2019-04-17 08:28:36 +00:00
Colin Cross
44d5d22db6 Merge "Allow guava to use java_host_for_device" 2019-04-16 23:14:12 +00:00
Colin Cross
f8b860a0fb Use LoadHook to create modules in java_sdk_library
Creating new modules in a mutator is dangerous, as other mutators
that need to see the new modules may already have run, in this case
the prebuilts mutator.  Move SdkLibraryMutator to a LoadHook instead.
Also moves registering the LoadHook mutator to testing.go so it is
registered for all tests.

Test: m checkbuild
Change-Id: I08bd76a0e6205d2ca27861058067a1562c339eed
2019-04-16 21:46:28 +00:00
Colin Cross
97add50354 Allow guava to use java_host_for_device
Guava can't compile against a device bootclasspath, it uses methods
that only exist in the host bootclasspath, and then avoids calling
them at runtime.

Bug: 130306229
Test: m checkbuild
Change-Id: I012030cb701c01ea9ff554c1b6156d0242365a4c
Merged-In: I012030cb701c01ea9ff554c1b6156d0242365a4c
Exempt-From-Owner-Approval: cherry pick
(cherry picked from commit b5191a573d)
2019-04-15 21:44:51 -07:00
Colin Cross
bd9183c02b Merge "Allow guava to use java_host_for_device" into qt-dev-plus-aosp 2019-04-16 03:35:50 +00:00
Dan Willemsen
c74ce7d85f Convert yacc to a single RuleBuilder rule am: 4e0aa23dd3
am: e71c0691ad

Change-Id: I8e5b153cfeb7887777065dc8ee33d04dda36e613
2019-04-15 17:51:03 -07:00
Dan Willemsen
891af48379 Support RuleBuilder.Sbox to wrap commands in sbox am: 633c502295
am: b933c57635

Change-Id: I07cb4998e8d860f97c4ae00f9f776744cc8a5adf
2019-04-15 17:50:48 -07:00
Dan Willemsen
4e0aa23dd3 Convert yacc to a single RuleBuilder rule
So that <module>/gen/yacc/... is (re)created by a single rule, previous
files are removed, and location.hh is in the build graph when it is
produced.

Test: treehugger
Change-Id: I2f6e47ea07f315e10ae1cb8ad50697e7123d0285
2019-04-15 14:52:05 -07:00
Dan Willemsen
633c502295 Support RuleBuilder.Sbox to wrap commands in sbox
This essentially allows you to declare that everything in a directory
will be created by the rule, and we'll ensure that your command actually
writes out all of the claimed outputs, and remove any other files that
previously existed in that directory.

Test: built-in tests
Change-Id: I990dce2b3a0d89ebd2736ac1a0cadfb5864c6e73
2019-04-15 14:52:05 -07:00
Dan Willemsen
64e8416056 Merge "Expose TargetFSConfigGen to DeviceConfig from Make" am: 8235220a82
am: a0fcf98136

Change-Id: Iafb6fd966ea4c38ed488e3d34de0df7ffe0f6b37
2019-04-11 16:47:58 -07:00
Colin Cross
b5191a573d Allow guava to use java_host_for_device
Guava can't compile against a device bootclasspath, it uses methods
that only exist in the host bootclasspath, and then avoids calling
them at runtime.

Bug: 130306229
Test: m checkbuild
Change-Id: I012030cb701c01ea9ff554c1b6156d0242365a4c
2019-04-11 16:42:34 -07:00
Dan Willemsen
71c7460713 Expose TargetFSConfigGen to DeviceConfig from Make
Bug: 118089258
Test: m oemaids_header_gen oemaids_headers
Change-Id: I2675822ae01af9bbec70f0c0413c047f36b5e024
2019-04-10 20:24:16 -07:00
Dan Willemsen
c5f8f6e93f Stop using build/target -> build/make/target symlink am: 412160e1c9
am: 8862c76a68

Change-Id: I0dacd807818a58934d436724401335f2c8366c37
2019-04-10 13:46:48 -07:00
Dan Willemsen
412160e1c9 Stop using build/target -> build/make/target symlink
Instead, fully specify build/make/target/... everywhere

Test: treehugger
Change-Id: I07ba0e9b0604919a271afd5133070616e1f404fc
2019-04-09 21:36:26 -07:00
Dan Willemsen
868e299039 Merge changes I2bff8fb8,Ifa584479 am: cb4e0551a2
am: 787b999bc0

Change-Id: Idbc987afbaf1fcc183629431a745c9ae41bb215f
2019-04-09 18:26:03 -07:00
Dan Willemsen
b6d171bb73 Update default soong config
BuildNumberFromFile is required to be non-empty for version injection to
work.

The various platform version values are needed for various Java builds.

Test: treehugger
Change-Id: Ifa5844794ea9e9baf0ec725dec107975cd759354
2019-04-09 09:44:31 -07:00
Colin Cross
4f53bebacd Fix missing genrule srcs and tools with ALLOW_MISSING_DEPENDENCIES=true am: ba71a3fb11
am: 4618ddc9d1

Change-Id: Ia3ffed632b8d7de10e674c3c011aab54f1ffd144
2019-04-07 15:40:39 -07:00
Colin Cross
ba71a3fb11 Fix missing genrule srcs and tools with ALLOW_MISSING_DEPENDENCIES=true
Set the location label for missing srcs and tools to avoid
nonsensical errors when parsing the command.

Test: genrule_test.go
Test: paths_test.go
Test: unbundled branch with missing framework-res module needed by robolectric genrule
Change-Id: I9c1f1cd82a80f048c0e903b8e93910b1ae34b0b1
2019-04-07 19:40:02 +00:00
Sasha Smundak
8b48326fbd Merge "Implement host_required and target_required properties." am: b9045cf28c
am: 0e47e406de

Change-Id: I476551e94329a1703d9afddc6cb25e7311ac64ef
2019-04-05 08:34:46 -07:00
Sasha Smundak
b6d230515e Implement host_required and target_required properties.
They are counterparts of LOCAL_HOST_REQUIRED_MODULES and
LOCAL_TARGET_REQUIRED_MODULES respectively.

Fixes: 128693436
Test: treehugger, convert cts/hostsidetests/devicepolicy/Android.bp
Change-Id: Id66ffca6edffe18993ac51e8930f1d0e78178249
2019-04-04 11:24:01 -07:00
Colin Cross
a51caadf4a Export more config variables am: 092c9da922
am: 34998d71cd

Change-Id: I5acae0e9043089f1a86b013e3cecb07c993eee10
2019-04-04 01:40:10 -07:00
Colin Cross
11fbb890c9 Fix package path of android/soong/android pctx am: cc0ce80ed5
am: a1c57b4664

Change-Id: Ifba10892f902e70bd0a52a82a20bd5f1b64a61de
2019-04-04 01:39:57 -07:00
Colin Cross
092c9da922 Export more config variables
Export some more config variables that will be used to generate
robolectric's build.prop file.

Bug: 122331577
Test: m checkbuild
Change-Id: I39f3436ed5d5c4e730dd3e1f86c840cf6358ec87
2019-04-04 03:59:41 +00:00
Colin Cross
cc0ce80ed5 Fix package path of android/soong/android pctx
android/soong/common was renamed to android/soong/android long
ago, but the pctx package path was still "android/soong/common".
This required all users of rules defined in android/soong/android
to import "android/soong/android" and then
pctx.Import("android/soong/common").

Test: m checkbuild
Change-Id: I20d096522760538f7cfc2bec3d4bfeba99b275d4
2019-04-04 03:59:34 +00:00
Christopher Ferris
134f8f6f00 Make libc_scudo always go first.
In addition, add Shared_libs to malloc_not_svelte.

Bug: 123689570

Test: Verified that libc_scudo is first wherever it is added.
Change-Id: Ibdc5dbd019a382630a727c270f846aa4446f8d99
Merged-In: Ibdc5dbd019a382630a727c270f846aa4446f8d99
2019-04-03 14:54:12 -07:00
Colin Cross
49c87dfae9 Merge "Fix sdk_version: "system_current" when Platform_sdk_final=true" am: b007b2bde5 am: 8c3f398c6c
am: 209edee425

Change-Id: I54ea846c9ac2b29354109755225db71dcdaa1527
2019-04-03 14:04:07 -07:00
Colin Cross
ff0daf4ccf Fix sdk_version: "system_current" when Platform_sdk_final=true
When PLATFORM_VERSION_CODENAME is set to REL Platform_sdk_final
becomes true, which causes the return value of sdkVersionToNumber
for "system_current" to a real version number instead of
FutureApiLevel.  This enables the check against
PlatformSystemSdkVersions, which doesn't contain "current".  Use
the numeric value instead.

Fixes: 129786845
Test: sdk_test.go
Change-Id: If7cf211cc01c5fbf3e3ece3c3f604718a13d5a9b
2019-04-02 23:18:30 +00:00
Christopher Ferris
25bda7ea49 Make libc_scudo always go first.
In addition, add Shared_libs to malloc_not_svelte.

Bug: 123689570

Test: Verified that libc_scudo is first wherever it is added.
Change-Id: Ibdc5dbd019a382630a727c270f846aa4446f8d99
2019-04-02 15:31:29 -07:00
Colin Cross
32762a08eb Add support for protoc plugins am: fe17f6f0e8 am: 91c063cfdc
am: 7299e418df

Change-Id: I30e57f6678343f57233831775b62afa1f043a450
2019-04-02 10:31:28 -07:00
Colin Cross
57205f3cb4 Move proto compilation to RuleBuilder am: 19878da6a0 am: 61918685aa
am: c8a3eb9110

Change-Id: If3922ee1900d6f3888c7291997ac49d4a939c065
2019-04-02 10:31:13 -07:00
Colin Cross
fe17f6f0e8 Add support for protoc plugins
Add a proto.plugin property to allow specifying a custom protoc
plugin to generate the code.

Fixes: 70706119
Test: m am StreamingProtoTest
Change-Id: I1ecdd346284b42bbcc8297019d98d2cd564eb94c
2019-04-02 16:38:55 +00:00
Colin Cross
19878da6a0 Move proto compilation to RuleBuilder
Using blueprint.Rule for protoc commands was causing code duplication
because there was no good way to run the same protoc for cc, java and
python but then run custom source packaging steps for java and python.
Move most of the code into a common function that returns a
RuleBuilder, and then let java and python add their own commands at
the end of the rule.

Bug: 70706119
Test: All Soong tests
Test: m checkbuild
Change-Id: Ic692136775d273bcc4f4de99620ab4878667c83a
2019-04-02 16:38:47 +00:00
Colin Cross
a50a2464c6 Merge changes I7dd4ba7f,I7887a67a am: 92cc71606c am: 900574f0cd
am: 6c99a30bb7

Change-Id: If557897ed64ecdf8967299b5512392e5485767ae
2019-04-02 08:21:42 -07:00
Colin Cross
1d2cf0494a Add depfile support to RuleBuilder
Allow rules built with RuleBuilder to use depfiles.  Ninja only
supports a single depfile with single output.  If there are
multiple outputs in a rule, move all but the first to implicit
outputs.  If multiple depfiles are specified, use new support
in dep_fixer to combine additional depfiles into the first depfile.

Test: rule_builder_test.go
Change-Id: I7dd4ba7fdf9feaf89b3dd2b7abb0e79006e06018
2019-03-29 16:35:06 -07:00
Colin Cross
92b7d584c8 Add RuleBuilderCommand.Flags
Test: rule_builder_test.go
Change-Id: I7887a67aaef33bc591d83fade9175da3e401529f
2019-03-29 16:35:06 -07:00
Jaewoong Jung
4bc3a00349 Merge "Add prebuilt_apex." am: 083bd3e971 am: 14acd15640
am: 3cdc5b69a4

Change-Id: Ie43668acd32e52cdb2391f5c9d9798859a6aa885
2019-03-29 00:59:39 -07:00
Treehugger Robot
083bd3e971 Merge "Add prebuilt_apex." 2019-03-29 07:36:53 +00:00
Jaewoong Jung
939ebd5f33 Add prebuilt_apex.
Bug: 127789981
Test: apex_test.go + com.android.tzdata.apex
Change-Id: I09bb0a4b2acf310c55c789569da3c9d755638232
2019-03-28 15:56:22 -07:00
Jaewoong Jung
a4edf844da Merge "Fix an override_module bug." am: 044ead6b1a am: 5ce95f2eaf
am: ac24969630

Change-Id: I352a380486600c0b48a61daa0457eff09ceb8f66
2019-03-27 16:13:22 -07:00
Jaewoong Jung
a641ee9cc7 Fix an override_module bug.
proptools.PrependProperties doesn't replace a pointer when both the src
and the dst have one. This prevented override_module from overriding
simple value pointer properties when the base module has existing
values. It turns out this was why the name property needed to be
overwritten manually.

Bug: 122957760
Test: app_test.go
Change-Id: I3302287c31a560422548c22fade95261ddbe606a
2019-03-27 11:21:24 -07:00
Patrice Arruda
010bc3f077 Merge "Soong: Add synopsis to soong_namespace module." am: 39302bbcb9 am: acca92e981
am: e54b65abc2

Change-Id: I3b2de8d90dff9a398588cf0e2677e57ba05dfb12
2019-03-27 09:06:33 -07:00
Patrice Arruda
64765aaef9 Soong: Add synopsis to soong_namespace module.
Synopsis was missing to soong_namespace module. Also added documentation
to imports properties. This required the namespaceProperties struct to be
pulled out of the NamespaceModule struct in order for the documentation
tool to extract the property documentation.

Bug: b/128337482
Test: Ran the doc generation command and verified that the synopsis was
added to soong_namespace and imports properties is listed too.

Change-Id: I519b14629bdbc85f35fbc8fa03e78dc2ad3f655e
2019-03-26 09:09:41 -07:00
Jaewoong Jung
79e3e79ee8 Merge "Add override_android_app module type." am: e9665723da am: 9874d6abe6
am: c3432e294e

Change-Id: I28638a23c6140ae1775187a2afc61b15db97f487
2019-03-22 07:57:11 -07:00