Commit Graph

3527 Commits

Author SHA1 Message Date
Colin Cross
e1bb5d092a Hide static from cc_library_shared and vice versa
The static properties don't make sense for cc_library_shared
modules, and the shared properties don't make sense for
cc_library_static modules.  Move them into separate property
structs so they can be added conditionally.

Test: m nothing
Test: DefaultsTest
Change-Id: I0b0cedf9eba07deb721fae138ffa7bedcfbfe71e
2019-09-24 15:05:57 -07: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
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
Yi Kong
7bcb89909c Merge "Remove -Wno-format-pedantic cflag" am: aefd0af575 am: 65fcfa1fc1 am: 14007d89e2
am: 3a248c70aa

Change-Id: Ia4fb0d1434233d4e2b0a1487dad5542bed7b4fe1
2019-09-23 11:25:44 -07:00
Yi Kong
aefd0af575 Merge "Remove -Wno-format-pedantic cflag" 2019-09-23 17:48:21 +00:00
Jiyong Park
3f5c6cfa89 Merge "Introduce module type 'sdk'" am: b1102ba828 am: 303b2992af am: d284cd8894
am: 5b3a626407

Change-Id: Ic4a173e9db31a2cb0d744e193d4515c5ca3949b2
2019-09-22 22:23:15 -07: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
George Burgess IV
e1bddb2799 Merge "soong: -Werror=fortify-source" am: 83dcee3094 am: bf6c16ad48 am: 28601812b9
am: 95428ce162

Change-Id: I3bf5390975ede10b9d78cb37c1c05a33025c1ddd
2019-09-20 17:29:12 -07: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
Treehugger Robot
83dcee3094 Merge "soong: -Werror=fortify-source" 2019-09-20 23:49:33 +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
Dan Willemsen
d0b231c116 Merge "Fix missing deps found through RBE" am: 9f6cbaca21 am: 46c91e3e6a am: b7aae6cc2a
am: bd0c662310

Change-Id: I4e7348e87808f3f8979e3bf8b7d8b35178a41851
2019-09-19 14:17:18 -07:00
Treehugger Robot
9f6cbaca21 Merge "Fix missing deps found through RBE" 2019-09-19 20:34:05 +00:00
Colin Cross
3b19f5d71d Remove old-style support for translated second architectures
Translated second architectures now go in NativeBridgeArch instead
of DeviceSecondaryArch.

This reapplies I568046330abc002d4eed582cb999b62a5eaba790 with
ctx.Config().HasMulitlibConflict() added to fix the NDK build,
which has arm64, arm, x86_64, and x86 architectures enabled.

Test: m checkbuild
Test: OUT_DIR=out_ndk build/soong/scripts/build-ndk-prebuilts.sh
Test: no change to build.ninja or Android-aosp_cf_x86_phone.mk
Change-Id: Iadcafbd64bfb9579ae7c86914927c43a062b0c8e
2019-09-19 12:54:32 -07: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
nelsonli
119a33c7c2 Merge "Add option test_min_api_level and test_min_sdk_version for auto-generated test config" am: de8b140bf6 am: adc424d9d2 am: 948bfa5686
am: 60a77dc9a5

Change-Id: I4af84e1efbf4f1db56275ae9d5e40fdd5e4a00cb
2019-09-19 10:24:30 -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
Mitch Phillips
3842791711 Merge "Add corpus and dictionary properties to cc_fuzz." am: 4e839ec3a5 am: a1be84a806 am: 520b313b3d
am: f81d3c9bc4

Change-Id: I7dd22995913cc3700df96bdbae528beddf287f5f
2019-09-19 07:30:00 -07:00
Treehugger Robot
4e839ec3a5 Merge "Add corpus and dictionary properties to cc_fuzz." 2019-09-19 13:51:17 +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
Inseob Kim
6f05ee90b4 Merge "Add version to vendor variants" am: 362e9ce427 am: befa10bc9e am: cb8665e67d
am: 93442a6297

Change-Id: I984c06aecf29dda86971e3703217ebb35f6cd79a
2019-09-18 16:57:33 -07:00
Colin Cross
6ea023e579 Merge "Revert "Remove old-style support for translated second architectures"" am: 4c5032bb66 am: 39293b4068 am: 2cc88baaa0
am: 4a017dffb5

Change-Id: Ib1c16811731313086bc452341e380e269a9162e8
2019-09-18 14:44:05 -07:00
Colin Cross
b88fe4be9b Merge "Remove old-style support for translated second architectures" am: da62bf96ce am: 94bac35d78 am: b60d2c245a
am: f757e18734

Change-Id: I034da2151297d396b6cb0c19b7fe4a1b17768c04
2019-09-18 14:19:19 -07: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
Treehugger Robot
da62bf96ce Merge "Remove old-style support for translated second architectures" 2019-09-18 20:47:43 +00:00
Colin Cross
fe6330c7d2 Remove old-style support for translated second architectures
Translated second architectures now go in NativeBridgeArch instead
of DeviceSecondaryArch.

Bug: 141242600
Test: m checkbuild
Change-Id: I568046330abc002d4eed582cb999b62a5eaba790
2019-09-18 16:23:18 +00:00
Inseob Kim
64c4395386 Add version to vendor variants
Vendor variant is now divided into several vendor.{version} variants,
depending on their intended usages:

vendor.{BOARD_VNDK_VERSION}: vendor and vendor_available modules
vendor.{PLATFORM_VNDK_VERSION}: VNDK modules in the source tree
vendor.{snapshot_ver}: VNDK snapshot modules

This also affects exported module names from Soong to Make. But to
maintain backward compatibility, ".{BOARD_VNDK_VERSION}" suffix will not
be emitted for modules having version BOARD_VNDK_VERSION, so that vendor
modules still can be referred as-is.

Bug: 65377115
Bug: 68123344
Test: clean build and boot blueline
Change-Id: Ib9016a0f1fe06b97e9423fd95142653a89a343fa
2019-09-18 10:53:30 +09:00
Dan Shi
64fbeb187a Merge "Revert "Revert "Force gtest to use adb unroot if required_root is false or not set""" am: f7e6870f81 am: 4d4d939d76 am: c3ffcfbbc4
am: 1d52b07eed

Change-Id: Ib6592f59d7f5ae4bbac2140d91cceba1f06cc8ab
2019-09-17 17:53:38 -07:00
Treehugger Robot
f7e6870f81 Merge "Revert "Revert "Force gtest to use adb unroot if required_root is false or not set""" 2019-09-18 00:20:16 +00:00
Jooyung Han
333d0f72d6 Merge "Add "apex_vndk" module type" am: 1f6c94a3ac am: 87f0f3781c am: 49fb19f803
am: 834e9c7904

Change-Id: I2f4dfebe0d821b07633e296b6af16f43bd8de8b0
2019-09-17 10:48:19 -07:00
Treehugger Robot
1f6c94a3ac Merge "Add "apex_vndk" module type" 2019-09-17 17:14:48 +00:00
Pirama Arumuga Nainar
8611c28a81 Merge "Switch to clang-r365631b" am: b204303b35 am: 38b8fd75eb am: c6f4ea44ab
am: aba9643204

Change-Id: Ie487c46381c37f027facdcf773de0bf29fe40ee9
2019-09-17 09:55:20 -07:00
Dan Shi
bc0f26028a Revert "Revert "Force gtest to use adb unroot if required_root is false or not set""
This reverts commit 1a5eeb3e35.

Reason for revert: Fix landed in aosp/1122723

Change-Id: I8b487d602d48b9dba35affc8eb31578efd815e52
2019-09-17 02:43:50 +00:00
Pirama Arumuga Nainar
24d49119d8 Switch to clang-r365631b
Bug: https://github.com/android/ndk/issues/1076
Test: TH
Change-Id: Ica61fd13d9d7ecc742a7a89f5bb04cc6e1caf9f2
2019-09-16 15:06:41 -07:00
Julien Desprez
443c19c9fd Merge "Revert "Force gtest to use adb unroot if required_root is false or not set"" am: 74b0a4891e am: 7583b2d835 am: 1cec6d044b
am: 87bf978d9d

Change-Id: I637cde4f08cbf906fa74686ec464594a581c5cbc
2019-09-13 20:41:18 -07:00
Julien Desprez
74b0a4891e Merge "Revert "Force gtest to use adb unroot if required_root is false or not set"" 2019-09-14 03:08:57 +00:00
Julien Desprez
1a5eeb3e35 Revert "Force gtest to use adb unroot if required_root is false or not set"
This reverts commit b2cb324ce1.

Reason for revert: broke host-side test mapping

Change-Id: Iea63395d525444421fc27ef5bc660362eba11db0
2019-09-14 03:06:26 +00:00
Yi Kong
b5d6cd844c Merge "Remove use_gnu_strip option" am: d14f7b1e11 am: 89b7ee9915 am: 4c91c1c874
am: c6e2346152

Change-Id: I40bc3b332c9439f39c9e2a5b0d9a682096a01832
2019-09-13 17:06:26 -07:00
Yi Kong
d14f7b1e11 Merge "Remove use_gnu_strip option" 2019-09-13 23:22:30 +00:00
Yi Kong
ab5e514208 Remove use_gnu_strip option
This option is no longer used anywhere.

Test: presubmit
Change-Id: I1a5f2d14e24ecf7c15a437054b8a95ddaf57da2f
2019-09-13 12:18:47 -07:00
Dan Shi
95b71153ca Merge "Force gtest to use adb unroot if required_root is false or not set" am: d2ac6985e9 am: f896037e42 am: 4a558599ff
am: 1aae31942e

Change-Id: Ia08e701447965f084899e03bd4c65ebcbdfcb45b
2019-09-13 09:43:18 -07:00
Dan Shi
d2ac6985e9 Merge "Force gtest to use adb unroot if required_root is false or not set" 2019-09-13 15:55:04 +00:00
Colin Cross
482c51ebcd Merge "Add missing cortex-a76 arm configuration" am: ee3f105f25 am: 2d4be03254 am: 81438ccb9f
am: b1f6405b31

Change-Id: Ie2ed3184ddcd6112fb9ba3c1bd3390bd63e634dd
2019-09-12 16:36:04 -07:00
Pirama Arumuga Nainar
3c220171e6 Merge "Disable coverage for native-bridge modules" am: 9dab630dcb am: 449cced69a am: 646f88e634
am: cdbcbda785

Change-Id: I8587504b5360efaeffbed1fb794e7f84d8a52196
2019-09-12 16:35:13 -07:00
Colin Cross
ee3f105f25 Merge "Add missing cortex-a76 arm configuration" 2019-09-12 22:50:18 +00:00
Pirama Arumuga Nainar
5f69b9a068 Disable coverage for native-bridge modules
Bug: http://b/137883967

With coverage enabled, native-bridge modules throw a SEGV_ACCERR.

Test: Successfully run the app linked in the bug on a coverage build.
Change-Id: I9f3622b7b6d3189337c445a26d6bf81c96820c2e
2019-09-12 13:18:48 -07:00
Martin Stjernholm
f1591e38f0 Merge "Treat libclang_rt.hwasan-* the same way as the other Bionic bootstrap libs." am: 931849f36f am: 5bdc6b0f22 am: ba2b1b02e3
am: 9f30d05a37

Change-Id: I568b301ef4f0abef688268e5d2a3f831c74165c0
2019-09-12 11:27:36 -07:00