Commit graph

20358 commits

Author SHA1 Message Date
Colin Cross
7cdad45cf2 Add Stat to finder/fs
Add a Stat method to finder/fs that will be used by finder to read
the mode of the target of a symlink.

Bug: 157656545
Test: fs_test.go
Change-Id: Ie2b4509b7d11857d9a1685de4477088b91d43c63
2020-06-29 23:30:38 -07:00
Colin Cross
7f8aa39abe Move finder_test filesystem helper functions to fs/test.go
Move the filesystem helper functions used by finder_test.go into the
fs package so they can also be used by fs tests.

Bug: 157656545
Test: m checkbuild
Change-Id: I5ac3a1f502d8e2cb7c15dd70ca85a46d20f939a6
2020-06-29 23:30:38 -07:00
Colin Cross
181c2a40d8 Merge changes I25c77994,I7da78ef4,I89197d0a
* changes:
  Support adding extra lint checks
  Allow kotlin modules to skip packaging the kotlin stdlib
  Fix annotation processors in kotlin modules that generate resources
2020-06-19 19:52:37 +00:00
Paul Duffin
333cb9ea44 Merge "Instrument the java_sdk_library implementation library" 2020-06-19 18:20:28 +00:00
Nicolas Geoffray
b758a37876 Merge "Add ICU SDK and module_exports to the list." 2020-06-19 07:22:33 +00:00
Colin Cross
92e4b46af5 Support adding extra lint checks
Add a lint.extra_check_modules property to list modules to use as
plugins to Lint.

Bug: 153485543
Test: m checkbuild
Change-Id: I25c7799438cfec43163e757637c65b8657488d36
2020-06-18 15:58:32 -07:00
Colin Cross
0b67a8bd0f Allow kotlin modules to skip packaging the kotlin stdlib
Host tools like lint may package their own version of the kotlin
stdlib, and any jars loaded by them shouldn't contain the platform
version.  Add a static_kotlin_stdlib property that defaults to true
to allow building the module without staticalling including the kotlin
stdlib.

Bug: 153485543
Test: m ApiFinder
Change-Id: I7da78ef493806ce4ab0050e4ee9e8d330b0509c8
2020-06-18 15:58:32 -07:00
Colin Cross
9ca38d22a4 Fix annotation processors in kotlin modules that generate resources
The kapt rule was only keeping the generated sources, and not the
generated classes directory.  The generated classes directory will
contain resources generated by the annotation processor and needs
to be added to the final jar.

Test: m ApiFinder
Bug: 153485543
Change-Id: I89197d0afcb1eee011c01aa400f9977e66f43768
2020-06-18 15:58:28 -07:00
Makoto Onuki
56ecbaef4c Merge "Disable "show member in hidden parent" metalava error" 2020-06-18 22:57:48 +00:00
Treehugger Robot
bf6a8aeec2 Merge "Add test-suite-tag to test_options" 2020-06-18 22:33:30 +00:00
Christopher Parsons
cd767eefe5 Revert "Add Android.bp.list and soong.variables to inputs for soong_docs action"
This reverts commit 67eee7cae4.

Reason for revert: Broke renderscript build

Change-Id: Ie26b3c7a78afe44d719f399520e643174109593f
2020-06-18 21:49:48 +00:00
Makoto Onuki
1d5b713275 Disable "show member in hidden parent" metalava error
There are a quite few violations unfortunately, so let's disable it for now.
The plan is to fix all the issues in the internal master and enable it.

Bug: 159121253
Test: build / Tree hugger
Change-Id: I0b0ce937ecd17853b3bb32f7605310b21be77b31
2020-06-18 13:34:19 -07:00
Paul Duffin
296cf33171 Instrument the java_sdk_library implementation library
Bug: 159241638
Test: build jacoco-report-classes-all.jar with and without
      prebuilt for framework-tethering. Ensure it contains the
      jacoco-report-classes.jar for framework-tethering.
Change-Id: I8183bd9613dfaf0ded5f9ac36567d5d29a8941e8
2020-06-18 21:19:08 +01:00
David Srbecky
519db27d98 Add test-suite-tag to test_options
Bug: 147817558
Test: Check the generated config file
Change-Id: I679dc7b4a582486ac61380a7e42f1373534d7086
2020-06-18 19:22:49 +01:00
Chris Parsons
67eee7cae4 Add Android.bp.list and soong.variables to inputs for soong_docs action
While this is not a comprehensive list of all inputs of this action (as the action
depends on all blueprint files in the source tree), this closer to the truth.

Test: Manually verified ninja output, checkbuild approved validation for aosp-crosshatch
Change-Id: I77a0f612afb025232bee7d3ac31257b808991829
2020-06-18 12:06:37 -04:00
Treehugger Robot
1a1e1f882f Merge "Propagate unique_host_soname to cc_library prebuilts." 2020-06-18 14:34:14 +00:00
Nicolas Geoffray
7505c50e49 Add ICU SDK and module_exports to the list.
Test: m
Bug: 157734636
Change-Id: If0c967f75578471286f3760f2f15e576752e162d
2020-06-18 15:33:18 +01:00
Yo Chiang
977dc2281f Merge "VNDK listing contains device modules only" 2020-06-18 09:48:02 +00:00
Colin Cross
a553358b34 Merge "Add support for running Android lint on java and android modules." 2020-06-18 01:16:40 +00:00
Chih-hung Hsieh
80f20d14de Merge "Generate multilib for rust_test" 2020-06-17 23:07:19 +00:00
Martin Stjernholm
47ed352227 Propagate unique_host_soname to cc_library prebuilts.
Test: m nothing
Test: Check on go/Android.bp that cc_prebuilt_library supports
  unique_host_soname
Bug: 158743135
Change-Id: Ie02a5cae057fb9092c226d8c5b7f63e1f66ad066
2020-06-17 23:06:43 +01:00
Treehugger Robot
d7ffbb578d Merge "Consolidate adding common java properties" 2020-06-17 21:52:55 +00:00
Chih-Hung Hsieh
e728a89807 Generate multilib for rust_test
* Cannot generate multilib for host tests yet.

Bug: 158677299
Test: atest -c -m --include-subdirs external/rust/crates
Change-Id: I7071c1ea30865a8cf268dfe270f2a586eb7710d9
2020-06-17 13:08:00 -07:00
Anton Hansson
0e63a8e761 Merge "Fix check-boot-jars when a boot jar is provided by prebuilt" 2020-06-17 19:30:09 +00:00
Ivan Lozano
a4e8a640bb Merge "[Rust] Correct the gcov path prefix." 2020-06-17 18:58:52 +00:00
Martin Stjernholm
c38936add4 Merge "Build against SDKs for native libs only for unbundled apps." 2020-06-17 17:31:24 +00:00
Paul Duffin
44b481b81b Fix check-boot-jars when a boot jar is provided by prebuilt
Previously, when a boot jar was provided by a java_sdk_library_import
module the check-boot-jars check failed because the file it depended on
was not available. In an incremental build the build failed due to the
file in the out directory not having a rule to generate it.

That was because the module was named prebuilt_<module>.<apex> instead
of <module>.<apex>. This was fixed by simply removing prebuilt_ prefix
from the name if it was present.

After fixing that the check-boot-jars still did not work properly
because it was expecting a jar file containing .class files but instead
was given a jar file containing .dex files which meant the check did
not work properly.

This was fixed by defining a new ApexDependency interface for use by
the apex/apex.go code to use instead of java.Dependency for generating
the androidmk entries. The *SdkLibraryImport type then implemented
those, by delegating to the implementation library.

Bug: 158304459
Bug: 159112414
Test: m check-boot-jars
      m checkbuild
	  manual inspection of the .jar file used by check-boot-jars to
	  ensure it contained .class files and not .dex files.
Change-Id: I545c5c9072dd472337d2f9b4dfdf08f53c981662
2020-06-17 16:59:43 +01:00
Ivan Lozano
796fc4c8be [Rust] Correct the gcov path prefix.
strings.TrimPrefix() args are reversed, leading to an incorrect gcov
path prefix for Rust coverage.

Bug: 156482307
Test: built and ran unicode-xid_device_tests_unicode_xid with coverage
Change-Id: I6476cee14093a7e53738019c84dbcf4333b0b9b2
2020-06-17 11:39:17 -04:00
Patrice Arruda
0f688004b1 Add a new module named prebuilt_dsp.
prebuilt_dsp soong module allows to install DSP related file to
<partition>/etc/dsp directory. If soc_specific property is enabled
to true, it is then installed to <partition>/dsp directory for
vendor image.

Bug: b/157259542
Test: Wrote unit test cases.
Change-Id: I15431a14bf399338a00835718dfe29544be02e34
2020-06-17 15:38:22 +00:00
Ivan Lozano
d825990336 Merge "[Rust] Remove unused variables and deduplicate." 2020-06-17 12:28:06 +00:00
Treehugger Robot
6116ffdcf5 Merge "Don't create version variants for SDK variants" 2020-06-17 04:19:04 +00:00
Jiyong Park
2286afd0ef Don't create version variants for SDK variants
When a lib has sdk_version set, an SDK variant and a platform variant
are created by the sdkMutator. Then by the versionMutator, if the
library had 'stubs.versions' property, one or more versioned variants
and one impl variant are created for each of the two (SDK and platform)
variants. As a concrete example,

cc_library {
    name: "foo",
    sdk_version: "current",
    stubs: { versions: ["1", "2"], },
}

would create 6 variants:

1) (sdk: "", version: "")
2) (sdk: "", version: "1")
3) (sdk: "", version: "2")
4) (sdk: "sdk", version: "")
5) (sdk: "sdk", version: "1")
6) (sdk: "sdk", version: "2")

This is somewhat uncessary because the need for the SDK mutator is to
have the platform variant (sdk:"") of a lib where sdk_version is unset,
which actually makes sens for the impl variant (version:""), but not
the versioned variants (version:"1" or version:"2").

This is not only unncessary, but also causes duplicate module
definitions in the Make side when doing an unbundled build. Specifically,
The #1 and #4 above both are emitted to Make and get the same name
"foo".

To fix the problem and not to create unnecessary variants, the versioned
variants are no longer created for the sdk variant. So, foo now has
the following variants only.

1) (sdk: "", version: "") // not emitted to Make (by versionMutator)
2) (sdk: "", version: "1") // not emitted to Make (by versionMutator)
3) (sdk: "", version: "2") // emitted to Make (by versionMutator)
4) (sdk: "sdk", version: "") // not emitted to Make (by versionMutator)

Bug: 159106705
Test: Add sdk_version:"minimum" to libnativehelper in libnativehelper/Android.bp.
m SOONG_ALLOW_MISSING_DEPENDENCIES=true TARGET_BUILD_UNBUNDLED=true libnativehelper

Change-Id: I6f02f4189e5504286174ccff1642166da82d00c9
2020-06-17 04:18:21 +00:00
Yo Chiang
f298a3f325 Merge "Don't emit superfluous LOCAL_OVERRIDES_MODULES" 2020-06-17 04:03:03 +00:00
Martin Stjernholm
fd9eb4b8a6 Build against SDKs for native libs only for unbundled apps.
Unbundled APEX modules need to access the platform variant (i.e.
sdk:"") since it's there that the versioned stubs are exposed.

Test: m SOONG_ALLOW_MISSING_DEPENDENCIES=true \
        TARGET_BUILD_UNBUNDLED=true toybox
  on master-art with prebuilt Runtime (Bionic) APEX SDK. The prebuilt
  SDK doesn't have libc.ndk.xxx etc, which e.g. libcrypto would depend
  on without this CL, since it specifies sdk_version.
Bug: 157549171
Change-Id: I3095e42beb2b48421bfb81be942cc2ac30405fd0
2020-06-17 04:28:27 +01:00
Colin Cross
a2e64e7b84 Merge "Use inclusive language in Android.bp files" 2020-06-17 01:04:26 +00:00
Inseob Kim
bee157256d Merge "Always create both variants for kernel headers" 2020-06-16 23:38:02 +00:00
Inseob Kim
9a0b897904 Merge "Choose SAbi files with module's vndk version" 2020-06-16 23:38:00 +00:00
Inseob Kim
6fec12abc7 Merge "Exclude kernel_headers from vendor snapshot" 2020-06-16 23:37:57 +00:00
Colin Cross
cbd62d07d4 Use inclusive language in Android.bp files
Test: m checkbuild
Change-Id: Id9efbd99be54b191193eae1c5672230ca54cf1d2
Merged-In: Id9efbd99be54b191193eae1c5672230ca54cf1d2
2020-06-16 23:36:51 +00:00
Colin Cross
014489c1e6 Add support for running Android lint on java and android modules.
Add a rule that runs Android lint on each java and android module
and produces reports in xml, html and text formats.

Bug: 153485543
Test: m out/soong/.intermediates/packages/apps/Settings/Settings-core/android_common/lint-report.html
Change-Id: I5a530975b73ba767fef45b257d4f9ec901a19fcb
2020-06-16 15:44:16 -07:00
Treehugger Robot
001ad5a6fc Merge "Installed APKs should not have prebuilt_ prefix" 2020-06-16 22:34:29 +00:00
Treehugger Robot
e6c1d80072 Merge "Prefer armv8.2-a to armv8.2a for GNU as compatibility" 2020-06-16 21:45:06 +00:00
Christopher Parsons
549a0d866a Merge "When bpfix fails in androidmk, output the tree anyway" 2020-06-16 20:16:03 +00:00
Alex Humesky
c7f8b74365 Merge "Do not override "-g:source,lines" for host java binaries when PRODUCT_MINIMIZE_JAVA_DEBUG_INFO is set." 2020-06-16 20:08:58 +00:00
Sasha Smundak
57f0ee1fa9 Installed APKs should not have prebuilt_ prefix
Bug: 159031374
Test: treehugger & manual
Change-Id: I48f2595781efc1303c777619e082ce7765b73038
2020-06-16 09:41:02 -07:00
Ivan Lozano
8a23fa4819 [Rust] Remove unused variables and deduplicate.
Bug: 158731826
Test: cd external/rust/crates; mma
Change-Id: I8c9e5cfeaf941b9676b92451b227c15db9a41bbc
2020-06-16 10:28:25 -04:00
Stephen Hines
502f901e17 Prefer armv8.2-a to armv8.2a for GNU as compatibility
There are still out-of-tree users of `-fno-integrated-as`, which will
have issues without the hyphen.

Bug: http://b/158191033
Test: ./build.py
Change-Id: I44b68ab5b65a68df3993f38b99662178915e9be2
2020-06-16 02:40:40 -07:00
Paul Duffin
e40383355b Merge "Let APEX build against preferred java_sdk_library_import" 2020-06-16 09:37:53 +00:00
Yo Chiang
12d9f7a103 Don't emit superfluous LOCAL_OVERRIDES_MODULES
Don't emit an empty LOCAL_OVERRIDES_MODULES line if APEX is not
overriding any module.

Test: TH noop
Change-Id: I7abbaccd54bf2ffa25a6c798260c81284ea5ecb2
2020-06-16 17:33:57 +08:00
Alex Humesky
2070e32eb9 Do not override "-g:source,lines" for host java binaries when PRODUCT_MINIMIZE_JAVA_DEBUG_INFO is set.
Test: Ran unittests
Change-Id: Ic061b4bf107bcd931813d69f6d72b521d79fbc35
2020-06-15 21:33:49 -04:00