Commit Graph

6063 Commits

Author SHA1 Message Date
Colin Cross
79dbe712d7 Allow wildcards in java_resource_dirs
am: 0ead1d75ce

Change-Id: Ie9b8764b2b2254f3dc7241bcdb9c5ce55d08a905
2018-04-10 15:58:49 -07:00
Colin Cross
0ead1d75ce Allow wildcards in java_resource_dirs
Expand java_resource_dirs using ctx.Glob before globbing inside it
in case it has wildcards in it.  Fixes:
internal error: panic in GenerateBuildActions for module "icu4j" variant "linux_glibc_common"
path "external/icu/icu4j/main/classes/charset/src/META-INF" does not start with "external/icu/icu4j/main/classes/*/src"

Test: java_test.go
Change-Id: Icd28b7a3dd14752642fb0ec8d41bbd6e30f81a68
2018-04-10 20:12:47 +00:00
Colin Cross
cf3a11aa94 Use built SDK stubs
am: f19b9bb981

Change-Id: Icb4e96595f0845c8e93d35bda7086060cb7aee18
2018-04-10 11:21:34 -07:00
Colin Cross
f19b9bb981 Use built SDK stubs
Now that the SDK stubs are built in Soong, undo the hack that
uses the prebuilt stubs.

Fix the linktype checks to treat the various stubs libraries as
the correct type, since they can't be annotated with sdk_version.

Bug: 70351683
Bug: 77285514
Test: m checkbuild
Change-Id: I5e870c34dd0ebc8ae3f888ec627da590c846a76f
2018-04-10 17:06:21 +00:00
Colin Cross
bb6528c368 Remove deviceProperties from BinaryHostFactory
am: 559795114d

Change-Id: Ie451d214a55a5ebef26f4a7dcf81b07e5317cecd
2018-04-10 09:56:44 -07:00
Colin Cross
559795114d Remove deviceProperties from BinaryHostFactory
java_binary_host should not include the device-only properties.

Test: m checkbuild
Change-Id: Ief6b0a0e98310f7a4f3684c4632f618d73f10bdd
2018-04-10 14:43:59 +00:00
Kweku Adams
e819d2b345 Merge "Fixing protoOutParams concatenation."
am: eacf1a6e85

Change-Id: Iac5729bd16b484946de389fa9ce84f8cfe793ddd
2018-04-06 10:01:13 -07:00
Treehugger Robot
eacf1a6e85 Merge "Fixing protoOutParams concatenation." 2018-04-06 16:48:15 +00:00
Dan Willemsen
faf45dedac Allow boards to turn overriding commands into an error
am: 3d60b115a0

Change-Id: I6eb0d7d34a206922be59bc9501b11ca141fbbe18
2018-04-06 09:08:41 -07:00
Kweku Adams
fb5b31ce96 Fixing protoOutParams concatenation.
ParseGeneratorParameter delimits based on commas, not colons:
external/protobuf/src/google/protobuf/compiler/code_generator.cc

Bug: 72570104
Test: flash device with new build
Change-Id: I00042782a718d288ca6b0cb78f856d0fb223a926
2018-04-05 17:48:32 -07:00
Dan Willemsen
3d60b115a0 Allow boards to turn overriding commands into an error
Many board still have this problem, but if we can switch some over,
we'll prevent global problems and have the ability to clean boards up
one-by-one.

Bug: 77611511
Test: lunch aosp_arm-eng; m nothing
Test: lunch aosp_marlin-eng; m nothing
Test: build_test on all downstream branches
Change-Id: I78bee44adde2059d01188658b9050927748d2028
2018-04-05 16:23:10 -07:00
Steven Moreland
f974294c86 Merge "Add vintf_fragments."
am: 51ba4a7970

Change-Id: Ia0000d21cf4cf5608549e997c06e01771b649dd3
2018-04-05 16:17:55 -07:00
Treehugger Robot
51ba4a7970 Merge "Add vintf_fragments." 2018-04-05 23:09:14 +00:00
Jeff Gaston
5aaa818f96 Merge changes I3079cb4e,I55a786e9
am: fdc24d2f91

Change-Id: Id1dcda0f1558eb475234fd0a1a87219bdd1e1ec5
2018-04-05 14:24:09 -07:00
Treehugger Robot
fdc24d2f91 Merge changes I3079cb4e,I55a786e9
* changes:
  Have pom2mk list all duplicates modules
  Have pom2mk include runtime deps too
2018-04-05 21:10:31 +00:00
Steven Moreland
57a23d2f20 Add vintf_fragments.
Bug: 66917623
Test: fragments are loaded in the right place
Test: boot device which is depending on fragments
Test: androidmk file which uses LOCAL_VINTF_FRAGMENTS properly
    converted
Change-Id: I366b731cf8d5ecf51851866f441ff1c517da75cf
2018-04-05 20:33:01 +00:00
Jayant Chowdhary
dcd9c60461 Merge "Add informational message to help with updation of VNDK abi references."
am: bc30a77591

Change-Id: I824e905c05b326fab2e69da30e1c6c8d54162460
2018-04-04 17:04:41 -07:00
Jayant Chowdhary
bc30a77591 Merge "Add informational message to help with updation of VNDK abi references." 2018-04-04 23:40:06 +00:00
Ryan Prichard
78b43b934f Merge "Fix mini_debug_info stripping when no symbols should be kept."
am: 4c65916c4e

Change-Id: Ic2c651a9e1e6ea43185d6e1910f12a991e414c1b
2018-04-03 21:48:17 -07:00
Treehugger Robot
4c65916c4e Merge "Fix mini_debug_info stripping when no symbols should be kept." 2018-04-04 04:28:52 +00:00
Yifan Hong
2744f3291b Add overrides to cc_binary
am: 946e32e184

Change-Id: Idd1a1b47d299cd0317cd1733888cb02bed68846f
2018-04-03 18:35:46 -07:00
Yifan Hong
946e32e184 Add overrides to cc_binary
Test: use it for healthd, it is not installed.
Bug: 77541952

Change-Id: I170a31d1b4d15f20de6a6b6279a2eeda49ca7447
2018-04-03 16:02:29 -07:00
Ivan Lozano
e586a753f2 Support integer_overflow static lib diagnostics.
am: a9255a8378

Change-Id: I328e6878c3de6f4612096728ede19728ffb7423a
2018-04-02 22:51:09 +00:00
Ivan Lozano
a9255a8378 Support integer_overflow static lib diagnostics.
This extends the minimal runtime dependency mutator to allow signed
and unsigned integer overflow diagnostics in static libraries and
binaries. This also enables the integer_overflow flag for static
libraries and binaries.

Note compilation will fail if the static library is a dependency
of a Make module that does not also have diagnostics enabled.

Bug: 66952339
Bug: 73283972
Test: make SANITIZE_TARGET{,_DIAG}=integer_overflow
Test: Enabled diagnostics in a static lib, saw results in logcat.
Test: Checked showcommands output for ubsan runtime library inclusion.

Change-Id: Ic52881a0f74cdcac0e4a15335df493b59b002ae5
2018-04-02 12:54:52 -07:00
Jayant Chowdhary
d8b70a39d1 Add informational message to help with updation of VNDK abi references.
Test: create reference dump for libjpeg; add exported function to libjpeg;
      m -j libjpeg.vendor, build fails with helpful message.

Test: create reference dump for libjpeg; add exported function to libjpeg;
      m -j libjpeg.vendor dist DIST_DIR=dist, build fails with helpful message.

Change-Id: Iae25374fe937a0cbe8a8ddf9e23c3bc1f62bbb2a
2018-03-30 11:08:00 -07:00
Logan Chien
f1e3014288 Allow VNDK-SP extensions to use vendor lib
am: d3c59a2b3a

Change-Id: Ie609d0cc75418434ccc7763bcdf20e3787de1cc2
2018-03-30 08:32:23 +00:00
Jiyong Park
0ab76cd099 Merge "Allow platform modules to link to vendor public libraries"
am: 01b715e94e

Change-Id: Ib6ca3f52a41d0cc1acc228d74d64de9b764d0f39
2018-03-30 03:51:00 +00:00
Logan Chien
d3c59a2b3a Allow VNDK-SP extensions to use vendor lib
This commit changes the VNDK-SP dependencies check.  With the commit,
VNDK-SP-Ext can link to non-VNDK vendor shared libs.  This commit also
refines the "cc_test" so that more error handling cases are properly
tested.

Before this commit, VNDK-SP-Ext could not depend on vendor libs.  It
was disallowed because there were no correct way to load vendor libs.
The fallback link had to specify the shared lib names.  On the other
hand, adding "/vendor/${LIB}" to search paths will lead to
double-loading issue.

In aosp/595067, "allow_all_shared_libs" was added to bionic dynamic
linker.  Now, we can link the "vndk" namespace to "sphal" namespace.
Thus, like VNDK-Ext, VNDK-SP-Ext can link to vendor libs now.

Bug: 77249955
Test: lunch aosp_walleye-userdebug && make -j8  # runs unit tests
Test: lunch aosp_sailfish-userdebug && make -j8  # runs unit tests
Test: Create a VNDK-SP-Ext, link to vendor libs, and run it.
Change-Id: I5511204539a22c998528111076f46756807faf29
2018-03-30 11:46:26 +08:00
Treehugger Robot
01b715e94e Merge "Allow platform modules to link to vendor public libraries" 2018-03-30 03:41:22 +00:00
Vishwath Mohan
4c12a7b54e Merge "Revert "Change PRODUCT_CFI_INCLUDE_PATHS to opt-out (Soong)""
am: f895051c85

Change-Id: I2477b19ad2d9c6ae08b23d9ac29c8ce1635382e1
2018-03-30 03:07:58 +00:00
Vishwath Mohan
f895051c85 Merge "Revert "Change PRODUCT_CFI_INCLUDE_PATHS to opt-out (Soong)"" 2018-03-30 02:58:32 +00:00
Vishwath Mohan
3af8ee0288 Revert "Change PRODUCT_CFI_INCLUDE_PATHS to opt-out (Soong)"
This reverts commit 289d548c3e.

Change-Id: Ic284687157d5cb4122899c84a37c5db507aaee2a
2018-03-30 02:55:23 +00:00
Jiyong Park
374510bcb6 Allow platform modules to link to vendor public libraries
Normally, when building with VNDK, platform modules are not allowed to
link against vendor libraries, because the ABI of the vendor libraries
are not guaranteed to be stable and may differ across multiple vendor
images.

However, the vendor public libraries are the exceptions. Vendor public
libraries are vendor libraries that are exposed to 3rd party apps and
listed in /vendor/etc/public.libraries.txt. Since they are intended to
be exposed to public, their ABI stability is guaranteed (by definition,
though it is up to the vendor to actually guarantee it).

This change provides a way to make a vendor lib as public by defining a
module of type 'vendor_public_library' with a map file that enumerates
public symbols that are publicized:

cc_library {
   name: "libvendor",
   proprietary: true,
   ...
}

vendor_public_library {
   name: "libvendor",
   symbol_file: "libvendor.map.txt",
}

This defines a stub library module named libvendor.vendorpublic from the
map file. `shared_libs: ["libvendor"]` is redirected to the stub library
when it is from the outside of the vendor partition.

Bug: 74275385
Test: m -j
Test: cc_test.go passes
Change-Id: I5bed94d7c4282b777632ab2f0fb63c203ee313ba
2018-03-30 10:22:52 +09:00
Vishwath Mohan
e792bc5091 Merge "Change PRODUCT_CFI_INCLUDE_PATHS to opt-out (Soong)"
am: 3ab49a2927

Change-Id: I1594d0474a6e6fdaf6918b8f7d48d1cbb870165f
2018-03-29 23:06:33 +00:00
Treehugger Robot
3ab49a2927 Merge "Change PRODUCT_CFI_INCLUDE_PATHS to opt-out (Soong)" 2018-03-29 22:55:35 +00:00
Ryan Prichard
5a311db3fd Use Soong modules for the NDK's extra STL libraries
am: b1703659a8

Change-Id: I3be785bc8df249abc023f173917e04b611e8fcf4
2018-03-29 22:00:08 +00:00
Jiyong Park
fe68fe47cf Link type check for Android.bp defined Java modules
am: 2d4929464b

Change-Id: Idbddcd0120f84a4f85749fabf7ec062fd02f83fb
2018-03-29 21:51:19 +00:00
Jeff Gaston
af2191e201 Have pom2mk list all duplicates modules
For easier debugging if there are multiple duplicates

Bug: 76692459
Test: ./update_current.py -x <build-id>

Change-Id: I3079cb4ed1cfd365d792a7b41c9cdb4e7a1e148f
2018-03-29 17:44:36 -04:00
Jeff Gaston
8f08482957 Have pom2mk include runtime deps too
It still excludes test deps though

Bug: 76692459
Test: ./update_current.py -x <build-id>

Change-Id: I55a786e9feab31f99b95b7cebe84869757e46270
2018-03-29 17:44:33 -04:00
Ryan Prichard
b1703659a8 Use Soong modules for the NDK's extra STL libraries
* The extra STL libs are:

       libc++abi.a [needed for ndk_libc++_static]
       libandroid_support.a [always needed in NDK r16]
       libunwind.a [needed for ARM32]

 * The existing STL-dependency logic in linkShared only applies to shared
   libraries. By moving it to STL deps, the extra STL libs are linked into
   both shared libraries and executables.

 * Remove the ndk_prebuilt_library/ndkPrebuiltLibraryFactory module type,
   which is unused now.

 * Reuse the ndk_prebuilt_static_stl module type to describe the extra
   static libraries that are linked with both the static and shared libc++
   STLs.

Bug: b/73133405
Test: manual
Change-Id: I3f73e4f882d39e6efa470073bb4fc8c42dff8253
2018-03-29 21:26:06 +00:00
Vishwath Mohan
289d548c3e Change PRODUCT_CFI_INCLUDE_PATHS to opt-out (Soong)
This CL changes PRODUCT_CFI_INCLUDE_PATHS to be included in all
product configs by default. To maintain the status quo, the sanitizer
logic has been modified to only respect this product config for Arm64
devices (where this was previously enabled).

Bug: 63926619
Test: m -j60 # the device still has CFI enabled thanks to the default
opt-in

Change-Id: Ia613aec545ad3e544dea41a6dbdb4112aef4afab
2018-03-28 20:30:05 -07:00
Colin Cross
a4905aa28c Fix data race on cfiExportsMap
am: 1218a19f0d

Change-Id: I65ae907c7d9234c4384734d7f004c48028d13618
2018-03-29 02:16:20 +00:00
Colin Cross
52d1c14ccd Fix format string issues
am: f46e37f5f7

Change-Id: If0c8fea5687d662bee99903ee333b525aeec416a
2018-03-29 02:16:16 +00:00
Ryan Prichard
afefacf196 Fix mini_debug_info stripping when no symbols should be kept.
If there are no symbols to keep (i.e. all function symbols are also in
the dynsym table), then the "${outfile}.keep_symbols" file has size 0.
When objcopy parses a --keep-symbols file, it has a special case for
0-sized files where it silently fails (exits with status 1, no error
message). On the other hand, objcopy is happy with a file containing no
symbols, as long as there is some whitespace or a comment. Avoid the
special case by appending a newline to keep_symbols.

Bug: b/62815515
Bug: b/77242617
Test: manual
Change-Id: I90fd3258426176dc18aa5a8c19389c55fe6329c7
2018-03-29 01:39:13 +00:00
Jiyong Park
2d4929464b Link type check for Android.bp defined Java modules
Link-type is also checked among Java modules defined in Soong. Until
now, the check has been done in between Soong/Make and Make/Make.

With this, a Java module can't depend on another Java module built with
larger API surface. For example, a java library built with Android SDK
(sdk_version: "current") can't link to a library built without SDK.

Bug: 73829976
Test: m -j

Change-Id: I64277be6e65e8535aad951b4f08f8d10b67abe66
Merged-In: I64277be6e65e8535aad951b4f08f8d10b67abe66
(cherry picked from commit f3586661e8)
2018-03-28 16:20:15 -07:00
Colin Cross
1218a19f0d Fix data race on cfiExportsMap
cfiExportsMap was reinitialized for every module, which caused
data races.  Create the path from the string on each use
instead.

Bug: 77234104
Test: m nothing with race detector turned on
Change-Id: Ibca3149dcbe8a9d4d9f7ec6dd0b164697e7ae5cd
2018-03-28 16:19:50 -07:00
Colin Cross
f46e37f5f7 Fix format string issues
Fix issues caught by go vet.

Test: m checkbuild
Change-Id: Ib8d740457c15432dabe1575a6707726ddaf93084
2018-03-28 15:54:52 -07:00
Alan Viverette
08e81f2302 Always include JAR dependencies (not just with --static-deps) in Makefile
am: 2b53a0c4b8

Change-Id: Idf35bb0849066e806ddf6465a5d2ce9df71ad2dc
2018-03-28 21:38:08 +00:00
Alan Viverette
2b53a0c4b8 Always include JAR dependencies (not just with --static-deps) in Makefile
Bug: 76692459
Test: ./update_current.py -x <build-id>
Change-Id: Ie0f77e52089adbe153d668fe39902545f469f2d2
2018-03-28 14:32:10 -04:00
Nan Zhang
d368414bb4 Fix the flaky build breakage for droiddoc target.
am: e42777a05a

Change-Id: Iecdb1161fc8bc6717e16654701a25c5fcccc19d3
2018-03-28 05:25:14 +00:00