Commit Graph

807 Commits

Author SHA1 Message Date
Pirama Arumuga Nainar 7abf560cb0 Merge "Enable coverage universally if COVERAGE_PATHS includes "*"" 2019-03-04 16:31:51 +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
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
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
Treehugger Robot ef36053829 Merge "Revert "Add override_module."" 2019-02-28 23:10:33 +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
Roland Levillain 2833d984fb Merge "Fix soong.android.RuleBuilderCommand.FlagWithList's comment." 2019-02-28 10:58:52 +00:00
Treehugger Robot b709575a75 Merge "Add override_module." 2019-02-28 03:46:23 +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
Roland Levillain 2da5d9a5fe Fix soong.android.RuleBuilderCommand.FlagWithList's comment.
Test: n/a
Change-Id: I96158244feaaaa25ada02275e20418ac30218004
2019-02-27 16:56:41 +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
Jaewoong Jung e608a51b06 Merge "Split up Soong build doc." 2019-02-22 15:42:49 +00:00
Colin Cross 9be4152c21 Pass DEXPREOPT_BOOT_JARS_MODULES to Make
Make is not setting PreoptBootJars, pass the value computed in
Soong back to Make.

Test: m checkbuild
Change-Id: Ie3db926df9c5d6bf18db1003b95823c7566800a9
2019-02-20 22:06:30 -08:00
Colin Cross 69f59a3327 Make RuleBuilder methods take Paths
There are no more Make paths being used in Soong now that
dexpreopting and hiddenapi are in Soong. Use the Path types
in the inputs to RuleBuilder, and fix all users of RuleBuilder.

This reapplies I886f803d9a3419a43b2cae412537645f94c5dfbf with
fixes to disable preopt for Soong-only builds when the global
dexpreopt.config doesn't exist.

Test: all soong tests
Test: m checkbuild
Change-Id: I4dae9ecd5de22f062f9478ec8f0747f099cf8190
2019-02-20 22:06:09 -08:00
Colin Cross 501d7e594a Merge "Revert "Make RuleBuilder methods take Paths"" 2019-02-21 05:03:41 +00:00
Colin Cross ab898dc4a4 Revert "Make RuleBuilder methods take Paths"
This reverts commit acdd694071.

Reason for revert: broke ndk build

Change-Id: I5655e48c15eb8f5f0267afdd853fbc25765b8623
2019-02-21 05:03:00 +00:00
Colin Cross 4bb6764de9 Merge "Make RuleBuilder methods take Paths" 2019-02-21 04:06:18 +00:00
Jaewoong Jung 6c29688691 Split up Soong build doc.
Previously the build doc was a gigantic list of modules and properties,
which can be overwhelming to new users. This change breaks it up by
packages, so that it is easier to look up and feels more coherent.

Bug: 123521276
Test: m soong_docs
Change-Id: I1a1a331f4b4deb8782d698e9076098c5a27b9566
2019-02-20 15:43:06 -08:00
Colin Cross acdd694071 Make RuleBuilder methods take Paths
There are no more Make paths being used in Soong now that
dexpreopting and hiddenapi are in Soong. Use the Path types
in the inputs to RuleBuilder, and fix all users of RuleBuilder.

Test: all soong tests
Test: m checkbuild
Change-Id: I886f803d9a3419a43b2cae412537645f94c5dfbf
2019-02-20 14:23:37 -08:00
Treehugger Robot e344fb5fb1 Merge "Implement vts_config module" 2019-02-20 22:23:16 +00:00
Treehugger Robot 48db2b15fb Merge "Revert "Remove armv7-a without neon support"" 2019-02-20 12:56:37 +00:00
Treehugger Robot 4c317f1cbb Merge "Allow Singletons to export Make variables" 2019-02-20 08:38:23 +00:00
Colin Cross aa1491fd41 Merge changes I7801fc7c,I7d407bd1
* changes:
  Add CopyOf utility method
  Fix a bug in OncePer.Get that could return a waiter
2019-02-20 07:15:17 +00:00
Sasha Smundak ff36da04e8 Implement vts_config module
Test: internal (see android/vts_config_test.go) + run 'm vts' and check
that host/linux-x86/vts/android-vts.zip remians the same
Change-Id: I0249a974a240e7669c3b9378c17739df8e120873
Fixes: 122617100
2019-02-19 16:58:43 -08:00
Dan Albert 8818f49989 Revert "Remove armv7-a without neon support"
Unfortunately we still need to build the NDK sysroot as non-NEON
since that's still supported, though it's no longer the default.

This reverts commit f4e0601c7e.

Test: treehugger
Test: rebuilt NDK sysroot and imported into the NDK, ran NDK tests
Bug: None
2019-02-19 13:53:01 -08:00
Colin Cross ed023eca73 Allow Singletons to export Make variables
Register any Singletons that implement a MakeVars method as
MakeVarsProviders, and convert the hiddenapi singleton to
use it.

Test: m checkbuild
Change-Id: I6a2044ad34ef46a8b267762ddfeb51aa01d7734d
2019-02-19 12:45:14 -08:00
Colin Cross 454c087be6 Add CopyOf utility method
Add a utility method that returns a copy of a slice of strings.
This is primarily useful when appending to a string slice to avoid
accidentally reusing the backing array.

Test: util_test.go
Change-Id: I7801fc7ca19e27ddc9f1b1b452788b723c7f619c
2019-02-19 11:19:09 -08:00
Colin Cross d7cfaeeebc Fix a bug in OncePer.Get that could return a waiter
OncePer.Get must call maybeWaitFor on the value it reads, otherwise
it could return a waiter instead of the real value.

Test: onceper_test.go
Change-Id: I7d407bd1c577dbb43bc14fa107d5f606bf2b1c67
2019-02-19 11:19:09 -08:00
Colin Cross 93a9e5e3a2 Don't check ABIs in SecondArchIsTranslated
SecondArchIsTranslated is only used to determine whether or not to
dexpreopt the second arch, so it should return false for the case
where the primary and secondary arches are X86_64 and X86, but the
primary arch also lists an Arm ABI.

Bug: 124711830
Test: m on failing build
Change-Id: I6afc2fdda466e0c406dbeada2e9c3df2bb6853bf
2019-02-19 18:18:30 +00:00
Colin Cross 40e3373d41 Add more paths helper methods
Add PathsForOutput to convert multiple strings into WritablePaths.

Add OutputPath.InSameDir to build a new OutputPath pointing to a
file in the same directory as an existing OutputPath.

Add WritablePathForTesting and WritablePathsForTesting that mirror
PathForTesting and PathsForTesting but return WritablePaths.

Add PathContextForTesting to return a minimal PathContext
implementation.

Test: paths_test.go
Change-Id: I9708eb164b273514a96dae0a260ef9a963fb9bcf
2019-02-16 17:08:07 -08:00
Colin Cross 800fe13146 Move dexpreopting of boot jars into Soong
Implement the dexpreopting of boot jars in singleton rules in
Soong.

Test: m checkbuild
Change-Id: Ic02ce941fa5e238b839b3eb4c06a3e10c62d98ff
2019-02-15 16:16:25 -08:00
Jaewoong Jung fc46f28b6f Merge "Add a prebuilt module type for usr/share." 2019-02-14 15:39:33 +00:00
Jaewoong Jung dfa4a486eb Merge "Update Soong docs generator for blueprint changes" 2019-02-14 01:51:04 +00:00
Inseob Kim c0907f191a Create sysprop_library soong module
A newly introduced sysprop_library soong module will generate a
java_sdk_library and a cc_library from .sysprop description files.
Both Java modules and C++ modules can link against sysprop_library
module, thus giving consistency for using generated sysprop API.

As Java controls accessibility of Internal / System properties with
@hide and @SystemApi, 2 different header files will be created. And
build system will selectively expose depending on the property owner
and the place where the client libraries go into.

Bug: 80125326
Bug: 122170616
Test: 1) Create sysprop_library module.
Test: 2) Create empty txt files under prebuilts/sdk.
Test: 3) Create api directory, make update-api, and see changes.
Test: 4) Try to link against sysprop_library with various clients.
Test: 5) Soc_specific, Device_specific, Product_specific, recovery flags
work as intended.
Change-Id: I78dc5780ccfbb4b69e5c61dec26b94e92d43c333
2019-02-13 23:32:51 +00:00
Jaewoong Jung c3fcdb4baa Add a prebuilt module type for usr/share.
This is almost the same as prebuilt_etc except the base path.

Bug: 122616578
Test: prebuilt_etc_test.go + manual test with external/neven
Change-Id: Ie3d17c06a878853ec9df93fe2c61c8772bc5cff4
2019-02-13 12:56:24 -08:00
Colin Cross 7089c27c07 Update Soong docs generator for blueprint changes
bootstrap.ModuleTypeDocs needs a mapping of module types to factories
to support factories that are wrapped in ModuleFactoryAdapter closures.

It also returns ModuleType objects grouped into Package objects.

Bug: 67909957
Test: m soong_docs
Change-Id: I70eac9f0f0e13075580da92d4219792ca0b18fbf
2019-02-13 20:39:26 +00:00
Colin Cross deabb94380 Add RuleBuilder.Installs().String()
Add a RuleBuilderInstalls type for a slice of RuleBuilderInstalls,
and give it a String() method that returns the list of installs
in the format that is convenient for passing to Make.

Test: rule_builder_test.go
Change-Id: I2e9cd9abf4dfb0ad312d0a6662f1567baf9cd222
2019-02-13 08:03:29 -08:00
Colin Cross 8854a5a805 Add OutputPath.ReplaceExtension()
Add a helper method that returns a new OutputPath with the
extension replaced.

Test: paths_test.go
Change-Id: I7f93b3475031a19b53652022740488373a1b7d97
2019-02-12 17:07:35 -08:00
Colin Cross c7ed004dd3 Add RuleBuilderCommand.FlagForEachArg()
Add an analog to FlagForEachInput that takes non-path arguments.

Test: rule_builder_test.go
Change-Id: Ifdf5a16079018bfff9b06ce48b13b104a93fddd7
2019-02-12 17:07:35 -08:00
Colin Cross 74ba962d29 Use ArchType in dexpreopt config
Make ArchType implement the encoding.TextMarshaller and
encoding.TextUnmarshaller interfaces so that it can be used
as a value in the dexpreopt config structs that are passed
through JSON files.

Test: m checkbuild
Change-Id: Ie4c12443e7ee5fe43f42d5403bcde12d62f617e2
2019-02-12 17:05:47 -08:00
Colin Cross a838004f8c Merge "Run makevars singleton after all other registered singletons" 2019-02-13 00:27:33 +00:00
Treehugger Robot 75569e0f46 Merge "Make OncePer.Once reentrant" 2019-02-12 22:58:09 +00:00
Colin Cross 450bde14b8 Merge "Change type of Once keys to OnceKey" 2019-02-12 21:13:56 +00:00
Colin Cross e5cdaf9221 Make OncePer.Once reentrant
The value constructor passed to OncePer.Once may call back into
Once.  Replace the global mutex with a temporary channel stored
in the map using the key, and have callers for the same key
wait on the channel if they find it instead of a real value.

Test: TestOncePerReentrant
Change-Id: Ifa88a3c48981b5076b83f47fbdee5d26311725c6
2019-02-12 19:03:53 +00:00
Colin Cross 580d2ce642 Run makevars singleton after all other registered singletons
Move the makevars singleton after all dyamically registered
singletons, but before the env singleton, to ensure that it
can reference values initialized in other singletons.

Test: m checkbuild
Change-Id: I6ea45d3a174b94d4e89f3168894399e7022733e4
2019-02-11 15:29:51 -08:00
Colin Cross e48ff5bbd4 Change type of Once keys to OnceKey
Require that the key for Once calls be created with NewOnceKey
or NewCustomOnceKey.

Test: m checkbuild
Change-Id: I44b8ea6034338b45f558f862b21d5732364cbf0f
2019-02-11 15:29:51 -08:00
Jaewoong Jung 0dcfee56b8 Merge "Make PrebuiltEtcHostFactory public." 2019-02-11 16:22:13 +00:00
Mikhail Naganov ab1f518fb0 Improve error messages about paths
Quote the path parameter in the message to distinguish it
from the text. This makes messages more understandable.

Before: source path include does not exist
After:  source path "include" does not exist

Test: build Android
Change-Id: I99dbbce3cf090682a230d05bf120549a2cc7af3c
2019-02-08 13:32:08 -08:00