Commit graph

15055 commits

Author SHA1 Message Date
Jooyung Han
5e493d5660 Merge "fix: "no_apex" can be put in defaults" 2019-09-26 01:07:21 +00:00
Daniel Norman
488e7e02a2 Merge "Performs same checks as aidl_interface.go before stripping leading "I"." 2019-09-26 00:33:57 +00:00
Alexander Smundak
f0eb968d2f Merge "Build output directory should be an absolute path." 2019-09-25 21:51:37 +00:00
Alexander Smundak
a628a97ed5 Merge "Generate revision.txt file containing unique ID." 2019-09-25 20:22:03 +00:00
Treehugger Robot
8f2a61fef1 Merge "Remove libneuralnetworks from libbinder whitelist." 2019-09-25 16:54:13 +00:00
Ivan Lozano
a38312c3d3 Merge "Add Soong test for device proc-macro deps." 2019-09-25 15:17:32 +00:00
Przemyslaw Szczepaniak
598898444f Remove libneuralnetworks from libbinder whitelist.
Test: build & flash crosshatch
Bug: 139282353
Change-Id: Iaf7904fdb306dd648430ce7e167977bd6508f146
Merged-In: Iaf7904fdb306dd648430ce7e167977bd6508f146
(cherry picked from commit 76b155448d)
2019-09-25 13:04:48 +01:00
Jooyung Han
cc372c5b1d fix: "no_apex" can be put in defaults
Currently, putting no_apex in defaults module doesn't work.

To fix this,
* 'no_apex' property is added as 'defaultable'.
* apex module doesn't follow beyond 'defaults' module.

Bug: 141560644
Test: m (soong tests added)
Change-Id: I8410785f7f83d843689a33b1241d74086c6a7671
2019-09-25 15:27:47 +09:00
Treehugger Robot
72b43adb56 Merge "Add 'make fuzz' build rule." 2019-09-25 06:14:41 +00:00
Mitch Phillips
d3254b4899 Add 'make fuzz' build rule.
Adds the `make fuzz` build rule. This offers a few features on top of
`make haiku`:
 1. Identifies all fuzz targets through the build system, rather than
 having to maintain a golden file.
 2. Packages now exist in out/soong/ and are packaged on a per-architecture
 basis. Packages also now contain fuzzer seed corpus && dictionary.
 3. This gives us further extension options:
  - Packaging shared libraries for shared library fuzzing.
  - Presubmit tests for fuzzing. Each fuzz target could be made into a
  regression test by adding the crash testcase to the corpus. We can
  also ensure that example_fuzzer finds a bug with an ASan report as a
  presubmit smoke test.

Bug: 141026328
Test: m fuzz && unzip -l out/soong/fuzz-$ARCH.zip

Change-Id: I7aaad616d6b194a3beaf908241a9817df9dfdce1
2019-09-24 20:48:00 -07:00
Daniel Norman
10b743509e Performs same checks as aidl_interface.go before stripping leading "I".
Test: building AIDL interface named IntEnum.aidl. Leading I is not
removed.
Change-Id: Ia40cbdf9b8936f6f58a99971eae1b2138a678c91
2019-09-24 17:41:15 -07:00
Ivan Lozano
b9040d6b76 Add Soong test for device proc-macro deps.
Ensure that devices can include proc_macros, which are host-only
and may include host-only dependencies.

Bug: 141491501
Test: Soong tests pass.
Test: Test fails as expected when removing CL 1126496
Change-Id: I3ae7ab80283cd1fd4b800a533cb3205b3c108d45
2019-09-25 00:23:54 +00:00
Ivan Lozano
f23f6d20f0 Merge changes from topic "add_rust_arm64_devices"
* changes:
  Add ARM32 device Rust toolchain.
  Add AArch64 device Rust toolchain.
2019-09-24 21:39:51 +00:00
Ivan Lozano
ca34692de1 Merge "Fix proc_macro dependency handling." 2019-09-24 21:33:45 +00:00
Sasha Smundak
a1e178f39d Build output directory should be an absolute path.
Bug: 141385476
Test: manual
Change-Id: I969c761571dca6949204a8aa87a0b52ba98761c2
2019-09-24 12:07:52 -07:00
Ivan Lozano
e91823e6e0 Add ARM32 device Rust toolchain.
Bug: 141207434
Test: build example rust device module.
Change-Id: I2d5b45ba09f386e1c7da7d7cdc58f13f31135863
2019-09-24 10:35:28 -07:00
Ivan Lozano
f1c8433b40 Add AArch64 device Rust toolchain.
Bug: 141207434
Test: build example rust device module.
Change-Id: I0932a614942bf4a4d4b6c153fcc4fc79c7f202bd
2019-09-24 10:35:28 -07:00
Ivan Lozano
5ca5ef6788 Fix proc_macro dependency handling.
Currently proc_macros don't pull in the correct arch dependencies when
the host arch differs from the target arch.

This fixes how proc_macro dependencies are handled by defining them as
always being host-only and including them as dependencies for
device-modules by using AddFarVariationDependencies.

Bug: 141491501
Test: Example device rust module builds with proc_macro dependency.
Change-Id: Ic037dc406ce90526f8b68c92fffc0d93a498a4ff
2019-09-24 10:35:20 -07:00
Sasha Smundak
69ee7b0967 Generate revision.txt file containing unique ID.
Bug: 137977523
Test: manual
Change-Id: Ib1fbf6a4305bd843ace203e3f62a511fbdb168a1
2019-09-24 10:28:36 -07:00
Treehugger Robot
ec3e81b4be Merge "Move sysprop gen code to sysprop module" 2019-09-23 22:25:40 +00:00
Yi Kong
aefd0af575 Merge "Remove -Wno-format-pedantic cflag" 2019-09-23 17:48:21 +00:00
Treehugger Robot
1a4d45b2f8 Merge "Rust config whitelist: Add chh@ to OWNERS" 2019-09-23 15:32:51 +00:00
Treehugger Robot
d9271cd823 Merge "Add isFlattenedVariant function" 2019-09-23 14:17:06 +00:00
Paul Duffin
2b6f04ca42 Merge "Add custom SystemModules to bootclasspath to reduce duplication" 2019-09-23 10:31:40 +00:00
Jeff Vander Stoep
75b901182e Rust config whitelist: Add chh@ to OWNERS
Test: none
Bug: 141207129
Change-Id: Icdc43b3192fd84f0880eb354117fb1de46c6aa15
2019-09-23 10:41:48 +02:00
Inseob Kim
988f53cf5a Move sysprop gen code to sysprop module
sysprop_library now generates srcjar itself, effectively cutting the
implicit dependency from java module to sysprop module.

Bug: 131637873
Test: m {sysprop_library}-dump-api
Test: m (with no arguments) performs API check
Change-Id: Ia11a744e74b6f733ff0e30d194fbba22505ed644
2019-09-23 15:34:06 +09:00
Sundong Ahn
e8fb724689 Add isFlattenedVariant function
The return value is true if TARGET_FLATTEN_APEX is true,
TARGET_BUILD_APPS is false and the module is flatten variant.
Only the module name of flattened variant is appended with
".flattened" as suffix.

Test: m -j
Bug: 139716748
Change-Id: I966a178b43c5d08bd69d19e97e59456aa66d9d28
2019-09-23 14:40:21 +09:00
Treehugger Robot
b1102ba828 Merge "Introduce module type 'sdk'" 2019-09-23 04:38:24 +00:00
Jiyong Park
d1063c1586 Introduce module type 'sdk'
This change introduces a new module type named 'sdk'. It is a logical
group of prebuilt modules that together provide a context (e.g. APIs)
in which Mainline modules (such as APEXes) are built.

A prebuilt module (e.g. java_import) can join an sdk by adding it to the
sdk module as shown below:

sdk {
    name: "mysdk#20",
    java_libs: ["myjavalib_mysdk_20"],
}

java_import {
    name: "myjavalib_mysdk_20",
    srcs: ["myjavalib-v20.jar"],
    sdk_member_name: "myjavalib",
}

sdk {
    name: "mysdk#21",
    java_libs: ["myjavalib_mysdk_21"],
}

java_import {
    name: "myjavalib_mysdk_21",
    srcs: ["myjavalib-v21.jar"],
    sdk_member_name: "myjavalib",
}

java_library {
    name: "myjavalib",
    srcs: ["**/*/*.java"],
}

An APEX can specify the SDK(s) that it wants to build with via the new
'uses_sdks' property.

apex {
    name: "myapex",
    java_libs: ["libX", "libY"],
    uses_sdks: ["mysdk#20"],
}

With this, libX, libY, and their transitive dependencies are all built
with the version 20 of myjavalib (the first java_import module) instead
of the other one (which is for version 21) and java_library having the
same name (which is for ToT).

Bug: 138182343
Test: m (sdk_test.go added)
Change-Id: I7e14c524a7d6a0d9f575fb20822080f39818c01e
2019-09-22 08:21:27 +09:00
Yi Kong
011aaa46c5 Remove -Wno-format-pedantic cflag
This is no longer needed.

Test: presubmit
Bug: 20148343
Change-Id: Ie377b3cd183ae89bc159c3b31c64960bce3bc753
2019-09-20 17:24:21 -07:00
Ivan Lozano
04de8b5ca5 Merge "Amend list of required Rust stdlib libraries." 2019-09-20 23:59:20 +00:00
Treehugger Robot
83dcee3094 Merge "soong: -Werror=fortify-source" 2019-09-20 23:49:33 +00:00
Treehugger Robot
4e1e313287 Merge "Switch genrule-phony to ninja phony rule" 2019-09-20 20:18:10 +00:00
George Burgess IV
6c691644f7 soong: -Werror=fortify-source
Recently, we started deferring to clang for some of its built-in
FORTIFY-like warnings. We should always treat these as errors, since
they represent potential security vulnerabilities.

Bug: 131861088
Test: m. Also made a compilation in Bionic fail; verified the build
  command had -Werror=fortify-source in it.

Change-Id: I2715ea411ef067f801534dab4d306fef5431f290
2019-09-20 11:15:40 -07:00
Ivan Lozano
6d9e712858 Amend list of required Rust stdlib libraries.
Add libtest to our list of stdlib libraries, and remove some others that
are only used when generating proc_macros (which aren't dynamic).

Bug: 141207434
Test: m -j crosvm.experimental
Change-Id: I39cb030940adf1993e861d0142378eeea8b1ff5e
2019-09-20 10:59:56 -07:00
Dan Willemsen
afeea436ea Switch genrule-phony to ninja phony rule
Instead of using android.Phony, which is a "real" rule, use
blueprint.Phony, which is ninja's built-in "phony" rule. That's desired
in this case, since we only want this to be an alias to the inputs.

Test: cd system/bt; mma; mma (second run had nothing to do)
Test: treehugger
Change-Id: Ib0b630e23653c05a12cf617350f8b4c6d6d6cdff
2019-09-20 10:55:10 -07:00
Roland Levillain
50aee7c375 Merge "Fix documentation of field soong.apex.apexBundleProperties.Apex_name." 2019-09-20 14:37:14 +00:00
Paul Duffin
68289b0efd Add custom SystemModules to bootclasspath to reduce duplication
Adds a library dependency to each of the dummy system modules created
by testing.go so that any changes in the behavior were detected by
the existing tests which were then fixed.

Bug: 141359858
Test: m checkbuild
Change-Id: Id4442f4aa3931ac93049f3367b96a5b49cc075e1
2019-09-20 14:52:56 +01:00
Treehugger Robot
9f6cbaca21 Merge "Fix missing deps found through RBE" 2019-09-19 20:34:05 +00:00
Dan Willemsen
724ab5d5f7 Fix missing deps found through RBE
Bug: 130111713
Test: run with RBE, no longer see error about file not found
Change-Id: Ib6192f2a537f49efdb69b3f3bf28aef1660dec01
2019-09-19 10:51:03 -07:00
Treehugger Robot
de8b140bf6 Merge "Add option test_min_api_level and test_min_sdk_version for auto-generated test config" 2019-09-19 16:48:48 +00:00
Ivan Lozano
89efe4144a Merge "Add OWNERS for Rust whitelist." 2019-09-19 16:07:23 +00:00
Roland Levillain
411c584cba Fix documentation of field soong.apex.apexBundleProperties.Apex_name.
Remove the mention to the (APEX) manifest (`apex_manifest.json`) from
this field's documentation, as `Apex_name` is neither read from nor
written to that file.

Test: n/a
Change-Id: Ia0dfac4f35f1ea697f379bcb19dd11af8705a0a0
2019-09-19 16:54:07 +01:00
Treehugger Robot
4e839ec3a5 Merge "Add corpus and dictionary properties to cc_fuzz." 2019-09-19 13:51:17 +00:00
Treehugger Robot
624dbac225 Merge "Add filter_packages property to droiddoc" 2019-09-19 13:24:46 +00:00
nelsonli
0d7111ec0f Add option test_min_api_level and test_min_sdk_version for auto-generated test config
The new option will allow the auto-generated test config for cc_test to
include MinApiLevelModuleController and check the api-level before test.

Bug: 140912549
Test: 1. $vi platform_testing/tests/example/native/Android.bp
      2. add
          test_min_api_level: 29,
          or
          test_min_sdk_version: 29,
      3. $m -j hello_world_test
      4. check hello_world_test.config

Change-Id: Ic742d41898928df1637890bec87796d90e886516
2019-09-19 12:14:16 +08:00
Mitch Phillips
4e4ab8a141 Add corpus and dictionary properties to cc_fuzz.
Adds the corpus and dictionary properties to the cc_fuzz target.
Propagates these entries to the makefile backend via LOCAL_FUZZ_DATA, in
a similar manner to LOCAL_TEST_DATA.

Bug: 141026328
Test: m example_fuzzer, fuzz target should have adjacent corpus/dict
files.

Change-Id: If5add5a597cc479f4e084bdafbd0fc175cfd6321
2019-09-18 18:55:27 -07:00
Treehugger Robot
362e9ce427 Merge "Add version to vendor variants" 2019-09-18 23:19:23 +00:00
Colin Cross
4c5032bb66 Merge "Revert "Remove old-style support for translated second architectures"" 2019-09-18 21:12:45 +00:00
Colin Cross
402be41aa8 Revert "Remove old-style support for translated second architectures"
This reverts commit fe6330c7d2.

Reason for revert: this was accidentally propping up NDK builds
Bug: 141242600
Change-Id: Ie9f8e31479a74e8e9e14d720a5936da6b1d5d113
2019-09-18 21:12:31 +00:00