Commit Graph

34166 Commits

Author SHA1 Message Date
Dan Willemsen 9d2b3280e8 Support split /system and /vendor modules from Soong
Soong modules may be split into both /system and /vendor variants.
Ensure that Make libraries link against the correct version based on
whether LOCAL_USE_VNDK is set.

Bug: 36426473
Bug: 36079834
Test: build-aosp_arm64.ninja files are the same before/after
Test: attempt building with BOARD_VNDK_VERSION:=current
Change-Id: I229bc290373743406275f3ca16081eae04c27987
2017-04-10 15:54:50 -07:00
Dan Willemsen 2d6e79d268 Merge "Add LLNDK support for the VNDK" 2017-04-07 21:21:32 +00:00
Dan Willemsen ffa3258f6c Add LLNDK support for the VNDK
Instead of using the NDK headers and libraries, add LL-NDK specific
headers and library stubs for VNDK users. This allows us to provide an
expanded liblog interface.

Test: aosp_arm; m -j
Test: Enable BOARD_VNDK_VERSION on aosp_arm; m -j
Change-Id: I0197f44c91218c73b9567a05320c91a2baaae39b
2017-04-07 21:21:24 +00:00
Tao Bao 6cb177f15c Merge "releasetools: Add validate_target_files.py." 2017-04-06 20:50:09 +00:00
Treehugger Robot f9f8b21af3 Merge "Fix duplicate and dangling rules" 2017-04-06 19:49:45 +00:00
Colin Cross 96476c1d50 Fix duplicate and dangling rules
I6730e2d3ec38004874265b2a690442dec57b33f4 introduced duplicate rules
to build classes.jar for static java library prebuilts, and left rules
to copy $(built_dex_intermediates) to $(built_dex) for modules that
don't build dex files.

Move prebuilts LOCAL_BUILT_MODULE back to javalib.jar to match
non-prebuilt modules, and remove the manual building of javalib.jar.

Add a check around $(built_dex_intermediates) for static java libraries.

Bug: 36901093
Test: m -j ANDROID_COMPILE_WITH_JACK=false
Change-Id: I291510b56162f0d35553e3c7ccd59b1382224d62
2017-04-06 10:23:04 -07:00
Colin Cross 7b7363fffb Merge "Rearrange java library outputs" 2017-04-06 15:30:45 +00:00
Treehugger Robot 41d5cd7420 Merge "Move proguard before classes.jar" 2017-04-06 02:39:13 +00:00
Colin Cross 941b682099 Rearrange java library outputs
Jack can silently handle using a java library as a static java
library by merging in the java library dex file.  This causes
problems when switching to javac, because dex doesn't support
dex merging with multidex enabled?

Make the output files consistent between java libraries and static
java libraries.  Java libraries will now produce:
classes-pre-proguard.jar: the classes before proguard processing
classes.jar: the final jar file containing classes before dexing
javalib.jar: a jar containing classes.dex

Static java libraries will eventually only produce
classes-pre-proguard.jar and classes.jar.  All inter-library
linking is done with classes.jar, so a java library can be
used as a static java library.

There are too many dependencies outside the build system that
expect javalib.jar to exist for static and host java libraries,
so for now continue to build a javalib.jar that is a copy of
classes.jar.

Test: m -j ANDROID_COMPILE_WITH_JACK=false java
Test: m -j java
Bug: 36901093
Change-Id: I6730e2d3ec38004874265b2a690442dec57b33f4
2017-04-05 18:04:37 -07:00
Colin Cross 950f1efbbc Move proguard before classes.jar
Downstream users of a library always link against javalib.jar, which
is either the dex jar for java libraries or a copy of
proguard.classes.jar for static java libraries.  In preparation for
making java libraries a superset of static java libraries, make
classes.jar always be the final class-containing jar for use
downstream, and always create a classes-pre-proguard.jar for
users that need a jar without shrinking or obfuscation.

Also rename the intermediates to be consitent: classes-<tool>.jar

Test: m -j ANDROID_COMPILE_WITH_JACK=false java
Change-Id: I3df8b9a4edcd5db996f1fedc54c8a782d4f36a92
Merged-In: I3df8b9a4edcd5db996f1fedc54c8a782d4f36a92
(cherry picked from commit 6fabefa88e)
2017-04-06 00:46:23 +00:00
Chih-hung Hsieh c4a7ed3530 Merge "Encode special characters in email addresses." 2017-04-06 00:40:51 +00:00
Chih-Hung Hsieh bee0dec6c4 Encode special characters in email addresses.
Now accept email addresses with '+' character.

Bug: 33166666
Test: checkowners.py -v -c `find . -name OWNERS`
Change-Id: I7792551e6be74e942906a75344233439d4bfeca3
2017-04-05 14:16:49 -07:00
Tao Bao afaa0a638b releasetools: Add validate_target_files.py.
Bug: 35408446
Test: validate_target_files.py on existing target_files zips.
Change-Id: I140ef86533eee5adb93c2546510fdd7e9ce4e81a
2017-04-05 09:04:13 -07:00
Dan Willemsen a1c1e7d02f Merge "Add LOCAL_EXPORT_CFLAGS for Soong" 2017-04-05 05:43:05 +00:00
Dan Willemsen 2a8a39398b Add LOCAL_EXPORT_CFLAGS for Soong
This lets Soong pass -isystem or -I as necessary (or potentially, even
other cflags in the future).

This is not available for Android.mk use, nor exposed directly to
Android.bp users.

Test: m -j
Merged-In: Id37d4692d5fbddce467bd777903b20169f44dd6e
Change-Id: Id37d4692d5fbddce467bd777903b20169f44dd6e
2017-04-05 03:36:00 +00:00
Treehugger Robot b923eb60cd Merge "Exclude ndk stubs from notice file list" 2017-04-05 00:09:01 +00:00
Dan Willemsen 2be559488d Exclude ndk stubs from notice file list
There are many references to ndk stub libraries in the third party
notices:

out/soong/ndk/platforms/android-10/arch-arm/usr/lib/libc.so
out/soong/ndk/platforms/android-10/arch-arm/usr/lib/liblog.so
...

These are just stub libraries, and aren't distributed on the device. The
real versions of these libraries will be distributed on the device, and
already have the license information.

So let Soong set LOCAL_NO_NOTICE_FILE to prevent these from appearing.

Bug: 36867708
Test: Diff aosp_arm's system/etc/NOTICE.html.gz file before/after
Change-Id: Ifa3693bde7d3b6b9dc7a83122f9cfa24997fac50
2017-04-04 14:59:55 -07:00
Jaekyun Seok 78a117d801 Merge "Use product-based inclusive rule for enforcing RRO"
am: 4f566f3f97

Change-Id: Iaa5ec37c9d6d0e9c2dfe9573b61465e127d60f8d
2017-04-04 04:40:08 +00:00
Treehugger Robot 4f566f3f97 Merge "Use product-based inclusive rule for enforcing RRO" 2017-04-04 04:34:36 +00:00
Jaekyun Seok 1b2242895e Use product-based inclusive rule for enforcing RRO
Board-based rule can cause unexpected regression because build-time overlays
are different among products. So each product should be tested with its own
product-based rule considering its build-time overlays before applying
enforcing RRO.

Additionally RRO conversion is mandatory only for overlays of which target is
included in AOSP system image and is critical for CTS/VTS tests with AOSP
system image. So inclusive rule is more suitable instead of exclusive rule
to avoid unexpected regression due to unnecessary RRO conversion.

Note that we still support conversion for all the overlays by specifying
PRODUCT_ENFORCE_RRO_TARGETS as "*".

Test: building succeeded and tested with auto-generated RROs.
Bug: 36231603
Change-Id: I8e1d701d4f78b818c89ef3e7638110105370c5bc
(cherry picked from commit 2a209997e8)
2017-04-04 11:31:24 +09:00
Alex Deymo b20d1d7a74 Merge "Don't include the dev-key on IOT products."
am: 41febee0cc

Change-Id: I1825d82eac9b046c76d35bbb93bae31f86fd2be5
2017-04-04 00:49:40 +00:00
Treehugger Robot 41febee0cc Merge "Don't include the dev-key on IOT products." 2017-04-04 00:43:35 +00:00
Alex Deymo cec578c916 Don't include the dev-key on IOT products.
This patch updates the logic to use the PRODUCT_IOT variable instead of
BRILLO.

Bug: 36702887
Test: `make`; Image doesn't have the dev key.
Change-Id: I1751e97d8cdfeba83c7e4720a017a5f4dcfd49da
2017-04-03 15:04:35 -07:00
Elliott Hughes d83bb4193a Merge "fsconfig: Use defined macro for masking"
am: 35eaf52ee2

Change-Id: I291e16fba756e661dcd56722b957ce68bc055c9b
2017-04-03 21:28:10 +00:00
Elliott Hughes 35eaf52ee2 Merge "fsconfig: Use defined macro for masking" 2017-04-03 21:21:55 +00:00
Elliott Hughes b7b29357ae Merge "Switch to a shell_and_utilities phony module."
am: cdcc4c52aa

Change-Id: Idb8a4ce418a64ac8691df9d1890d60f32102c1cc
2017-04-03 17:19:35 +00:00
Elliott Hughes cdcc4c52aa Merge "Switch to a shell_and_utilities phony module." 2017-04-03 17:15:17 +00:00
Elliott Hughes c86ea11fe9 Switch to a shell_and_utilities phony module.
(cherrypick of cb7d59687483c9532beecde60fe96053eda76948.)

Bug: N/A
Test: builds
Change-Id: I6416d9dded4cc225f57f0a521cf6114f39203ece
2017-04-03 17:13:58 +00:00
doheon1.lee 5cd3bcab86 fsconfig: Use defined macro for masking
Mask opeation with CAP_ prefixed name can be wrapped with
CAP_MASK_LONG macro.

Change-Id: Ide31ad62fac0d28e7a02e45059fe6d2461da7e27
2017-04-03 15:17:06 +09:00
Dan Albert b8989bd1b1 Merge "Expose PLATFORM_VERSION_ALL_CODENAMES to soong."
am: 194e73dd15

Change-Id: Ib1d690c07010622593405519b125077adfebace0
2017-03-31 23:17:12 +00:00
Dan Albert e2b92d809f Merge "Auto-generate PLATFORM_VERSION_ALL_CODENAMES."
am: 979dac690a

Change-Id: Ib4aa98fe335d90f1407ccb27fa4c57d5d30cbbf5
2017-03-31 23:09:42 +00:00
Treehugger Robot 194e73dd15 Merge "Expose PLATFORM_VERSION_ALL_CODENAMES to soong." 2017-03-31 23:09:26 +00:00
Treehugger Robot 979dac690a Merge "Auto-generate PLATFORM_VERSION_ALL_CODENAMES." 2017-03-31 23:03:20 +00:00
Dan Albert a3afbb9562 Expose PLATFORM_VERSION_ALL_CODENAMES to soong.
Test: make checkbuild
Bug: None
Change-Id: I9c8d8ff38b617ac352b951214d428f9c9af0f79d
2017-03-31 13:13:21 -07:00
Andreas Gampe dd8293b2e7 Merge "Build: Force system owner for ASAN in system"
am: 542c3d57d0

Change-Id: Ice7cfce4a62c636a1c97f9f4406a127564a7e552
2017-03-31 19:54:29 +00:00
Andreas Gampe 542c3d57d0 Merge "Build: Force system owner for ASAN in system" 2017-03-31 19:46:27 +00:00
Dan Albert 839db81b26 Auto-generate PLATFORM_VERSION_ALL_CODENAMES.
Test: Temporarily added additional codenames for OPD1 -> O and
      OPM1 -> O-MR1. Lunched aosp_sailfish-eng, built build.prop and
      checked that ro.build.version.all_codenames was "O". Then
      lunched aosp_sailfish-eng-PPR1 and checked that it was
      "O,O-MR1,P".
Bug: None

Change-Id: I51189f5b40e3e7f99e2fc08bb5616c51a23e3b19
2017-03-31 10:59:02 -07:00
Vishwath Mohan f8f29940dc Merge "Refactor sanitized library on-disk layout - Make."
am: 41b0d9e146

Change-Id: I5de405c714fc96e6156b07a4f64b9e8457af8124
2017-03-31 16:41:19 +00:00
Treehugger Robot 41b0d9e146 Merge "Refactor sanitized library on-disk layout - Make." 2017-03-31 16:35:53 +00:00
Stephen Hines 2e51c40eca Merge "Switch to clang-3859424."
am: af077e293b

Change-Id: If60751ecdb6621dea37346237ac127a53a2d03b8
2017-03-31 04:56:07 +00:00
Colin Cross cad1043266 Merge "Optimize out extra jar copies"
am: 678c77d9af

Change-Id: I17a8b9bc7281c37abc0bd905cd448d9002ff515a
2017-03-31 04:53:37 +00:00
Stephen Hines af077e293b Merge "Switch to clang-3859424." 2017-03-31 04:51:10 +00:00
Colin Cross 678c77d9af Merge "Optimize out extra jar copies" 2017-03-31 04:49:13 +00:00
Vishwath Mohan b285c46bbd Refactor sanitized library on-disk layout - Make.
This CL moves the location of ASAN-ified libraries on disk in the
following manner:
/data/lib* --> /data/asan/system/lib*
/data/vendor/* --> /data/asan/vendor/*

There are a couple of advantages to this, including better isolation
from other components, and more transparent linker renaming and
SELinux policies.

Bug: 36574794
Bug: 36674745
Test: m -j40 && SANITIZE_TARGET="address" m -j40 and the device
boots. All sanitized libraries are correctly located in /data/asan/*.

Change-Id: Ic6ba8e43e31df2ea92b85fd60f572823b6883ba2
2017-03-30 20:14:27 -07:00
Andreas Gampe 2c498a391b Build: Force system owner for ASAN in system
For tar-ed ASAN artifacts, enforce ownership by the system uid.

Bug: 36458146
Test: m && m SANITIZE_TARGET=true SANITIZE_TARGET_SYSTEM=true
Change-Id: I190cba3d160f15a89ef74f26e7aaa853a449929f
2017-03-31 03:04:19 +00:00
Colin Cross 0e53734035 Optimize out extra jar copies
Don't copy jar files for disabled stages.  Instead, set the name of
the output to the name of the input so the next stage will directly
pick up the output of the previous stage.

Test: m -j ANDROID_COMPILE_WITH_JACK=false java
Change-Id: Ib7268cbff7ea7ff2ad2caf994aa145e1b7a12b83
2017-03-30 19:35:15 -07:00
Jaekyun Seok 2f92aa78f4 Merge "Enforce RROs for all the build-time ROs"
am: 4b4e203a0b

Change-Id: I20085da5a39005733c9f10e751cef58ae20a9f7d
2017-03-30 03:43:31 +00:00
Treehugger Robot 4b4e203a0b Merge "Enforce RROs for all the build-time ROs" 2017-03-30 03:39:09 +00:00
Jaekyun Seok 39f97ae22a Enforce RROs for all the build-time ROs
This CL is to generate every static RRO package for its target package
automatically at build-time.

BOARD_ENFORCE_RRO build variable is added to specify whether enforcing
RRO is required or not.

BOARD_ENFORCE_RRO_EXEMPT_SOURCES build variable is added to specify
the module list of which item should be exempt from enforcing RRO.

Test: tested on bullhead and sailfish
Bug: 34097942
Change-Id: I455b2ce34e66c57a540c299b5e378b7c4e78d5b8
(cherry picked from commit 3070610b72)
2017-03-30 10:43:38 +09:00
Andreas Gampe 4ec27c88f5 Merge "Build: ASAN in system"
am: 85473982fb

Change-Id: Ia64fbaba713c1d9d826872b62ca0dcb040f939c9
2017-03-30 01:21:51 +00:00