Commit graph

20461 commits

Author SHA1 Message Date
Colin Cross
8ec6261388 Merge changes Ie33d2e05,Ie2b4509b,I5ac3a1f5
* changes:
  Fix finder on symlinks pointing to directories
  Add Stat to finder/fs
  Move finder_test filesystem helper functions to fs/test.go
2020-07-01 15:42:22 +00:00
Treehugger Robot
8f70db2b48 Merge "Rename the Default* constants in java/config." 2020-07-01 14:43:46 +00:00
Treehugger Robot
286d8f9972 Merge "Prepare Soong for switch to stable core/platform API." 2020-07-01 11:57:26 +00:00
Pete Gillin
0638dfcf94 Rename the Default* constants in java/config.
These values are used in two out of the many possible sdk_version
configurations, and therefore weren't really defaults in any
meaningful sense. Giving them more descriptive names makes the code
easier to follow.

Bug: 157640067
Test: m nothing
Change-Id: Icf38a9c0be2606ad0478929e1b40dfcee36cddef
2020-07-01 12:40:58 +01:00
Pete Gillin
40a0642385 Prepare Soong for switch to stable core/platform API.
This ensures that `m nothing` succeeds even if java/config/config.go
is changed to use `stable.core.platform.api.stubs` and
`stable-core-platform-api-stubs-system-modules` instead of the legacy
versions. (The change to stable cannot be made yet because real
targets depend on APIs only in legacy, but it is useful for the build
system to be ready for this change.)

Bug: 157640067
Test: m nothing (with and without local change mentioned above)
Change-Id: Id7562d8c592551fd0ed2b9849bcf6eb707c2a1d0
2020-07-01 11:31:30 +01:00
Nicolas Geoffray
7462eda53e Merge "Add host exports for platform libraries used by ART host testing." 2020-07-01 08:33:56 +00:00
Treehugger Robot
ba2268fd60 Merge "Remove stale doc comment" 2020-07-01 05:20:12 +00:00
Dan Willemsen
f2b480e6cd Remove stale doc comment
This warning is no longer necessary after https://android-review.googlesource.com/c/platform/build/soong/+/1235631

Bug: 160208353
Change-Id: I006272e8d4c3780d7e9f452013ca9d5db3c63613
Test: none
2020-06-30 17:27:07 +00:00
Chih-Hung Hsieh
5c4e48956c Enable genrule modules for Rust host binaries
* Add HostToolPath to use rust_binary_host modules as host tools.

Bug: 157666974
Test: make with local genrule examples
Change-Id: I9648313c0f0695d2e695f18ded4710350b2d6475
2020-06-30 10:23:49 -07:00
Thiébaud Weksteen
79e546f7df Merge "Remove moduleContextImpl struct" 2020-06-30 16:48:15 +00:00
Nicolas Geoffray
ba7887fd53 Add host exports for platform libraries used by ART host testing.
Test: build-mainline-modules.sh
Bug: 142935992
Change-Id: I81247b89b78426463faeb6b00212cd8901319b19
2020-06-30 15:02:51 +01:00
Paul Duffin
cfc2df847c Merge "Track the current java_sdk_library(_import) deps" 2020-06-30 11:06:54 +00:00
Paul Duffin
452bf39014 Merge "Apply hiddenapi encoding to java_sdk_library .impl" 2020-06-30 10:41:42 +00:00
Colin Cross
25fd77310c Fix finder on symlinks pointing to directories
When finder encountered a symlink pointing to a directory it attempted
to ignore it, but becuase Lstat returns the a *os.FileInfo for the
symlink the child.IsDir() check always returned false.  Call Stat
on the symlink to get the *os.FileInfo for the target of the symlink.

Bug: 157656545
Test: finder_test.go
Change-Id: Ie33d2e05d5c435b48e83eaeadf7b3c9816398404
2020-06-29 23:30:38 -07:00
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
Liz Kammer
a66f571e01 Merge "Add relative_install_path property to prebuilt_etc" 2020-06-29 22:50:36 +00:00
Treehugger Robot
1aaad5193f Merge "[cc/pgo] Fix incorrect project name" 2020-06-29 21:23:05 +00:00
Treehugger Robot
e9eacaa061 Merge "Move gen-kotlin-build-file.sh to python" 2020-06-29 21:12:45 +00:00
Paul Duffin
a2058f8b7d Apply hiddenapi encoding to java_sdk_library .impl
Adds a ConfigurationName property, and ConfigurationName() method that
allows a library to separate its name (e.g. framework-tethering.impl)
from the name used in the build configuration,
    e.g. ctx.Config().BootJars().

Updates hiddenapi processing to use ConfigurationName() instead of
ctx.ModuleName().

Changes java_sdk_library to set the ConfigurationName property
of the implementation library to the name of the module instead of
<module>.impl so that it will match the name in the boot jars list.

Bug: 159683330
Test: m framework-tethering
      dexdump ${PRODUCT_OUT}/apex/com.android.tethering/javalib/framework-tethering.jar | grep hiddenapi | wc -l
      Verify that there are >0 hiddenapi entries.
      Add java_sdk_library_import prefer=true for framework-tethering
      and repeat the above to verify that there are 0 hiddenapi entries.
      Apply this change, repeat above and verify that there are the same # of entries as before.
      Remove the prebuilt for framework-tethering
      Repeat the above and verify that there is no change to the # of entries
Merged-In: I6c3016c35d0fcb1b95d4f9b37a307a69878f8e0a
Change-Id: I6c3016c35d0fcb1b95d4f9b37a307a69878f8e0a
(cherry picked from commit c4422106a7)
2020-06-29 19:05:19 +01:00
Liz Kammer
0449a6337e Add relative_install_path property to prebuilt_etc
This supports a more consistent property across modules for specifying a
subdirectory to install a file into for prebuilt_etc modules.

Updates bpfix to rewrite `sub_dir` to `relative_install_path`.

Test: gotest prebuilt_etc_test
Test: gotest bpfix_test
Bug: 156568187
Change-Id: Idd05cd2178c46e290764a3b708faa8275818ca1e
2020-06-29 10:54:03 -07:00
Pirama Arumuga Nainar
9d544a83bf [cc/pgo] Fix incorrect project name
Bug: http://b/159920645

Look for internal profiles at the correct project.

Test: N/A
Change-Id: I6a64adbb043da7e419f99c3182d2ec29240ad8f3
2020-06-29 09:25:51 -07:00
Paul Duffin
ca8d9a5018 Track the current java_sdk_library(_import) deps
Adds some tests to track the current dependencies between
java_sdk_library, java_sdk_library_import and their child modules in
various configurations. This is in preparation for a series of changes
that will update the dependencies to ensure that the java_sdk_library
always depends on the source modules that it creates and
java_sdk_library_import always depends on the prebuilt modules that it
creates.

Comments in the tests highlight the parts that will be affected by the
follow up changes.

Bug: 159902351
Test: m nothing
Change-Id: I8eea3ac80061f5cbbc9dec201750c4b59e224b4b
2020-06-29 13:15:33 +01:00
Thiébaud Weksteen
5e291c238f Fix bpfmt issues and add bpfmt to preupload checks
Test: m nothing
Change-Id: I10526a33685335bdd26cc7692815133379d4e0f6
2020-06-29 09:14:08 +02:00
Treehugger Robot
0c6f111d7b Merge changes Ifd2858dd,I2585dd99,I65e7a456
* changes:
  apex: use SubName for requiredDeps
  apex: support "vendor: true"
  apex: AndroidMk writes common properties
2020-06-29 02:20:56 +00:00
Roland Levillain
aca944916a Add "art/test" to the list of Core Library projects.
Allow modules under art/test to use `sdk_version: "none"`. This is so
that ART run-test module definitions can use the same settings as
Libcore tests:

  sdk_version: "none",
  system_modules: "core-all-system-modules",

Test: m nothing
Bug: 147814778
Change-Id: Ibb74d6a06a6609be511403c51ca7a02204bf606f
2020-06-27 16:20:00 +01:00
Roland Levillain
e95eb455cc Merge "Add soong.java.testProperties to java_defaults module type." 2020-06-27 14:33:12 +00:00
Colin Cross
9b1aa0cb86 Move gen-kotlin-build-file.sh to python
Kotlin common multiplatform sources support will require more
complexity in gen-kotlin-build-file.sh, move it to python instead.

Test: m checkbuild
Change-Id: I02312160ad781877f1fec971168331c0dcecf136
2020-06-26 22:41:34 -07:00
Matthew Maurer
85a08fc454 Merge "Add clippy-driver build rule" 2020-06-26 20:33:37 +00:00
Treehugger Robot
a8bfdbd131 Merge "Update rustc to 1.44.0" 2020-06-26 19:26:09 +00:00
Nicolas Geoffray
eb2676ea71 Merge "Add platform libraries required for ART chroot testing." 2020-06-26 19:10:30 +00:00
Treehugger Robot
b1af227b4a Merge "Add Matt to OWNERS for Rust" 2020-06-26 17:22:09 +00:00
Chris Gross
8f3386e49b Merge "Use a default exclude filter for JaCoCo in Soong." 2020-06-26 14:59:15 +00:00
Nicolas Geoffray
792ea7359a Add platform libraries required for ART chroot testing.
Those libraries are not in an APEX, and are provided as stubs
in the platform-mainline-sdk. Therefore compile them explicitly and make
them available in the dist directory.

Test: scripts/build-mainline-modules.sh
Bug: 142935992
Change-Id: I919d8c580e907ce9a7b54366653d0c63ab9d00c7
2020-06-26 15:17:47 +01:00
Jeff Vander Stoep
530dccb8c5 Update rustc to 1.44.0
Test: Treehugger
Change-Id: Ib940bc5afbbbec6b16ed7c2879ad31438e58907d
2020-06-26 15:26:49 +02:00
Roland Levillain
b5b0ff3555 Add soong.java.testProperties to java_defaults module type.
This is so that we can use some test properties in a `java_defaults`
module for ART run-tests.

Test: atest art-run-test-001-HelloWorld
Bug: 147814778
Change-Id: Ifb9817ca2f08e64f911c123a4022fbf688405547
2020-06-26 12:51:37 +01:00
Thiébaud Weksteen
92f703b084 Add clippy-driver build rule
Depending on the location of the repository (e.g. external/, vendor/), a
different set of lints will be enabled. Add the clippy property to the
rust_* modules. This property can be used to overwrite the default
behaviour.

Test: m checkbuild
Bug: 157238651
Change-Id: Ife0f723ef4a74abb102597f8486a7b9f30e7d351
2020-06-26 13:31:21 +02:00
Ulyana Trafimovich
3d88ad68be Merge "Move construct_context.sh from Make to Soong. Update OWNERS list." 2020-06-26 08:46:58 +00:00
Jingwen Chen
d06f11ee71 Merge "Support multiple dists per Android.bp module, and dist output selection." 2020-06-26 08:03:27 +00:00
Jeff Vander Stoep
03186ed247 Add Matt to OWNERS for Rust
Test: n/a
Change-Id: Ibecfd0edd9950a161246d9a13179d88f7e957244
2020-06-26 09:23:47 +02:00
Thiébaud Weksteen
9ae615fb99 Merge "Remove duplicate Helper call" 2020-06-26 07:18:02 +00:00
Treehugger Robot
3e2a34dd8d Merge "Dist build.ninja and Android.bp.list" 2020-06-25 22:23:45 +00:00
Colin Cross
8ba7d47bba Dist build.ninja and Android.bp.list
Debugging issues on the build servers can be difficult because the
intermediate files are not visible.  Gzip ninja file and Makefiles
generated by Soong and the ninja files generated by Kati to the dist
directory, and also copy all of the finder output files.

Bug: 157656545
Test: m dist nothing
Change-Id: I48d75305e551ccae81c7a55721981cf58acd838b
2020-06-25 12:50:00 -07:00
Thiébaud Weksteen
5f2de778f4 Remove duplicate Helper call
The testRustContext function is used to prepare the environment for the
unit tests. As such, it is marked as a Helper function. Remove a
second superfluous call within its definition.

Test: m nothing
Change-Id: I37ea9a584b33498794c1cac828a7557d4bea8d7c
2020-06-25 21:25:41 +02:00
Liz Kammer
d9857f83a8 Merge "Add androidmk error for multiple assignments" 2020-06-25 18:11:07 +00:00
Chris Gross
2f748692dd Use a default exclude filter for JaCoCo in Soong.
Instrumented builds should exclude certain classes from instrumenation
by default. (e.g. JaCoCo itself) Leverage the existing
DefaultJacocoExclusionFilter to do this.

Note: Two different default filters exist now (one for Make and one for
Soong), as they have different wildcard rules.

Test: EMMA_INSTRUMENT=true EMMA_INSTRUMENT_STATIC=true m -j32
TeleService and inspected the resulting temporary jar that was
instrumented to confirm that anything from org/jacoco was excluded.
Bug: 159748844

Change-Id: I5466b0a03957edfbe53971d5d1a7729fdb8337db
2020-06-25 16:45:44 +00:00
Martin Stjernholm
c4fe0dd3cc Merge "Disable flattening only for unbundled apps." 2020-06-25 13:49:30 +00:00
Ulya Trafimovich
5cb30c5820 Move construct_context.sh from Make to Soong. Update OWNERS list.
This script belongs with other manifest-related scripts, and the future
plan is to rewrite it in Python and share common functionality with
other scripts.

Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: I4b90129e5023ca1a2c818fc160c34b0b7da943ef
2020-06-25 14:46:35 +01:00
Jingwen Chen
40fd90ae52 Support multiple dists per Android.bp module, and dist output selection.
This CL adds "dists" to the base property struct to support multiple
dist file configurations, and generic tag support to dist tagged outputs
of modules.

Fixes: b/152834186
Test: soong tests and `m sdk dist`

Change-Id: I80c86bc9b7b09e671f640a4480c45d438bdd9a2a
Signed-off-by: Jingwen Chen <jingwen@google.com>
2020-06-25 12:42:07 +00:00
Jooyung Han
efb184e499 apex: use SubName for requiredDeps
apexBundle keeps the required dependencies for native modules which are
external dependencies and then records it in .mk file as
LOCAL_REQUIRED_MODULES key.

LOCAL_REQUIRED_MODULES should list module name which are made of
cc.BaseModuleName() + SubName.

By the way, because a use_vendor:true apex is supposed to be installed
in /system/apex, we don't append SubName(.vendor) suffix.

Bug: 159211312
Bug: 155841765
Test: m
Change-Id: Ifd2858dda0b373110a0cd18a0c55db41f0fc2a99
2020-06-25 17:14:25 +09:00