Commit graph

10602 commits

Author SHA1 Message Date
Colin Cross
3047fa23da Build framework.aidl in Soong
Move the rules to build framework.aidl into Soong, and use it
when compiling aidl files with sdk_version: "current".

Also fixes incorrectly using the aidl includes exported by the
"framework" module when the proguardRaiseDep dependency was
added.

Bug: 130798034
Test: sdk_test.go
Change-Id: I126adf1d9e7b6acb528875ff62b974ba7ad9a337
2019-04-18 13:51:58 -07:00
Colin Cross
60405e50f8 Get default sdk_test.go values from config
This will help avoid merge conflicts between branches that have
additional default libraries.

Test: sdk_test.go
Change-Id: I98d5b8b2ea939df7ef57686f3bd913d6a21edc5d
Merged-In: I98d5b8b2ea939df7ef57686f3bd913d6a21edc5d
2019-04-18 12:35:16 -07:00
Colin Cross
79c7c26d8a Add support for prebuilt java_sdk_library modules
Add java_sdk_library_import for use when a java_sdk_library may
be used by unbundled branches that do not have the project that
contains the original java_sdk_library module.

Bug: 130287656
Test: m checkbuild
Change-Id: I62df4bccc0da95ed6c8b31dab8f2c32cc3215e9e
2019-04-17 11:28:34 -07:00
Treehugger Robot
587fb4de9a Merge "Fix: HideFromMake is not registered to llndk_* module types" 2019-04-17 14:40:17 +00:00
Paul Duffin
38b122021a Merge "Rename -extra-deps to --extra-static-libs and add --extra-libs" 2019-04-17 14:06:48 +00:00
Treehugger Robot
59d4a31063 Merge "Use LoadHook to create modules in java_sdk_library" 2019-04-17 08:28:36 +00:00
Jiyong Park
5e676fe9f0 Fix: HideFromMake is not registered to llndk_* module types
llndk_* module types are not initialized via cc.Module.Init(). As a
consequence, mutated properties like HideFromMake, etc. were not
registered and this caused problem when the mutated properties are set
by one of the mutators like the sanitizerMutator. Specifically, both
asan and non-asan variant of an llndk_header were both exported to Make
although HideFromMake was set to true for the non-asan variant.

Fixing this bug by explicitly registering BaseProperties struct which
contains the mutated properties.

Bug: 130652996
Test: Following works:
$ lunch aosp_cf_x86_pasan-userdebug
$ mkdir frameworks/native/test && mkdir frameworks/native/test/include
$ cat > frameworks/native/test/Android.bp
llndk_headers {
    name: "test_headers",
    export_include_dirs: ["include"],
}
^D
$ SANITIZE_TARGET='address' make

Change-Id: I44e3668460448d79382617df61171b0ab5b4d98d
2019-04-17 13:17:47 +09: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
Patrice Arruda
8196356248 Merge "Soong: Add synopsis to ndk_* modules." 2019-04-16 16:14:46 +00:00
Patrice Arruda
3cbdeddaf0 Merge "Soong: Add synopsis to several modules under the cc package." 2019-04-16 15:43:55 +00:00
Paul Duffin
babaf07b13 Rename -extra-deps to --extra-static-libs and add --extra-libs
Allow callers of pom2bp to add dependencies on runtime libraries as
well as static libraries. Renames -extra-deps to --extra-static-libs
to make it clearer what it does.

Bug: 130287656
Test: prebuilts/sdk/update_prebuilts.py --stx 5280039
      prebuilts/misc/common/androidx-test/update-from-gmaven.py

Change-Id: I8a3ee8056aa4ed9935a4f47d563ec423672cf38b
2019-04-16 11:55:48 +01: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
Treehugger Robot
0a0b3fa605 Merge "Embed CSS entries in soong_build.html." 2019-04-16 00:49:18 +00:00
Treehugger Robot
a88fbdef78 Merge "Make makevars deterministic" 2019-04-16 00:43:35 +00:00
Jaewoong Jung
5f867c0580 Embed CSS entries in soong_build.html.
This will prevent it from being affected by future css location changes.

Test: m soong_docs
Fixes: 130567020
Change-Id: I80fd7b8a12a32bcea7b270423b8d8f8dc0976177
2019-04-15 15:21:55 -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
Colin Cross
91268c668c Make makevars deterministic
Sort map keys before iterating over them to produce makevars.

Bug: 130411407
Test: m checkbuild
Change-Id: I4153977705da05a5c73e641f93d02f408209c897
2019-04-12 14:55:16 +00:00
Dimitry Ivanov
4bca455fd9 Merge "Make apex_key HostAndDeviceDefault" 2019-04-12 09:26:15 +00:00
dimitry
f807167023 Make apex_key HostAndDeviceDefault
Since apex_key is used in number of apex_test host_supported modules it
is no longer a device only module.

Test: add new device target and check that the build does not fail
Change-Id: I6402e3b622d22ee0ca0e6af71dfd71a690938e49
2019-04-12 09:26:00 +00:00
Christopher Ferris
41eed99dc7 Merge "Do not re-export _Unwind_XXX symbols." 2019-04-12 04:42:43 +00:00
Christopher Ferris
c3a1e22060 Do not re-export _Unwind_XXX symbols.
Bug: 130267141

Test: All system shared libraries do not contain global _Unwind_XXX symbols.
Change-Id: I79673753bb8197041bfe8ffb016d9f5fdf4cada5
Merged-In: I79673753bb8197041bfe8ffb016d9f5fdf4cada5
(cherry picked from commit cf78867417)
2019-04-11 17:54:48 -07:00
Treehugger Robot
8235220a82 Merge "Expose TargetFSConfigGen to DeviceConfig from Make" 2019-04-11 23:36:09 +00:00
Treehugger Robot
34df71446f Merge "pom2bp: add jar deps to -nodeps modules" 2019-04-11 23:11:23 +00:00
Colin Cross
df8eebecaa Zip boot image
Create a zip file containing the zipped boot image files.

Test: m out/soong/sailfish/dex_bootjars/boot.zip
Change-Id: I1b08c9aca962a5999585cbe9e665693ef4558524
2019-04-11 23:03:23 +00:00
Logan Chien
b10243dc4e Merge "Add --llndk for NDK libs as well" 2019-04-11 16:38:42 +00:00
Logan Chien
62f1f9488e Add --llndk for NDK libs as well
This commit add `--llndk` to the command line option for
`create_reference_dumps.py` as well.

Bug: 124620774
Bug: 130324828
Test: lunch aosp_arm64-userdebug && make
Change-Id: I117864209b8cf8c934fd3aa1086b7691c1c449e3
2019-04-11 05:40:57 +00: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
Treehugger Robot
33055f641a Merge "Fix relative path of bpf modules" 2019-04-11 02:07:27 +00:00
Colin Cross
9dc186f120 Merge "Add robolectric-shadows to setup_go_workspace_for_soong.sh" 2019-04-10 20:28:56 +00:00
Colin Cross
0adfee5a20 Fix relative path of bpf modules
Using bpf as test data installs the module into a strange
subdirectory, clear the Rel() value before exporting it as
a SourceFileProducer.

Bug: 130206035
Test: m vts_test_binary_bpf_module
Change-Id: Ifdae90d11b15d65c097562d7d6985a8a1dca2bfd
2019-04-10 18:32:00 +00:00
Colin Cross
1aa7f26a22 pom2bp: add jar deps to -nodeps modules
The dependency type in the pom file is not always accurate, just
add all jar and aar dependencies to both the -nodeps and final
module.

Test: cd prebuilts/sdk/current/androidx && pom2bp -regen Android.bp && mma
Change-Id: I1784b8ebf3485db19405cb353c9bb5fb3ae837d8
2019-04-10 18:31:55 +00: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
c4bd8f8282 Include proper deps for signapk
Bug: 130111713
Test: run signapk remotely, action succeeds after this change
Change-Id: I1670a27341591e0762cdfb42bcf424f065837192
2019-04-09 21:26:14 -07:00
Patrice Arruda
6ea42118f2 Soong: Add synopsis to ndk_* modules.
Added synopsis to the following modules under cc package:
    * ndk_headers
    * ndk_library
    * versioned_ndk_headers
    * preprocessed_ndk_headers

Bug: b/128337482
Test: Generated the documentation and verified that the synopsis was
added to each of the module.

Change-Id: I2146919528cf039ed9327b3358de5b1bdb28275a
2019-04-09 18:50:44 -07:00
Treehugger Robot
cb4e0551a2 Merge changes I2bff8fb8,Ifa584479
* changes:
  Add extra used dependencies
  Update default soong config
2019-04-10 00:08:44 +00:00
Dan Willemsen
25e6f09c06 Add BUILD_BROKEN_USES_NETWORK
Some people apparently still talk to the network during their build.
Allow this temporarily with a BUILD_BROKEN_USES_NETWORK check.

Bug: 129992021
Test: attempt to talk to the network during the build with and without
      this flag.
Change-Id: Ifb967c656aa24c4599e7232d0f1b5a303b5bac52
2019-04-09 10:23:49 -07:00
Dan Willemsen
aad19605c5 Add extra used dependencies
Found while executing the build actions remotely.

Bug: 130111713
Test: treehugger
Test: run actions remotely with given dependencies, they pass.
Change-Id: I2bff8fb8ccf50fde446d6bcef0f1dca9b2974b4b
2019-04-09 09:50:25 -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
Elliott Hughes
ad459bb8db Merge "Add toybox seq." 2019-04-09 14:26:01 +00:00
Colin Cross
7dd6ceb3b9 Merge "Fix python proto srczip argument order" 2019-04-09 13:44:15 +00:00
Nicolas Geoffray
ce93e3c672 Merge "Use the full dexpreopt boot classpath when preopting with other images." 2019-04-09 06:04:43 +00:00
Colin Cross
09364fd955 Fix python proto srczip argument order
-P has to come before -D to have an effect on the files read from the
directory.

Fixes: 130160833
Test: atest acloud_test
Change-Id: I62a998f1ad1e3b45f590babbf39330955d368373
2019-04-08 20:04:23 +00:00
Nicolas Geoffray
06758a7e13 Use the full dexpreopt boot classpath when preopting with other images.
Bug: 119800099
Test: m
Change-Id: Ia9b34aa92ebb1b4de96ea0f8f290d798be19b2cf
2019-04-08 17:20:27 +01:00
Elliott Hughes
c2dbadc363 Add toybox seq.
Bug: https://issuetracker.google.com/129992021
Test: builds
Change-Id: I63d5b3fd1c71b771e995638094ee4310435105ee
2019-04-08 09:19:45 -07:00
Vladimir Marko
0975ee0de3 Check package restrictions for Java libs.
Test: m checkbuild; inspect verbose log.
Test: Manual - compile with unmet restrictions.
Bug: 122937705
Change-Id: I9360ae8b6d9ce016b7827be5e8ffc6eb521809b7
2019-04-08 14:02:14 +01:00
Colin Cross
5e5b2c7f1c Add robolectric-shadows to setup_go_workspace_for_soong.sh
Bug: 122331577
Test: setup_go_workspace_for_soong.sh
Change-Id: I173174927f9d107c4a196968b568ace6473394c7
2019-04-08 05:46:07 +00:00
Nikita Ioffe
04b99cbf6d Merge "Make prebuilt_apex be usable via :modulename syntax" 2019-04-08 05:22:05 +00: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