Commit graph

939 commits

Author SHA1 Message Date
Jaekyun Seok
3070610b72 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
2017-03-14 23:55:50 +09:00
Jiyong Park
3dd9a1fa0a Merge "install *.so in different paths for their types" am: 55b14bdaa4 am: a2b86b14a5
am: 5219726d7f

Change-Id: I68800d6dfd93d97a4c4b7eb0dbec239f734217ee
2017-03-14 00:31:46 +00:00
Treehugger Robot
55b14bdaa4 Merge "install *.so in different paths for their types" 2017-03-14 00:15:50 +00:00
Jiyong Park
842a985f90 install *.so in different paths for their types
Shared libraries are now installed to different directories depending on
their types.

* NDK libraries: /system/lib/ndk (with symlink from /system/lib)
* VNDK libraries: /system/lib/vndk
* VNDK-ext libraries: /system/lib/vndk-ext
* Framework-only libraries: /system/lib
* Vendor-only libraries: /vendor/lib
* Same-process HALs: /vendor/lib/sameprocess

However, if LOCAL_MODULE_PATH is explicitly set, then it is respected,
with a warning message. Module owners are highly encouraged to
investigate the warnings and use alternatives to LOCAL_MODULE_PATH;
combination of LOCAL_[PROPRIETARY|OEM|ODM]_MODULE, LOCAL_MODULE_CLASS
and LOCAL_RELATIVE_PATH will cover most of the cases.

Furthermore, for each shared libraries whose path is changed, a symolic
link from the original path to the new path is *temporarily* generated.
e.g. /system/lib/libbase.so -> vndk/libbase.so. This is
to prevent sudden breakage of the code expecting the lib from the old
path. This symbolic links will eventually be removed before O launch
(b/34917183).

Finally, BOARD_SAME_PROCESS_HAL_DEPS is added. It contains the list of
shared libraries implementing the same-process HALs and its internal sub
libraries. This is designed to be defined in BoardConfig.mk

Bug: 33681361
Test: build & run. Libraries must be in the correct directories.
Symlinks from the old path to the new path must exist.

Change-Id: I46130aac09ae65400fd4d0abbc2e12dddd154fb1
2017-03-13 08:27:09 +09:00
Sen Jiang
67b7aaab7d Merge "Remove DBus support." am: cf858d873b am: efcda5173d
am: 3d6b408aea

Change-Id: I183f58049ef63ce8f6bfbd67554199878b7a69cb
2017-03-03 21:02:37 +00:00
Sen Jiang
cf858d873b Merge "Remove DBus support." 2017-03-03 20:54:38 +00:00
Vijay Venkatraman
de308c19d4 Merge "Fix for compile error when BUILD_HEADER_LIBRARY is used" am: 69e8252aec am: e4f88be6ed
am: 2f2d4b79b5

Change-Id: I852d671b730978af3595fa5041689cc37bc3a53a
2017-03-03 04:19:40 +00:00
Vijay Venkatraman
69e8252aec Merge "Fix for compile error when BUILD_HEADER_LIBRARY is used" 2017-03-03 04:10:50 +00:00
Sen Jiang
d1f397e8b4 Remove DBus support.
external/dbus and external/dbus-binding-generator was removed from
the manifest.

Bug: 31602715
Test: make checkbuild
Change-Id: Iea0277720acad8ac0fa630b8745f90fb3c3b5f00
2017-03-02 18:00:21 -08:00
Vijay Venkatraman
465b17fc3c Fix for compile error when BUILD_HEADER_LIBRARY is used
Test: include $(BUILD_HEADER_LIBRARY) in Android.mk and compile
Change-Id: If720be2d73b1c026961c75b65d82887b5dd41442
2017-03-02 11:47:33 -08:00
Steven Moreland
5a9cfecc85 Merge "Add PRODUCT_FULL_TREBLE." am: 5236e11c54 am: 848e9430bc
am: e1de7cd45a

Change-Id: I335f68e8d49538a7539cfb2e751d2c34cb52e260
2017-03-02 04:49:28 +00:00
Steven Moreland
c10f1413d5 Add PRODUCT_FULL_TREBLE.
PRODUCT_FULL_TREBLE: whether the device has Treble fully enabled (no
passthrough hals, vendor.img, split sepolicy, etc..)

PRODUCT_FULL_TREBLE_OVERRIDE: used if someone wants to consider a device
as full Treble even if it didn't launch with Android O.

Bug: 35809750
Test: PRODUCT_FULL_TREBLE set appropriately with
PRODUCT_FULL_TREBLE_OVERRIDE and PRODUCT_SHIPPING_API_LEVEL = 24/25

Change-Id: I069448beaf26c70acb6c45d4228d8fdfe9476410
2017-03-01 19:08:24 -08:00
Simran Basi
fdf88008d7 Merge "Add support for multiple LOCAL_COMPATIBILITY_SUITES & undefined testcase directories." am: 6abedc9b3e am: 22cc401165
am: 7fa662af82

Change-Id: I010caf27bae2b65f47c9d92c37f3d5b456fa6397
2017-02-28 23:50:39 +00:00
Treehugger Robot
6abedc9b3e Merge "Add support for multiple LOCAL_COMPATIBILITY_SUITES & undefined testcase directories." 2017-02-28 23:42:18 +00:00
Simran Basi
6bea37c7fa Add support for multiple LOCAL_COMPATIBILITY_SUITES & undefined testcase directories.
1) Updates the LOCAL_COMPATIBILITY_SUITE line to allow for a
   testcase to belong to multiple suites.
2) Building testcases no longer fails if
   COMPATIBILITY_TESTCASES_OUT_<suite> is not defined. This
   testcase will just not output to that directory.
   This will be utilized by the device-tests and general-tests
   suites that don't require any extra output besides the common
   testcase directory.

Bug: 35394351
Test: 1) Added multiple *TS testcases to cts & vts and verified they
       ended up in the common directory and each suite's testcase
       directory. Specifically tested CtsSplitApp to ensure the
       split usecase still works as well.
      2) Added a CTS testcase to the device-tests suite, built
       device-tests and verified the cts/android-cts/testcases
       copy was not produced.

Change-Id: Ic4c4e87e62be4fc0c5e394d88cc359518346dffa
2017-02-28 12:41:40 -08:00
Dan Willemsen
433e7e4d45 Merge "Add progress indicator to Android.mk includes" am: 353a659a31 am: 100edc4a4c
am: d2445ea0b2

Change-Id: Ib60190f62fc78e261b6d02287bf8f68891bd7d12
2017-02-24 18:01:52 +00:00
Dan Willemsen
353a659a31 Merge "Add progress indicator to Android.mk includes" 2017-02-24 17:50:13 +00:00
Colin Cross
8b0034c435 Merge "Pass min sdk version to dx and desugar" am: bbad7c3e1f am: 4a4325d313
am: 14fce4b072

Change-Id: If9ac3b69957689bd451fc97fe968d79f42a751e9
2017-02-23 18:24:46 +00:00
Colin Cross
bbad7c3e1f Merge "Pass min sdk version to dx and desugar" 2017-02-23 18:18:38 +00:00
Dan Willemsen
33631b3580 Add progress indicator to Android.mk includes
Test: m -j
Change-Id: I1e6fd020a06b49c243be14953d9f417e64ac7b8b
2017-02-22 11:20:51 -08:00
Colin Cross
536ef4e35a Pass min sdk version to dx and desugar
Test: make checkbuild
Change-Id: Idde9712508571ea623126c7d25d2fa67eccf4833
2017-02-22 11:10:37 -08:00
Paul Duffin
472055eebc Merge "Filter JUnit and android.test classes from applications using proguard" am: 38a231d6c3 am: 3e93d553ec
am: 6c99b4bc49

Change-Id: If3985352b27f1de5ea1e9d8c6834c08f5dbcb34f
2017-02-22 12:24:55 +00:00
Paul Duffin
f22aca1e47 Filter JUnit and android.test classes from applications using proguard
The new javac/desugar/proguard/dx based toolchain can fail if
there are duplicate classes in the -injars and -libraryjars
passed to proguard. That causes problems for b/30188076 which
is attempting to remove various junit and android.test classes
from the API because it requires the changes to add those
classes statically to applications are submitted simultaneously
with the change to remove the classes from the API which is not
feasible.

This change simply causes Proguard to ignore the classes from
the application JAR so it will always use them from the library.
That allows the changes to be done separately and only requires
that this change is reverted simultaneously with the change to
update the API.

Bug: 30188076
Test: make checkbuild and make -j ANDROID_FORCE_JACK_ENABLED=disabled checkbuild
Change-Id: I6ed6c45a159d6261d90245551aa2913cc82d2e8b
2017-02-21 13:11:13 +00:00
Colin Cross
348522fabf Merge "Revert "Revert "Add soong_javac_filter to all javac commands""" am: 29f3642dd1 am: 58ffd38f97
am: 77b7e12e25

Change-Id: I7a62df5e9eca3304ec753ea887b8d7b01ce938f4
2017-02-20 07:08:53 +00:00
Colin Cross
440079b84b Revert "Revert "Add soong_javac_filter to all javac commands""
This reverts commit 52d2253ff9.

Test: pipe the grok build output through soong_javac_filter
Change-Id: I449a61ed2c95b3e1afd51a31a11baab15d97e2f2
2017-02-19 19:56:51 -08:00
Colin Cross
c957f4202c Merge "Add a desugar step between javac and proguard" am: 9e92c2fd18 am: e4381dcac2
am: d48f9252d5

Change-Id: If02fc7dcd4bdc06aee3ca35b70da5568e41f0f62
2017-02-18 06:23:56 +00:00
Dan Willemsen
0c89af6a6a Merge "Remove unused zipalign macros" am: 56183c2ee2 am: e4a0dd15cc
am: d20c5e2a81

Change-Id: Id3a7d0f64d581376dcb38bc324f252ed99332a1a
2017-02-18 06:23:05 +00:00
Dan Willemsen
dc750c31ca Merge "Add Header Library support to Make" am: 4f794fdd50 am: ea2687fab6
am: 4a78c9e50f

Change-Id: I711c810cef8487c2d8e7b53deb9ccaad89592b1d
2017-02-18 06:22:20 +00:00
Colin Cross
9e92c2fd18 Merge "Add a desugar step between javac and proguard" 2017-02-18 01:10:08 +00:00
Treehugger Robot
56183c2ee2 Merge "Remove unused zipalign macros" 2017-02-18 00:12:42 +00:00
Dan Willemsen
4f794fdd50 Merge "Add Header Library support to Make" 2017-02-17 23:50:41 +00:00
Colin Cross
b176192db4 Merge "Revert "Add soong_javac_filter to all javac commands"" am: 6dd4debe74 am: cb78c50239
am: 4db7d2d72b

Change-Id: I131feafdee7549a1668f8a5ec220284d808cc608
2017-02-17 23:06:41 +00:00
Colin Cross
eac5ce4e97 Add a desugar step between javac and proguard
This enables support for lambdas by passing class files through the
desugar tool.

Test: m -j checkbuild tests cts
Change-Id: I14ec152355243fd67fe2f107ccbe67a1b4e7e262
2017-02-17 15:03:06 -08:00
Colin Cross
52d2253ff9 Revert "Add soong_javac_filter to all javac commands"
This reverts commit a341bf0f86.

Breaks grok builds that replace javac with another tool:
reading standard input: bufio.Scanner: token too long

Change-Id: I825587c465b05c1fbddb7794dc1c84f5f2c883d1
2017-02-17 22:53:42 +00:00
Colin Cross
9256be1822 Merge changes I7e8fcd2e,Ie12d743c am: 547f7393d7 am: 8283b186be
am: 7d8a028cd3

Change-Id: Ife691c9e00e766293e3648348e3c86b92f96fd56
2017-02-17 22:45:38 +00:00
Dan Willemsen
85acdfac58 Remove unused zipalign macros
Test: codesearch
Test: build-marlin.ninja is identical before/after (in internal master)
Change-Id: I1c5c39cabcc166b8e8608ace3290b7027d258624
2017-02-17 10:44:30 -08:00
Colin Cross
a341bf0f86 Add soong_javac_filter to all javac commands
soong_javac_filter colorizes javac output, and hides noisy messages.

Test: builds
Change-Id: I7e8fcd2e4e1ed3ff530a8ccfe931ceb7e411e0ad
2017-02-16 14:08:45 -08:00
Colin Cross
79e2f73b6c Re-enable dx support
This is a partial revert of commits:
858657366f Remove support of disabling Jack.
3ae7861252 Remove javac support in host dex rules.
22313f2b2a Remove rules for building dex with dx

Test: builds
Change-Id: Ie12d743cbe978bdeb030910848b67f5945a4fec8
2017-02-16 14:08:45 -08:00
Dan Willemsen
8dae49c5e1 Add Header Library support to Make
We currently use static libraries without any source files to represent
header libraries, but Soong actually has cc_library_headers. So to
export those in a separate namespace from static libraries, implement
them in Make as well.

This also adds a nice pretty-warning / pretty-error macro that can be
used to print out standard warning messages pointing to the real source
file having the problem.

Test: Use a header library exported by Soong in a Make module
Change-Id: I3486539e247524cb82a20620745fc7be03014e14
2017-02-15 16:04:49 -08:00
Colin Cross
6b1fedf60e Merge "Create static archives in temporary file" am: 2eca5d30df am: 0cbb3086de am: af87d8d1c5
am: b64f3908c1

Change-Id: I60386b77ad6cc61c465dc246df2ecbe41f81927a
2017-02-06 21:31:46 +00:00
Colin Cross
e14d9b7f7e Create static archives in temporary file
Creating static archives is often a multi-command process due to
adding whole static libraires or hitting command line length limits.
If one of the intermediate commands fails, the output file may
already exist.  Unlike make, ninja has no option to delete output
files on failed builds, instead assuming all build commands will
produce their output file atomically
(https://github.com/ninja-build/ninja/issues/1135).

Change the static library rules to generate to a temporary file
that is then atomically moved into place as the output file.

Test: m -j checkbuild tests cts
Change-Id: I4faf269f0c8e313c738154870a5aa0b4774a72bc
2017-02-03 15:16:59 -08:00
Evgenii Stepanov
a620b36458 Merge "Run $(AR) with LLVMgold.so plugin for CFI targets." am: 96c81711c1 am: e729e804fe am: 629002835a
am: d79d664dc9

Change-Id: Ia2d4f0a4748f3e7964d384e58c386c8678f810c4
2017-01-24 21:00:40 +00:00
Evgenii Stepanov
e1b96f3ae5 Run $(AR) with LLVMgold.so plugin for CFI targets.
Bug: 34623182
Test: add LOCAL_SANITIZE:=cfi to some static libraries under libstagefright
Change-Id: I4f0d8cbd794e0ce4737c59a4617e93c7a5defec1
2017-01-23 17:02:22 -08:00
Dan Willemsen
a006925a03 Merge "Remove generated java source post clean logic" am: f57aa792c3 am: 5208e4f473 am: 5ae5671a3b
am: b585264834

Change-Id: Ic9d89893213616a13df5530f382fa2ec4d4e964e
2016-12-22 20:36:07 +00:00
Dan Willemsen
cf324af6b8 Remove generated java source post clean logic
Just move the proto and renderscript sources into their own directories
-- the entire directory is wiped if the file list changes since the
command line will change. So we can just enable/disable pulling sources
from those directories based on whether there were files in the list or
not.

Bug: 30947985
Test: m -j java
Test: Remove a proto file from a java lib, ensure the generated source
      is not included.
Change-Id: If7529979de6fa62a651933a3a974f47b033851d6
2016-12-22 10:37:31 -08:00
Alex Klyubin
664cc31fd8 Remove unused get-package-min-sdk-version-int
The only user of get-package-min-sdk-version-int was signapk. signapk
no longer needs to be provided with the APK's minSdkVersion though.

(cherry picked from commit e185da21ca)
Test: make clean && make

Change-Id: I6867a004aec0f3752cbbc99cc30e02ca5404b3c4
2016-12-15 16:37:37 -08:00
Alex Klyubin
e185da21ca Remove unused get-package-min-sdk-version-int
The only user of get-package-min-sdk-version-int was signapk. signapk
no longer needs to be provided with the APK's minSdkVersion though.

Test: make clean && make
Change-Id: Ibc0fb9c8e412f8b46b1761359c34b64c608a06b6
2016-12-15 09:28:46 -08:00
Alex Klyubin
1ea326df0b Merge "Faster auto-detection of APK's minSdkVersion" am: 620686f3c6 am: 1f5e43cb6f am: 9d439f54b1
am: 25aa9cd031

Change-Id: I4f19a1550a43515bd77e63fd5745b01d40c6be50
2016-12-15 00:39:09 +00:00
Alex Klyubin
9b75e272b6 Faster auto-detection of APK's minSdkVersion
Prior to this change, when signing APKs, the build system invoked
'aapt dump badging' on each APK, to detect the value to pass into
signapk as --min-sdk-version. Now that signapk uses the apksig
library, it can auto-detect that value on its own, thus avoiding the
need to invoke 'aapt dump badging' and thus speeding up the build
process.

The semantics of signapk's --min-sdk-version flag is changed by this
commit from having the default value of 0 to having the default value
of "auto-detect from APK".

P.S. The get-package-min-sdk-version-int is not removed from
core/definitions.mk in this commnit, because this function is used in
another project's .mk file and thus that .mk file needs to be modified
first.

Test: rm -Rf out/ && make
Change-Id: I0972fcf0abbde9cbf6794e6c05c743c77c8a78f9
2016-12-14 12:53:44 -08:00
Dan Willemsen
17f8795332 Merge "Implement LOCAL_TEST_DATA to ship data with tests" am: dd0e69d47f am: 04cf52edab am: 1f7aae0ac2
am: e31b1a81c9

Change-Id: I0f8912411e3bc2d1b501c4f39003bdf4ec004db6
2016-12-14 04:23:27 +00:00