Commit graph

12091 commits

Author SHA1 Message Date
Steven Moreland
3a0afa7f57 Allow PRODUCT_FULL_TREBLE_OVERRIDE to be false.
Devices which are not Android phones may want to set
PRODUCT_FULL_TREBLE_OVERRIDE (and therefore
PRODUCT_FULL_TREBLE) to false.

Test: confirm expected values when putting in expected values of:
  PRODUCT_FULL_TREBLE_OVERRIDE
  PRODUCT_SHIPPING_API_LEVEL
Fixes: 37869308

Change-Id: If5a383210ea282a3a274e5eba0d32ef6cfebafd0
2017-05-01 18:11:35 -07:00
Jaekyun Seok
9e7eab53c1 Split vendor license notices into vendor partition
Xml files will be generated instead of html files, and then Settings
will generate html file on runtime from xml files of partitions.

Test: build succeeded and tested on sailfish
Bug: 37099941
Merged-In: Id7899381a537b1947cbb6164ed2b4a98492334af
Change-Id: Id7899381a537b1947cbb6164ed2b4a98492334af
(cherry picked from commit 3b7560bf88)
2017-05-01 22:07:50 +00:00
Colin Cross
9eff830fa2 Make javac checkbuilds match jack
Building all java to dex is very slow.  Make javac checkbuilds act
like jack checkbuilds and only build to class files for unused
modules, and add a java-dex target that can be used to build
everything to dex.

Test: m -j checkbuild
Change-Id: Idcf9c9e0223b9dd88aaa53beb0cb50a230034b0f
2017-04-28 13:39:16 -07:00
Colin Cross
b17f285169 Support LOCAL_JACK_ENABLED := javac_frontend
Allow working around Jack bugs by using javac to compile *.java
to class files, and then pass through Jack for desugaring,
proguarding, and dexing.

Also make ANDROID_COMPILE_WITH_JACK=false override LOCAL_JACK_ENABLED.

Bug: 37483961
Test: m -j checkbuild
Test: Add LOCAL_JACK_ENABLED := javac_frontend to a target
Change-Id: I2189055aac9deccc36b8eab8e949796dddadf7a1
2017-04-28 13:39:12 -07:00
Andreas Gampe
48d9a5c80b Build: Disable leak sanitizer for ijar
Temporary workaround.

Bug: 37756495
Test: ASAN_OPTIONS= SANITIZE_HOST=address mm
Change-Id: Idf48f45f0c33fc57af29574c8591a532144d4623
2017-04-28 10:36:12 -07:00
Andreas Gampe
83c5c474b8 Build: Disable leak sanitizer for llvm-rs-cc
Temporary workaround. Disable leak detection and container
overflow.

Bug: 37755219
Test: ASAN_OPTIONS= SANITIZE_HOST=address m
Change-Id: Id2a72fe7170123f8652f96a0fed29d03f99ae03b
2017-04-28 10:36:12 -07:00
Andreas Gampe
c5bb0d736e Build: Disable leak sanitizer for aapt
Temporary workaround.

Bug: 37750224
Test: SANITIZE_HOST=address m
Change-Id: If83e1df25890717d18b841fa65635427ba2ee36a
2017-04-28 10:36:12 -07:00
Nicolas Geoffray
a5bb180a89 Pass --force-determinism to prebuilts.
bug: b/37442966
Test: build
Change-Id: I231803874f6f2a7245a4ef03d50a271d3c29fc9f
2017-04-28 15:01:22 +01:00
Nicolas Geoffray
eb3d2f2e75 Use 'quicken' instead of 'interpret-only'.
bug: 34715556
Test: build
Change-Id: Id4518e80598b7baee64e92f7ff4ed600f8cdee5b
2017-04-28 13:04:38 +01:00
Nicolas Geoffray
24f54693f9 Make the default preopt 'interpret-only'.
bug:33799337
bug:36534079

Test: m -j32 bullhead/angler/marlin/sailfish

(cherry picked from commit e0848c8b7f)

Change-Id: I6d71bdca1d7b7afab8150a0b19a0e2235832d5e0
2017-04-28 12:46:34 +01:00
Nicolas Geoffray
cdd4343bb2 Don't preopt system server apps in system_other.
bug:36532541
bug:33799337

Test: m -j32 && find out/target -name \*.odex

(cherry picked from commit a2c6c0b11e)

Change-Id: Ic4396bb6c543af1c05f56030495caafb245ea304
2017-04-28 12:34:53 +01:00
Nicolas Geoffray
b08ada1daa Introduce a whitelist for core apps used by system server.
And by default 'speed' compile those apps at build time.

bug:33799337
Test: m -j32

(cherry picked from commit 9af483488a)

Change-Id: I66f1c675369fccc03b6529c08cb030264d15ba1c
2017-04-28 10:38:41 +01:00
Yueyao Zhu
211c90158c Makefile: support build and avb signing of dtbo img
Test: make with corresponding configurations in BoardConfig.mk
- dtbo.img is copied to the OUT directory
- avbtool info_image --image dtbo.img shows avb hashes
- avbtool info_image --image vbmeta.img shows dtbo partition info

Bug: 37730955
Change-Id: If3edaab860926c743f18fd031c911b076eb09fab
2017-04-27 14:49:39 -07:00
Narayan Kamath
5b50433f19 Merge "Update stale comment for dalvik.vm.stack-trace-file." 2017-04-26 08:23:49 +00:00
Dan Willemsen
0bf506f44a Exempt UBSAN runtime library from soong_to_convert
Soong already uses it, just not as a prebuilt module.

Test: Compare soong_to_convert.txt before/after
Change-Id: I6ffa0d967635d52b7b4f8b2b0465cd50254f22b9
2017-04-25 16:26:43 -07:00
Treehugger Robot
5aada52ffb Merge "Embed jni libs in vendor apks for treble-ized devices" 2017-04-25 21:06:35 +00:00
Narayan Kamath
d5068605f9 Update stale comment for dalvik.vm.stack-trace-file.
Test: make
Change-Id: Ia14494b146f58937aed203271be340747817519b
2017-04-25 15:41:04 +01:00
Simran Basi
3e73e2bca6 base_rules.mk : Support subconfigs for testcases.
Updates the test module build rules to also copy over any
extra test configs that match the naming convention of
LOCAL_MODULE_*.config

Bug: 37315907
Test: forrest test HelloWorldTests_HalloWelt
Change-Id: Ie476285fe780cb19264f1fb0294008b21893a4ed
2017-04-24 11:43:36 -07:00
Jiyong Park
1cb8dea625 Embed jni libs in vendor apks for treble-ized devices
JNI libs used by bundled APKs have been installed outside of the APK
(e.g. /system/lib and /vendor/lib) to save space because multiple APKs
may share the same set of JNI libs.

However, this causes problem for treble-ized devices where access to
/vendor/lib is prohibited for system processes including Java apps.

So, the JNI libs are embedded into the APK when the APK is installed to
/vendor partition and the device is fully treble-ized.

Bug: 37491282
Test: Move an APK and its JNI libraries to vendor partition by setting
LOCAL_PROPRIETARY_MODULE := true and build:
The jni lib does not exist under /system or /vendor. unzipping
the apk reveals the jni lib under ./lib/<abi> directory.

Change-Id: I8389761dfbd28d181869d79f0bf988a1e4df2fca
2017-04-24 10:01:34 +09:00
Treehugger Robot
cd46573189 Merge "make libprotobuf-cpp-* libs VNDK" 2017-04-21 07:46:20 +00:00
Dan Willemsen
2b7f8ab577 link_type: common overrides 2nd
This is what intermediates-dir-for does (though it also auto-detects
some common classes, which we don't)

Test: build-aosp_arm64.ninja is identical
Change-Id: I4a3efa74e060d82658b856e68318cd92403a6149
2017-04-20 14:37:23 -07:00
Treehugger Robot
594eb16b02 Merge "Disable CFI for ASAN targets. (Make)" 2017-04-20 21:28:13 +00:00
Treehugger Robot
2f9b9f0938 Merge "Fix LOCAL_MULTILIB := 64 in TARGET_TRANSLATE_2ND_ARCH builds" 2017-04-20 21:13:04 +00:00
Dan Austin
64e48c0b51 Merge "Update fuzz_test makefile." 2017-04-20 20:29:39 +00:00
Dan Willemsen
2e3c3cf537 Fix LOCAL_MULTILIB := 64 in TARGET_TRANSLATE_2ND_ARCH builds
64-bit only apps should only be enabled if the target supports 64-bit.

Test: lunch aosp_x86_arm-userdebug; m -j PMTest_Java64
Change-Id: Ibdc863730e97b1a89efb44840a1c633e9951a1d1
2017-04-20 11:19:10 -07:00
Dan Willemsen
e4d92ef568 Merge "Rewrite link type checking" 2017-04-20 15:04:08 +00:00
Vishwath Mohan
c026f6d0ed Disable CFI for ASAN targets. (Make)
This CL disables CFI if both CFI and ASAN flags are enabled. This
allows ASAN to take precedence where needed, preventing build errors
that would otherwise arise.

Bug: 30227045
Test: SANITIZE_TARGET="address" m -j40
Change-Id: I9073ace0a10eb554d14e418a9b23cc8a8277607d
2017-04-20 08:03:44 -07:00
Jiyong Park
c8f57d92ff make libprotobuf-cpp-* libs VNDK
libprotobuf-cpp-* libs are VNDK, However, since the '.vendor' prefix is
added before libprotobuf-cpp-* libs are added to my-*-libraries by
LOCAL_PROTOC_OPTIMIZE_TYPE, the clients are still linked against to the
platform version of the protobuf libs. As a result, link type error
occurs.

In order to avoid this, '.vendor' prefix is appended after
my-*-*libraries are all updated.

Test: normal build successfull
Test: add vendor_provided:true to libprotobuf-cpp-* and build successful
with BOARD_VNDK_VERSION=true

Change-Id: I1ed7978f03e0db56b4cbee86e286c0787f7a3afc
2017-04-20 15:41:51 +09:00
Dan Willemsen
b47d4e9cf1 Rewrite link type checking
All the new features are turned off for now, since multiple branches and
products need to be verified before they can be turned on. So everything
should behave the same as today, except for no partition-based
warnings.

Instead of the current link type checks that happen during the build,
run as many as possible immediately after loading all the Android.mk
files. If we're allowing missing dependencies ('mm',
ALLOW_MISSING_DEPENDENCIES, tapas, etc), we'll defer the link type
checks to during the build. If we're not allowing missing dependencies,
we'll produce a better error message to the user about the missing
dependencies.

See core/main.mk for a description of the storage format.

This also remove the partition-based type checking. It hasn't worked all
that well, particularly with ASAN builds. The new VNDK checks will
handle the most pressing cases.

Test: Verify all link_type files and dependencies are the same:
  grep link_type: out/build-aosp_arm64.ninja | sed -E "s/ rule[0-9]+//" | sort
Change-Id: Id643658b9d9e84f99f5db0d526aad88c1f5d3417
2017-04-19 22:41:32 -07:00
Tao Bao
e53c6e7200 Add the missing dependency on payload generation script.
For A/B OTAs, ota_from_target_files.py calls brillo_update_payload
script to generate the payload entry in an A/B OTA package.

Bug: 37443093
Test: lunch aosp_marlin-userdebug && rm
      out/host/linux-x86/bin/brillo_update_payload && m otapackage
Change-Id: I3845786b6c934c709f32e12a63cd6ea1f303d380
2017-04-19 21:30:15 -07:00
Vishwath Mohan
eddf74cadb Merge "Change the global CFI flag to default to enabled." 2017-04-20 01:39:56 +00:00
Vishwath Mohan
45fd769588 Merge "Change the global CFI flag to default to enabled." 2017-04-20 01:39:56 +00:00
Dan Austin
5567e5072e Update fuzz_test makefile.
Update the fuzz_test makefile to link against the new libFuzzer
library and update the coverage flags to the new version.

Test: built a fuzzer and verified correct linking.
Change-Id: Ie6e6da9a202a258abf805dbdc8cdd3490fcb2406
2017-04-19 10:58:58 -07:00
Colin Cross
5f89212e24 Filter and colorize javac output V3
Add soong_javac_wrapper to all javac commands. soong_javac_wrapper
colorizes javac output, and hides noisy messages.

Previously attempted in I7e8fcd2e4e1ed3ff530a8ccfe931ceb7e411e0ad
and I449a61ed2c95b3e1afd51a31a11baab15d97e2f2.

Test: m -j ANDROID_COMPILE_WITH_JACK=false
Change-Id: I9d7a20d766fadab323a4cf95e5734741b3f578bb
2017-04-18 21:04:58 +00:00
Vishwath Mohan
c3b255622d Make PIC/PIE levels compatible for LTO.
The build system currently uses -fPIC for position independent
libraries, and -fpie for position independent executables. However,
these levels are incompatible and conflict when an executable includes
a static lib with the -fPIC flag - such as when building with
LTO. This CL changes the flag for executables to the compatible -fPIE
instead, which is equivalent for all architectures except PowerPC.

Bug: 30227045
Test: ENABLE_CFI=true m -j40 checkbuild # builds and boots
Change-Id: Ieb20bc2528300d88ff05e8787c5840ab6f03fb38
2017-04-17 16:16:33 -07:00
Colin Cross
04e4fd3071 Merge "Set PRIVATE_PREFIX when using $(transform-prebuilt-to-target)" 2017-04-17 18:31:01 +00:00
Bowgo Tsai
9b3776017f AVB: support BOARD_BUILD_SYSTEM_ROOT_IMAGE
Passing --setup_rootfs_from_kernel to avbtool when
BOARD_BUILD_SYSTEM_ROOT_IMAGE is true

Bug: 33590159
Test: 'make' sailfish with BOARD_AVB_ENABLE := true
Test: 'make dist' with BOARD_AVB_ENABLE := true
Change-Id: Ieb58dd9ae6be1eceb90a33c739b85cff5cbc6e0a
2017-04-15 08:53:40 +08:00
Bowgo Tsai
8ee4a3db8c AVB: support signing vendor.img
Uses avbtool to sign vendor.img if BOARD_AVB_ENABLE is set.
It also allows appending additional arguments to avbtool via
BOARD_AVB_VENDOR_ADD_HASHTREE_FOOTER_ARGS.

e.g.,
  BOARD_AVB_ENABLE := true
  BOARD_AVB_VENDOR_ADD_HASHTREE_FOOTER_ARGS := --generate_fec

Bug: 35415839
Test: "make" with the above variables and use avbtool to check vbmeta is
      appended to vendor.img
Test: "make dist" with the above variables

Change-Id: I8ada38dff3def6d34613e77c67944def8a49f464
2017-04-15 08:53:06 +08:00
Dan Willemsen
01f4e20172 Merge "Overridden packages shouldn't install vdex files either" 2017-04-14 23:53:23 +00:00
Colin Cross
d2e778fb5a Set PRIVATE_PREFIX when using $(transform-prebuilt-to-target)
If PRIVATE_PREFIX is unset transform-prebuilt-to-target references
$(DISPLAY) instead of $(HOST_DISPLAY) or $(TARGET_DISPLAY), which
causes unnecessary kati regenerations when the DISPLAY environment
variable changes.

Bug: 36901093
Bug: 37333696
Test: grep for $DISPLAY in out/build-${TARGET_PRODUCT}.ninja
Change-Id: Ia9802fc2b07da9b74e8f80dfdcef121408cd9817
2017-04-14 15:24:49 -07:00
Dan Willemsen
e224725c95 Overridden packages shouldn't install vdex files either
Bug: 37348494
Test: internal marlin, check for WebViewGoogle.vdex
Change-Id: I16469f7d84b972cee5b13aed58f4ec3f995cb83e
2017-04-14 13:33:58 -07:00
Colin Cross
dd63df89d5 Merge "Make mini-debug-info stripping pass on already stripped binaries" 2017-04-14 20:14:42 +00:00
Colin Cross
5e93057da4 Make mini-debug-info stripping pass on already stripped binaries
Prebuilts may already be stripped.  Instead of requiring every stripped
prebuilt to be annotated with LOCAL_STRIP_MODULE := false, just make
the default (mini-debug-info) pass through already-stripped modules
without failing.

Bug: 36793128
Test: m -j checkbuild
Change-Id: Iafc4614ceb91bbbb2e5ff82caefd18753f8961b1
2017-04-13 14:44:26 -07:00
Treehugger Robot
ba0ebe9230 Merge "Revert "Revert "device-tests: As a dependency to tests""" 2017-04-12 21:05:08 +00:00
Treehugger Robot
4d15a84fc0 Merge "Common testcase directories: Clean up duplicates" 2017-04-12 08:10:20 +00:00
Dan Willemsen
4e789c2e57 Merge "Support split /system and /vendor modules from Soong" 2017-04-12 00:06:52 +00:00
Colin Cross
cde14987ba Support java annotation proccessors
The codebase is growing more uses of annotation processors,
through a mixture of LOCAL_ADDITIONAL_DEPENDENCIES and
LOCAL_JACK_FLAGS.  Add LOCAL_ANNOTATION_PROCESSORS and handle
the rest in the build system.

For now we also need LOCAL_ANNOTATION_PROCESSOR_CLASSES to
work around bad behavior in grok (b/25860419).

Test: m -j java
Change-Id: I465b021e65d25ed3ea517333a82ec4ebd63fc038
2017-04-11 09:56:09 -07:00
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
Colin Cross
5e58793731 Add support for LOCAL_ERROR_PRONE_FLAGS
This will allow individual modules to enable error prone checks
as needed so that the change to treat an error prone check as a
compiler error can be done atomically with the changes to fix
the issues that check reveals.

Tested with the following steps, cleaning up the targets in
between to ensure that it was rebuilt everytime.

Set LOCAL_ERROR_PRONE_FLAGS := -Xep:ClassCanBeStatic:WARN
compiler error in junit-params-test target. Built
javac-check-junit-params-test with RUN_ERROR_PRONE=true to make
sure that compilation failed.

Built the javac-check-junit-params-test without RUN_ERROR_PRONE
set to make sure that the flag is not included unless explicitly
requested.

Built the junit-params-test as normal to make sure it still
worked properly.

Bug: 31507496
Test: See above
Change-Id: I88b5800dacd0e30dd9dcfa5f42e89d1428957365
Merged-In: I88b5800dacd0e30dd9dcfa5f42e89d1428957365
(cherry picked from commit 3ca9298d99)
2017-04-07 17:46:40 -07: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
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
Simran Basi
65850daeb0 Revert "Revert "device-tests: As a dependency to tests""
This reverts commit df086140a8.

CQ-DEPEND=CL:365575
Bug: 35386840
Test: None

Change-Id: I17dc00ed64e220c5ce532386da1a1bc15cbfc439
2017-04-05 20:51:01 +00:00
Simran Basi
8a431d9c7d Common testcase directories: Clean up duplicates
This CL addresses the problem that native tests build for multiple
architectures and also build for host.

First it restructures each testcase folder to the following layout:
<testcase>/<testcase>.config
<testcase>/<arch 1>/testcase
<testcase>/<arch 2>/testcase

Secondly it now uses the new soong-zip prefix capability to
separate out host and target testcases in the device-tests &
general-tests zip files.

Bug:36692141
Test: `make device-tests general-tests cts -j` &
      ensured all built successfully.

Change-Id: I4e8b084ee56fa8940914911649ff35507d87eb27
2017-04-05 13:38:20 -07: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
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
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
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
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
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
Treehugger Robot
85473982fb Merge "Build: ASAN in system" 2017-03-30 01:16:53 +00:00
Colin Cross
e088c648c7 Merge "Revert "Revert "Revert "Add soong_javac_filter to all javac commands""""
am: df69a927d8

Change-Id: I693e6d1d2abfe0efe94e113cc3ce56691ad7f7e3
2017-03-30 01:01:51 +00:00
Treehugger Robot
df69a927d8 Merge "Revert "Revert "Revert "Add soong_javac_filter to all javac commands"""" 2017-03-30 00:53:06 +00:00
Andreas Gampe
039b5c779f Build: ASAN in system
Add build system support for asan.tar.bz in the system image. This
is triggered by SANITIZE_TARGET_SYSTEM=true.

Bug: 36458146
Test: m && m SANITIZE_TARGET=true SANITIZE_TARGET_SYSTEM=true
Change-Id: I725f99f16a8c9182b1c7ad26580c73d3708f8554
2017-03-29 16:19:28 -07:00
Colin Cross
fc8ead6609 Revert "Revert "Revert "Add soong_javac_filter to all javac commands"""
This reverts commit 440079b84b.

Adding the pipe interferes with error codes, which results
in an empty classes-full-debug.jar output file being left
after the failure.  The next build sees the output file with
an up-to-date timestamp and doesn't rerun the failing rule.

Bug: 36666657
Change-Id: I6658edb766d8ba3120f88e3d8d6eda6ea6c691da
2017-03-29 21:01:24 +00:00
Benoit Lamarche
8488228d9a Merge "Changing default Jack arguments."
am: cadf11068c

Change-Id: I63ba8fb0ec5991e63e8a2fb3246ba30da8eb9fe5
2017-03-29 08:53:51 +00:00
Benoit Lamarche
cadf11068c Merge "Changing default Jack arguments." 2017-03-29 08:49:32 +00:00
Stephen Hines
073ab0a707 Switch to clang-3859424.
Bug: http://b/36442361
Test: Build and run multiple devices/targets.
Change-Id: I161003f07982b1794ef5f1d1d61a48ddf45f6ab3
2017-03-28 22:11:52 -07:00
Dan Willemsen
a71a8c0ae3 Merge "Ensure that BOARD_VNDK_VERSION is current"
am: 4ef5040cc3

Change-Id: I79f43fa6db5f043122fc17c2d89c03bfc0690494
2017-03-29 04:40:05 +00:00
Treehugger Robot
4ef5040cc3 Merge "Ensure that BOARD_VNDK_VERSION is current" 2017-03-29 04:34:29 +00:00
Colin Cross
e611741d85 Merge "Add min and max supported versions"
am: ae4779e254

Change-Id: Ic6d0fb99e95d55253be00f7b191d3287a207c2c8
2017-03-29 00:49:20 +00:00
Colin Cross
8fb3f39bcd Merge "Move comments to the previous line"
am: 906a3ea5d6

Change-Id: I70787abb1a80987fb89a4444c68b9658c80c0622
2017-03-28 22:27:44 +00:00
Colin Cross
c901659377 Add min and max supported versions
Add MIN_PLATFORM_VERSION and MAX_PLATFORM_VERSION to track
the range of releases that are expected to be released from
the current branch.

Also simplify version_defaults.mk by moving most of the code
to envsetup.mk.

Test: build/make/tests/envsetup_tests.sh
Change-Id: I4f19c31c267e202f8f5ba1384a8b4385d725f9d7
2017-03-28 13:32:04 -07:00
Colin Cross
349a7a7f1a Move comments to the previous line
End-of-line comments cause the variable to be set to a space, which
confuses using ifdef on it.

Test: builds
Change-Id: I7b1eb3b9febff1a5a5fca1e6623b2b36d538dacc
Merged-In: I7b1eb3b9febff1a5a5fca1e6623b2b36d538dacc
2017-03-28 13:24:45 -07:00
Makoto Onuki
0a069a74c2 Merge "Add USE_FILESLIST_GO to switch to fileslist.go"
am: d625ef2894

Change-Id: I6d869be0b7ab9084168803ceaaf58fc2ba3c8da5
2017-03-28 16:50:21 +00:00
Makoto Onuki
d625ef2894 Merge "Add USE_FILESLIST_GO to switch to fileslist.go" 2017-03-28 16:41:05 +00:00
Denis Vnukov
562ac35058 Changing default Jack arguments.
This change sets Jack default arguments to enable some of lambda
optimizations, namely: lambda grouping in scope of a single package
and using singletin lambda objects for stateless lambdas.

Test: tested manually

Change-Id: Id2d0c37e3462f1e3137cfef2684cf6e74df6089b
2017-03-28 12:13:32 +02:00