Commit Graph

34390 Commits

Author SHA1 Message Date
Nicolas Geoffray
0576b5f24e Update build files to new compiler filters.
bug:34715556
Test: build and boot aosp bullhead
Change-Id: I95c7bbabd68a58206e8c79a017337a7f9a518569
2017-04-25 12:25:33 +01:00
Simran Basi
1543b1a3e5 Merge "base_rules.mk : Support subconfigs for testcases."
am: f1ec8ac22d

Change-Id: I398f45e37fef34ef3bd1e766133a9de2333e4d6a
2017-04-24 21:07:36 +00:00
Treehugger Robot
f1ec8ac22d Merge "base_rules.mk : Support subconfigs for testcases." 2017-04-24 20:54:28 +00: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
George Burgess IV
169f5f1c6c warn.py: have URLs open in new tabs
Bug: None
Test: Ran warn.py on a build log. Code links in resultant HTML open in
new tabs when clicked.

Change-Id: Ia3def5ea14fe216700cb2ffabe4a39b98e69d55a
2017-04-21 15:19:36 -07:00
Jiyong Park
e56c17d779 Merge "make libprotobuf-cpp-* libs VNDK"
am: cd46573189

Change-Id: I2504dae4a287bc4ac1269229dca1cf7e4902c037
2017-04-21 07:50:59 +00:00
Treehugger Robot
cd46573189 Merge "make libprotobuf-cpp-* libs VNDK" 2017-04-21 07:46:20 +00:00
Dan Willemsen
901e5ac899 Merge "link_type: common overrides 2nd"
am: a637a59b7e

Change-Id: I93f30dd9fb1b56ae10f3acc5279c7a2bbd52b6e2
2017-04-20 23:33:24 +00:00
Treehugger Robot
a637a59b7e Merge "link_type: common overrides 2nd" 2017-04-20 23:26:07 +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
Vishwath Mohan
eac1397cc3 Merge "Disable CFI for ASAN targets. (Make)"
am: 594eb16b02

Change-Id: I5d148e2d38f244c1779b79b10d893d6e551d6e9b
2017-04-20 21:34:15 +00:00
Treehugger Robot
594eb16b02 Merge "Disable CFI for ASAN targets. (Make)" 2017-04-20 21:28:13 +00:00
Dan Willemsen
8156e82fa7 Merge "Fix LOCAL_MULTILIB := 64 in TARGET_TRANSLATE_2ND_ARCH builds"
am: 2f9b9f0938

Change-Id: Ib95c950f13747a8476bcf9fb5876acab892d75ee
2017-04-20 21:17:14 +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
625820cf3a Merge "Update fuzz_test makefile."
am: 64e48c0b51

Change-Id: I150afee55af70d7c4094e41ebab066af3cd30c26
2017-04-20 20:39:11 +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
d76aaed983 Merge "Rewrite link type checking"
am: e4d92ef568

Change-Id: Iba88d5113ef0ce9321fb98057261323ec160d6a9
2017-04-20 15:10:18 +00: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
69a345338a Merge "Change the global CFI flag to default to enabled."
am: eddf74cadb

Change-Id: I1f954ebfd9b948a554f994840bce7e33563219b3
2017-04-20 01:44:59 +00:00
Vishwath Mohan
6e790c6a49 Merge "Change the global CFI flag to default to enabled."
am: 45fd769588

Change-Id: I89f1efa7c08a1e4fc3df2987948b3965497b35c3
2017-04-20 01:44:53 +00: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
f4ef1db272 Merge "Filter and colorize javac output V3"
am: c8387929d1

Change-Id: I6c3e196f4b3c38963b106df28e7f1ec2761a17d7
2017-04-18 23:03:27 +00:00
Treehugger Robot
c8387929d1 Merge "Filter and colorize javac output V3" 2017-04-18 22:53:46 +00: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
dc8469e858 Merge "Make PIC/PIE levels compatible for LTO."
am: 4be1d8823e

Change-Id: I3e7409da1f9d570077693834b941979e1ffa6f5b
2017-04-18 01:56:36 +00:00
Treehugger Robot
4be1d8823e Merge "Make PIC/PIE levels compatible for LTO." 2017-04-18 01:48:59 +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
418571baf2 Merge "Set PRIVATE_PREFIX when using $(transform-prebuilt-to-target)"
am: 04e4fd3071

Change-Id: Icf2f285ef47e80b31efb8f04bbde1d457fa5c048
2017-04-17 18:39:37 +00:00
Colin Cross
04e4fd3071 Merge "Set PRIVATE_PREFIX when using $(transform-prebuilt-to-target)" 2017-04-17 18:31:01 +00:00
Bowgo Tsai
225a18d07d Merge changes Ieb58dd9a,I8ada38df
am: 9ea5c1aad0

Change-Id: I8999475abae84b2f7bc1019da702c1e7db1f6628
2017-04-15 05:41:29 +00:00
Bowgo Tsai
9ea5c1aad0 Merge changes Ieb58dd9a,I8ada38df
* changes:
  AVB: support BOARD_BUILD_SYSTEM_ROOT_IMAGE
  AVB: support signing vendor.img
2017-04-15 05:36:59 +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
5a8b1617ae Merge "Overridden packages shouldn't install vdex files either"
am: 01f4e20172

Change-Id: Ie96f6c6a82b28cf12fd61c39a1541a57e83beb0a
2017-04-15 00:00:04 +00: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
4b69a9632e Merge "Make mini-debug-info stripping pass on already stripped binaries"
am: dd63df89d5

Change-Id: Ideef857ffdd4a56cfdd954151d4963f5c359e473
2017-04-14 20:18:45 +00: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
Sam Saccone
4b22df2b4e Merge "Add the ability to save off the CSV to a file."
am: c5b172b1eb

Change-Id: Ib64be2c4b5812e8df8f0ca640688fb724a477fff
2017-04-13 14:48:15 +00:00
Sam Saccone
c5b172b1eb Merge "Add the ability to save off the CSV to a file." 2017-04-13 14:36:45 +00:00