Commit graph

1683 commits

Author SHA1 Message Date
Colin Cross
d77b244a63 Merge "Revert "Revert "Use sdk variant of Soong modules when LOCAL_SDK_..."" am: 65ca0eec96 am: fc85e271c3
Change-Id: I25b78883836b0f189a4106698e6bf0772a8ab00c
2020-04-08 18:42:10 +00:00
Colin Cross
65ca0eec96 Merge "Revert "Revert "Use sdk variant of Soong modules when LOCAL_SDK_..."" 2020-04-08 18:29:30 +00:00
Yo Chiang
0b49c03727 Check ELF prebuilts in PRODUCT_COPY_FILES
Add a check to ban ELF prebuilts in PRODUCT_COPY_FILES.
ELF prebuilts should be defined properly by cc_prebuilt_library_shared
and cc_prebuilt_binary so that the build system can keep track of the
file dependencies.

To opt in this check, set this option in BoardConfig.mk:
  BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := false

After all devices that have ELF prebuilts in PRODUCT_COPY_FILES are
tagged with BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true flip
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES to default false.

After a device is cleaned up, remove its
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true setting.

Bug: 140560012
Test: Set BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := false
Test: m # Should report any ELF prebuilt error in PRODUCT_COPY_FILES
Change-Id: Id75dac9417aed9baa7c5e9388430ff9369cf9b4f
2020-04-08 18:01:24 +08:00
Colin Cross
e0c5e44360 Revert "Revert "Use sdk variant of Soong modules when LOCAL_SDK_..."
Revert^2 "Add sdk mutator for native modules"

f8e80229fedb47302e9cfd32990859a6308020cf

Change-Id: Ib686b52339ae5031434a2fb6a0e7f5b0c0dc5641
2020-04-07 16:50:32 +00:00
Colin Cross
a7edce5629 Merge "Revert "Use sdk variant of Soong modules when LOCAL_SDK_VERSION ..."" am: 189a925c8b am: a6be60566f
Change-Id: I467b0b21da0b2078aadee6a09ada0a34f5cca1c8
2020-04-07 04:57:37 +00:00
Colin Cross
79e5a55122 Revert "Use sdk variant of Soong modules when LOCAL_SDK_VERSION ..."
Revert "Add sdk mutator for native modules"

Revert submission 1242911-sdk_version_variant

Reason for revert: b/153394225
Reverted Changes:
Ife99745fb:Use libnativewindow for platform variant of libagq...
I1bae84c43:Use libnativewindow for platform variant of androi...
I6e6021ed3:Use stl to depend on libc++
Ife99745fb:Use libnativewindow for platform variant of libRSS...
I2c9f439b9:Fix static dependency on libprotobuf-cpp-lite-ndk
Iff2aff9cf:Set sdk_version for cc_genrules used by modules wi...
I7d72934aa:Add sdk mutator for native modules
Ief378a007:Use sdk variant of Soong modules when LOCAL_SDK_VE...

Bug: 149591340
Change-Id: I6cd4de221ece29e48d58a8b1297dc2512b2dad13
Fixes: 153394225
2020-04-07 04:21:21 +00:00
Colin Cross
2932e686eb Merge "Use sdk variant of Soong modules when LOCAL_SDK_VERSION is set" am: a2af96b642 am: 4e5fddd0b5
Change-Id: I79b5451254c14dcff631e5dcf5c778c0b6738fcd
2020-04-07 02:35:39 +00:00
Jaewoong Jung
95445e6913 Add signing certificate lineage file support.
Also add multi-cert support to prebuilt apps so that they can benefit
from the new lineage feature.

(This is a cherry-pick change.)

Test: m GoogleServicesFramework w/ modified build rules
Test: m PrebuiltGmsCore w/ modified build rules
Test: apksigner lineage -v --print-certs -in <built_module_path>
Fixes: 152897457
Change-Id: If7d5d4bd308629c8340231520214c76c8a568a65
Merged-In: If7d5d4bd308629c8340231520214c76c8a568a65
2020-04-06 13:42:23 -07:00
Jaewoong Jung
d47e378af2 Add signing certificate lineage file support. am: e2348338e4
Change-Id: Id142f70b02ae46e734ff788e0cc5186138103df6
2020-04-06 20:01:02 +00:00
Jaewoong Jung
e2348338e4 Add signing certificate lineage file support.
Also add multi-cert support to prebuilt apps so that they can benefit
from the new lineage feature.

Test: m GoogleServicesFramework w/ modified build rules
Test: m PrebuiltGmsCore w/ modified build rules
Test: apksigner lineage -v --print-certs -in <built_module_path>
Fixes: 152897457
Change-Id: If7d5d4bd308629c8340231520214c76c8a568a65
2020-04-06 10:19:15 -07:00
Colin Cross
b934116994 Use sdk variant of Soong modules when LOCAL_SDK_VERSION is set
Soong now makes a variant of native modules that set sdk_version.
Use the new variant for native modules or apps with JNI that are
defined in Make and set LOCAL_SDK_VERSION.

Test: m checkbuild
Bug: 149591340
Change-Id: Ief378a007e43b0aea31fd5845410bbffec0ffae6
2020-03-24 10:48:24 -07:00
Jaewoong Jung
39f3811084 Merge "Fix test suite data files issue." am: c0d90ac9ac am: b742f058db
Change-Id: I16973462f2bd1b7eb1271289830808da45f36435
2020-03-20 18:34:48 +00:00
Jaewoong Jung
b5aa16d44f Fix test suite data files issue.
The current test suite rule implementation has a bug where test data
files are excluded from the final suite zip files when a suite doesn't
have a designated testcases output directory, which is represented by
COMPATIBILITY_TESTCASES_OUT_$(suite_name).

Specifically, the rule that collects test data files for each suite
filters out suite output paths that conflict with module output paths,
which happens when a suite doesn't have its own testcases output
directory. It seems to have been done this way just to avoid make rule
conflict errors, but it ended up causing missing test data files.

This change fixes it by adding an indexing purpose only test suit file
variable.

Fixes: 140761783
Test: m general-tests
Test: Compared before vs after, no meaningful differences.
Test: Changed bc-tests to a device test and built general-tests.
Test: Before - data files missing, after - data files present
Change-Id: I2008992f4144c6ee115f4b4e4ac9caa4312bbe34
2020-03-19 06:47:35 -07:00
Jiyong Park
79bf9640f4 system_server_current is accepted
Previously, has-system-sdk-version incorrectly returned true for
the sdk version 'system_server_current', just because it started with
system_. Since system_server_current is a totally different API surface
than system_*, make the macro to return false for system_server_*.

Bug: 146757305
Test: m
Test: add 'sdk_version: "system_server_current" to wifi-service-pre-jarjar
Change-Id: I43700545b0f120fa987696b8f03a4765d97e13e2
2020-03-07 18:34:57 +09:00
Ramy Medhat
c3427499ca Modify D8 template to not have inputs under the output directory.
Test: presubmit

Change-Id: I800664acdeffa04ce83a8446bece411f018af2e2
2020-02-13 07:19:53 -05:00
Ramy Medhat
a9cc25d785 Add RBE support for Javac, R8, and D8 if respective env vars are set.
Test: aosp_crosshatch build with and without the new variables.
Change-Id: I252ff5dd8e372edf8c86e25348c8a2bfab41d70d
2020-01-28 10:25:25 -05:00
Peter Collingbourne
b1d7545e1b Merge "Update make build system for dynamic unwinder." 2020-01-21 21:28:44 +00:00
Peter Collingbourne
86cdf9c2f4 Update make build system for dynamic unwinder.
Change the unwinder linking logic to match soong.

Bug: 144430859
Change-Id: I739980e479d14707b7a3afd6e9d2c817c9b43f81
2020-01-10 11:09:52 -08:00
Dan Willemsen
38dc09d39a Use our prebuilt M4 for flex and bison
And ensure we've got all the proper dependencies.

Bug: 117561006
Test: treehugger
Change-Id: Ia9690b2c0d73a48744c8e33fe83196d02b1e904d
2020-01-08 22:31:12 -08:00
Dan Willemsen
b195e7ab04 Use symlinks in the build graph for jni libs
Now that ninja uses lstat and can support installing arbitrary symlinks,
switch jni lib symlinks from LOCAL_POST_INSTALL_CMDS to real rules.

Bug: 128577186
Test: List of files under PRODUCT_OUT is the same before/after this change
Test: out/target/product/generic/.installable_files now includes the symlinks
Test: m installclean; m NfcNci -> symlinks installed with correct dest
Test: m NfcNci; m NfcNci -> ninja: no work to do
Change-Id: I078dca53ab3d93f74c36fa66d5577e6e3e0640d6
2020-01-06 10:25:56 -08:00
Dan Willemsen
dec6e8e056 Export list of "installable" files to soong_ui
These are a (partial) list of files that we'd install with a default
build. The idea is that if something is removed from this list, soong_ui
can remove it from the installed location before running ninja.

It's okay if there are things missing from this list, it's not intended
to be a 100% solution replacing installclean / CleanSpec.mk, just
something that handles 80% of the cases without user involvement.

In particular, if something is removed from PRODUCT_PACKAGES, we'll
remove it from disk, but not necessarily rebuild the image files. That's
the same as most use cases of CleanSpec.mk today, and often some other
change will trigger the necessary images to be rebuilt.

We should be able to fix that by changing all of the image creation
rules to depend on the (partial) list of files they care about, or by
fixing ninja to rebuild things when their list of dependencies change.
(Other tools run into this same problem)

The list of test files is also included so that we can remove obsolete
tests from their "installed" locations within test suites and the
testcases folders.

Test: remove a module from PRODUCT_PACKAGES, see the print and file removed
Test: change the name of a cts test, see the old one removed from cts
Change-Id: I67f270a6713369099ca523aaf991ee3beb815c0a
2020-01-03 19:19:11 -08:00
Colin Cross
9d789145fa Merge "Set pools manually for rules that can run in RBE or goma" 2019-11-15 18:19:33 +00:00
Tom Cherry
3c697d59fb Merge "Check property type in host_init_verifier" 2019-11-13 18:41:17 +00:00
Colin Cross
23dcf76a36 Set pools manually for rules that can run in RBE or goma
Use .KATI_NINJA_POOL := none to mark rules that can run in RBE or
goma when they are enabled, which along with passing
--default_pool=local_pool will allow moving remoteable jobs into
the remote pool without relying on hacks in kati.

Fixes: 143938974
Test: inspect pools in build-${TARGET-PRODUCT}.ninja for m USE_RBE=true
Test: inspect pools in build-${TARGET-PRODUCT}.ninja for m USE_GOMA=true
Change-Id: I08615ae1f2eaef9ff0ba253b8aa3d83ab57ebb27
2019-11-12 13:59:49 -08:00
Tom Cherry
2e92cfb701 Check property type in host_init_verifier
We have all of the 'type' information for properties available during
build time, so let's check this when setting properties in init.

Test: setprop apexd.status bad results in:
host_init_verifier: Command 'setprop apexd.status bad'
(out/soong/.intermediates/system/core/rootdir/init.rc/android_x86_core/init.rc:927)
failed: Property type check failed, value doesn't match expected type
'enum starting ready'
host_init_verifier: Failed to parse init script
'out/soong/.intermediates/system/core/rootdir/init.rc/android_x86_core/init.rc'
with 1 errors
Test: CF builds without that error

Change-Id: Ia1b24ab42e2193e3298021bc86ee2309ca7a381f
2019-11-08 17:58:31 -08:00
Colin Cross
665ebbe471 Fix turbine classpath arguments in Make
We were passing "--classpath foo.jar --classpath bar.jar" to turbine,
it now wants (and may always have expected?)
"--classpath foo.jar bar.jar".

This is equivalent to Ib7e0ca64a34e236110f7b785d6a0fb51ed75567e in
Soong.

Test: m java
Change-Id: I061ebf302a215c66b1923056716b60bf0160d9bc
2019-11-01 13:35:17 -07:00
Colin Cross
f0add55066 Use system modules for turbine in Make
turbine supports taking system modules on the command line,
now that we target Java language level 1.9 and use system modules
by default switch turbine to match javac.

This is equivalent to Ieee07502151da0d5693bb8929213d495c039106b
in Soong.

Test: m java
Change-Id: Ib91c6f57b316f48f1ab819e4e1d2dc2e0ee42988
2019-11-01 13:34:46 -07:00
Steven Moreland
bbdb6cbb69 host_init_verifier: no HIDL_INTERFACE_HIERARCHY
Since this is built into host_init_verifier now.

Bug: 141567104
Test: build w/ and w/o host_init_verifier throwing a related error
Change-Id: I75a8c373fcfb054a5074039211134761596600c3
2019-10-16 16:35:17 +00:00
Colin Cross
bf086436b0 Remove stray ZIPALIGN_PAGE_ALIGN_FLAGS
Iae26e4676c29c68fa3f76187512c82786bfa0522 removed the definition
of ZIPALIGN_PAGE_ALIGN_FLAGS in favor of always using the -p flag,
but left accidentaly left one usage.  Replace it with -p.

Bug: 141212627
Test: m checkbuild
Change-Id: Ica69d9195426f8f30039da211ed1a0ad5dffe8e8
2019-10-10 12:52:13 -07:00
Mitch Phillips
39ef563294 Move definition of dist-for-goals before call.
New changes to Soong allow for dist-for-goals to be directly invoked
through the Soong-side of the build system.

This presents a problem, as the dist-for-goals propagation for Soong
lands in make_vars-$(target).mk, which is called before dist-for-goals
is defined.

We move the dist-for-goals definition (through moving where distdir.mk
is included) to be before any possible use of the call to
dist-for-goals.

Test: m checkbuild
Change-Id: Icef27a4d2239948b07354c87b58c9985a66a53bd
2019-09-26 14:57:33 -07:00
Dan Shi
d9bef81f7c Merge "Create a vts-core suite harness package" 2019-09-20 18:06:19 +00:00
Dan Shi
796ff4ffb5 Create a vts-core suite harness package
vts-core.zip will include all vts-core tests and suite harness
(vts-core-tradefed).

Bug: 141012181
Test: m -j vts-core

Change-Id: Ib13a2bffb4dc9619d2732d65729ecb0246a0b9a0
2019-09-19 13:13:44 -07:00
Jaewoong Jung
9f2e68009d Merge "Revert "Build: Fix test data no present in test suite zip files."" 2019-09-17 14:00:45 +00:00
Jaewoong Jung
5ea6971a1d Revert "Build: Fix test data no present in test suite zip files."
This reverts commit 068d101077.

Reason for revert: Caused a regression

Test: Added data to a sh_test and compared before vs after
Fixes: 140761783
Change-Id: Ied6427cb2dc3093fb88632eb8f337c2b76e86b95
2019-09-13 19:06:30 +00:00
Colin Cross
d30a949547 Merge "Use more variables from Soong" 2019-09-09 17:21:44 +00:00
Elliott Hughes
fdef43d69c Merge "Switch to toybox stat on macOS too." 2019-09-05 21:02:06 +00:00
Elliott Hughes
2e51a1553f Switch to toybox stat on macOS too.
Bug: http://b/139450866
Test: builds
Change-Id: I1a992a63fbf5181a48262901730b8b67661cc259
2019-09-05 10:02:41 -07:00
Ramy Medhat
eef0efadb3 Merge "Add labels to rewrapper cc compile action. Prevent ccwrapper from being used in links."
am: f51a70b009

Change-Id: I08921d50243c3984a2edd518750465b58896b4d9
2019-08-13 10:48:10 -07:00
Ramy Medhat
e5839f912b Add labels to rewrapper cc compile action. Prevent ccwrapper from being
used in links.

Test: Built aosp-arm64_eng with and without USE_RBE=1

Change-Id: I8d04069219a9467c3de9a028eb68e3115173f1e2
2019-08-12 14:13:31 -04:00
Colin Cross
f272adb168 Use more variables from Soong
Remove more copies of variables that are computed by Soong.

Test: m checkbuild
Change-Id: If78d4650438cc91d00c691db2fc97c5b790d5648
2019-08-09 08:40:30 -07:00
Dan Willemsen
0c5a068d02 Merge "Remove import_includes/export_includes"
am: 6240872250

Change-Id: Idf487156730321d4172a057697ac3585497de13f
2019-08-05 10:44:05 -07:00
Dan Willemsen
18ffd5891e Remove import_includes/export_includes
Now that ONE_SHOT_MAKEFILE no longer exists, we don't have to rely on
the filesystem to store this informtion.

This removes ~16.7k files from our build graph
(aosp-master/aosp_arm64-eng), though only about 600 of them were being
used in a normal build.

Test: treehugger
Change-Id: I3ac12f5ea7f11d25064109a0599bc5be1976fba5
2019-08-01 14:56:45 -07:00
Dan Willemsen
6e41454ab0 Merge "Add missing aapt2 dep in appcompat-files"
am: f915d9d586

Change-Id: Ib006e27f634945fec6ae73f5e9682dbf43593990
2019-08-01 12:09:12 -07:00
Luca Stefani
a239c67ed3 Add missing aapt2 dep in appcompat-files
* When soong_app_prebuilt calls appcompat-header
  with appcompat enabled aapt2 was missing

Test: m SystemUI
Change-Id: I26bcb507f68902ff95a1045dfeb22dd8d4913a92
2019-08-01 16:29:06 +02:00
Tom Cherry
6cf1b11ead Generate /etc/{passwd,group} for all partitions
Bug: 73062966
Test: can load AIDs from partitions other than vendor
Test: bionic-unit-tests
Merged-In: Ia85abbeefe5a945369970f2aef42692e07ab8c09
Change-Id: Ia85abbeefe5a945369970f2aef42692e07ab8c09
(cherry picked from commit 8a54ec8482)
2019-07-23 17:07:11 +00:00
Tom Cherry
6722de1277 Merge "Generate /etc/{passwd,group} for all partitions" 2019-07-23 16:40:01 +00:00
Tom Cherry
fb303a5903 Generate /etc/{passwd,group} for all partitions
Bug: 73062966
Test: can load AIDs from partitions other than vendor
Test: bionic-unit-tests
Merged-In: Ia85abbeefe5a945369970f2aef42692e07ab8c09
Change-Id: Ia85abbeefe5a945369970f2aef42692e07ab8c09
2019-07-22 21:41:17 +00:00
Jeff Vander Stoep
c9de6f9de7 Renderscript: change extension .rs to .rscript
Reserve .rs extension for Rust.

Bug: 137365032
Test: make checkbuild
Test: cd frameworks/compile/slang/tests
    ./slang_tests.py
Test: atest CtsRenderscriptTestCases
Test: CtsRsCppTestCases

Exempt-From-Owner-Approval: Clean CP
Change-Id: Ibfccb4f52b74f9ac95c373f48d775254ba77288d
Merged-In: Ibfccb4f52b74f9ac95c373f48d775254ba77288d
(cherry picked from commit 480864f1b0)
(cherry picked from commit f9b4f4b3e4)
2019-07-18 04:00:45 +00:00
Jeffrey Vander Stoep
972695d81d Merge "Renderscript: change extension .rs to .rscript" 2019-07-18 02:02:00 +00:00
Jeff Vander Stoep
c44aa3be41 Renderscript: change extension .rs to .rscript
Reserve .rs extension for Rust.

Bug: 137365032
Test: make checkbuild
Test: cd frameworks/compile/slang/tests
    ./slang_tests.py
Test: atest CtsRenderscriptTestCases
Test: CtsRsCppTestCases

Change-Id: Ibfccb4f52b74f9ac95c373f48d775254ba77288d
Merged-In: Ibfccb4f52b74f9ac95c373f48d775254ba77288d
2019-07-17 18:57:49 +00:00
Daniel Norman
0d1b2ddaad Merge "Changes host_init_verifier to use hidl interface inheritance hierarchy."
am: 858fa08427

Change-Id: I4257caefab23a66d34f3160e922bff5e140e002d
2019-07-12 11:32:38 -07:00
Daniel Norman
858fa08427 Merge "Changes host_init_verifier to use hidl interface inheritance hierarchy." 2019-07-12 18:01:46 +00:00
Paul Duffin
533733d1e8 Merge "Remove direct dependency on art/tools/veridex/appcompat.sh"
am: 831197ee31

Change-Id: I581234249a75c3fa2eca56976a271e122c834582
2019-07-11 08:08:56 -07:00
Paul Duffin
c319fdb65a Remove direct dependency on art/tools/veridex/appcompat.sh
The dependency causes a build breakage when unbundling the runtime
module, i.e. when the art repository is not present in the local build
tree.

Bug: 134379140
Test: m droid
Change-Id: Ia3f9b60dbe3e9cf00ea13ae7bdc74bdd386b4362
2019-07-11 12:24:54 +01:00
Daniel Norman
bfdf765f97 Changes host_init_verifier to use hidl interface inheritance hierarchy.
Bug: 118016875
Test: Added 'interface' lines to an init_rc file and observed errors
when misspelled or missing entire inheritance hierarchy.
Change-Id: I71d515e0c12ed74800b9536f07da9fc7bb69597e
2019-07-09 20:18:49 +00:00
nelsonli
4cb85b5865 Merge "Build: Fix test data no present in test suite zip files."
am: 98b9c5dded

Change-Id: Ifd655c5d413e8db73d0220b454a28aacc5a5173a
2019-07-08 17:57:40 -07:00
nelsonli
068d101077 Build: Fix test data no present in test suite zip files.
my_installed_test_data (LOCAL_TEST_DATA) no present in test
 suite zip files for device tests

Bug: 135957483
Test: 1. Remove the patch aosp/1008195
      2. m general-tests
      3. unzip general-tests.zip
      4. data files should exist in target/testcases/toybox-tests

Change-Id: I3f0a4d87e284c809625843d55dc5d35ef77e79bb
2019-07-05 23:52:45 +08:00
TreeHugger Robot
218adad125 Merge "DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5699924) into stage-aosp-master" into stage-aosp-master 2019-07-02 07:40:58 +00:00
Tom Cherry
61ca76dc12 Merge "Switch host_init_verifier to getopt()" am: fdbd55d259
am: e7561bc59e

Change-Id: Idc5b4914b4b8e56deecda93a5fbadb629b301be6
2019-06-27 16:04:09 -07:00
Daniel Norman
ce664b0a37 Uses the KNOWN_HIDL_INTERFACES file in host_init_verifier.
This file is used to check that each interface in an init_rc file is a
known hidl_interface.

Test: Adding a misspelling to an init_rc's interface line and observing
build failure.
Bug: 77646540
Change-Id: I30c2dff29679b95085b5c76f6d68e4d794f965e9
2019-06-27 15:54:43 -07:00
Tom Cherry
f0bc919754 Switch host_init_verifier to getopt()
Test: build, including init script verification, works
Change-Id: Ia786cdf14eb9449ad2d5a6ac9b571c6be709f1e5
2019-06-27 09:21:53 -07:00
Colin Cross
670cc43966 Merge "Don't pass --legacy by default to aapt2 compile" am: 1aa3ff6fea
am: 9e0a0d7a2a

Change-Id: I45db8a6ff924cf691071bb8c6de067bc3b791655
2019-06-26 11:35:47 -07:00
Colin Cross
fd5fa34775 Don't pass --legacy by default to aapt2 compile
Don't pass --legacy by default, it is rarely necessary and converts
some errors into warnings that crash at runtime.  The modules that
need it have had --legacy added to LOCAL_AAPT_FLAGS.

Bug: 135597368
Test: m java
Change-Id: I0cb213599d6612746d988b8966cbd529b5328db0
2019-06-22 13:04:51 -07:00
Dan Willemsen
6b61e81a6e Merge changes I2183ac9f,I2c76701c,Ibbe4e11a,I0706faa2,Ic5b7c4fb, ... am: 491ae5b2d1
am: fea54c0231

Change-Id: Ib485a13372709505f98643e6f69947d4c8f75a2f
2019-06-13 10:38:47 -07:00
Treehugger Robot
491ae5b2d1 Merge changes I2183ac9f,I2c76701c,Ibbe4e11a,I0706faa2,Ic5b7c4fb, ...
* changes:
  Fix dependency on BOARD_AVB_SYSTEM_KEY_PATH
  Fix some java library dependencies
  Depend on NDK libraries
  Call clean-path in more places
  Add missing dependecy on SOONG_ZIP
  Add dependencies on the toolchain (clang, etc)
2019-06-13 17:13:22 +00:00
Dan Willemsen
bbe4e11a76 Call clean-path in more places
When an Android.mk specifies a local path that is outside the current
directory, it uses '..', since we prepend $(LOCAL_PATH)/ to the given
path.

This path ('a/b/../c') gets inserted into command lines and
dependencies. For dependencies, when it gets to Ninja, Ninja calls
CanonicalizePath and removes those references ('a/c'), but the command
line is preserved.

So we've got a command line that references 'a/b', but no dependency on
it. Usually that's not a big problem, but it's an issue if we're trying
to only expose dependencies to the rule, like with RBE only sending the
dependencies to the remote workers. So use our 'clean-path' macro to
collapse the '..' references in Kati so that they don't show up in the
command line either.

Test: treehugger
Test: build a system image with RBE
Change-Id: I0706faa2ac15e9c12c720f43c7bb8171c5efd97c
2019-06-12 21:35:33 +00:00
Dan Willemsen
c5b7c4fbef Add dependencies on the toolchain (clang, etc)
Historically, we've relied on the path to the clang compiler changing in
order to trigger rebuilds instead of direct dependencies on the compiler
itself. That's somewhat more reliable, since the actual $(CLANG) file is
often a script that doesn't actually change during every update.

In Soong, we've added the dependency anyway, so do it here as well. This
makes it easier for my RBE experiments to identify when we intend to use
clang and to send the entire compiler.

Test: treehugger
Test: build a system image with RBE, find that every command that needed
the compiler gets it.
Change-Id: I3838b5d77884394a8c0f7a1ba133142102602084
2019-06-12 21:34:52 +00:00
Oliver Nguyen
6f69d2164b Merge "Package coverage files as a zip." am: 6aef14d0e9
am: dcb71cf2bb

Change-Id: I7437fe7d5ff8f2b90f110f8e6e0787ed1c900a61
2019-06-11 19:27:56 -07:00
Treehugger Robot
6aef14d0e9 Merge "Package coverage files as a zip." 2019-06-12 02:00:01 +00:00
Dan Willemsen
fa9252d3f7 Merge "Convert java proto generation to use srcjars" am: 68c39b5d06
am: a5ce550534

Change-Id: I95e036ffd49c20914b6aeedb5f2e5f58b482557e
2019-06-10 20:06:34 -07:00
Dan Willemsen
84c6c1cfe4 Convert java proto generation to use srcjars
So that we actually represent all files in the build graph.

Test: treehugger
Change-Id: I48e32437fcfd8c0de8cbc87d07934393db557aa4
2019-06-10 16:31:07 -07:00
Oliver Nguyen
e91ab2397f Package coverage files as a zip.
Test: make NATIVE_COVERAGE=true COVERAGE_PATHS="*"
Change-Id: I7ee9253ef47a502a9d29f7e15a4402cbb90e34ae
2019-06-10 15:27:31 -07:00
Jaewoong Jung
d406f4af6e Merge "Deprecate inherit-package." am: cd56c0df95
am: aec3dad7f4

Change-Id: I5581d543f1cbc2c9ded7f9a6b5a5b3d4f92efa76
2019-05-29 13:25:01 -07:00
Jaewoong Jung
cd56c0df95 Merge "Deprecate inherit-package." 2019-05-29 19:48:46 +00:00
Dan Willemsen
25b25360f0 Merge changes Id8365ce4,I952515c2 am: c85f6d56f5
am: bcdd57abde

Change-Id: I150a18742e8e0016c961ae1c55a0812bdb3ecbf7
2019-05-29 10:31:32 -07:00
Jaewoong Jung
1800c7abf5 Deprecate inherit-package.
Fixes: 122957760
Test: TreeHugger
Change-Id: I799f79092ff62808f59bba2bfcfe36d4417c034f
2019-05-29 09:17:09 -07:00
Dan Willemsen
288bedfc8f Convert more uses of $(ACP) to cp
Test: treehugger
Change-Id: Id8365ce4c06dfe731be9b80f805e071fab522909
2019-05-28 15:36:47 -07:00
Dan Willemsen
18c1e61faf Remove more tab characters from commands
This makes my parsing of commands simpler when I only need to deal with
space characters instead of tabs (which aren't special in these
locations within makefiles).

Test: treehugger
Test: git show -w (only whitespace diffs)
Change-Id: I952515c26ca5265d71994fa3b1fa895c5346e92d
2019-05-28 15:12:34 -07:00
Colin Cross
d2a6f86dbb Merge "Remove reverse-list from java static libraries." am: 7c485728cf
am: e16405d5ec

Change-Id: If05c7b7d1e1c81ef94c9772c170229a8b3ba4712
2019-05-03 15:24:51 -07:00
Colin Cross
91f53fddc7 Remove reverse-list from java static libraries.
Make was reversing the list of static library dependencies when passing
it to merge_zips.  This was originally done to match the behavior of
unzipping each static library in order into the same directory,
overwriting duplicates each time.  This order is counter-intuitive,
and Soong does it the sensible way (first one takes priority, the same
as the compile classpath).  Fix Make to match Soong.

Bug: 131603999
Test: m checkbuild
Test: compare target_files.zip
Change-Id: Idad125068ed2f750dc2dd95ab82bacb6e074489d
2019-04-29 10:31:02 -07:00
Colin Cross
6aa30a37c6 Merge "Clean up LOCAL_DONT_DELETE_JAR_META_INF" am: ff14c47182
am: 9d957a3b22

Change-Id: I8bb05c17fcc198cf9453a721a2e8f330fff84c95
2019-04-24 08:25:36 -07:00
Colin Cross
aebe1e9fe9 Clean up LOCAL_DONT_DELETE_JAR_META_INF
Allow setting it for host modules, it is necessary for
RoboLectric.

Remove some unused PRIVATE_DONT_DELETE_JAR_META_INF variables.

Remove unzip-jar-files, it is obsolete since merge_zips was
introduced.

Test: m checkbuild
Change-Id: I3f2fc466321904eace31525cbac99ad524f39188
2019-04-23 13:05:11 -07:00
Colin Cross
e6210f6eb2 Remove AAPT1 support
AAPT2 is used everywhere now, remove support for AAPT1.  Also
removes dpi_specific_apk.mk, it was never updated to use AAPT2
and has been generating bad APKs (resource ID mismatch between
the dex files and the resources) since AAPT2 was made the default
in May 2018 (I9b67fd2a9b3234798b2aac879b5242c2097b3863).

Bug: 80450981
Test: m checkbuild
Change-Id: I2ff768897360ff866dbae5562455bab22be270f7
Merged-In: I2ff768897360ff866dbae5562455bab22be270f7
2019-04-17 16:50:30 -07:00
Colin Cross
0a40c727ed Remove AAPT1 support
AAPT2 is used everywhere now, remove support for AAPT1.  Also
removes dpi_specific_apk.mk, it was never updated to use AAPT2
and has been generating bad APKs (resource ID mismatch between
the dex files and the resources) since AAPT2 was made the default
in May 2018 (I9b67fd2a9b3234798b2aac879b5242c2097b3863).

Bug: 80450981
Test: m checkbuild
Change-Id: I2ff768897360ff866dbae5562455bab22be270f7
2019-04-17 12:53:08 -07:00
Dan Willemsen
6a2614e79b Merge "Split ALL_MODULES.*.REQUIRED and friends between target/host" am: 20f6491dc6
am: 12fdd872c4

Change-Id: Ib2d65f8bad9b22e9ddc8b218d5e786078be3d09d
2019-04-10 20:56:42 -07:00
Dan Willemsen
8e96a794ac Split ALL_MODULES.*.REQUIRED and friends between target/host
So that we actually respect different LOCAL_REQUIRED_MODULES for the
host and device versions instead of unioning them. That got particularly
problematic when LOCAL_SHARED_LIBRARIES is implicitly added to
LOCAL_REQUIRED_MODULES. We also used to walk through device-only modules
when filling out the list of required modules, which triggered even more
extra installations.

This also changes the requirements for PRODUCT_HOST_PACKAGES so that it
no longer accepts target-only phony modules (since we can now
differentiate them). They were all removed in previous patches.

Test: treehugger; diff resulting builds
Test: diff list of product_target_FILES and product_host_FILES
Change-Id: I2ed8950320d31f5693323ad8cef6ec5b6780b7d4
2019-04-10 13:22:23 -07:00
George Burgess IV
8999b6fd83 Merge "Remove our clang-tidy wrapper" am: 6afe016825
am: 40ecaea185

Change-Id: I0280a7365874e061cfb74407504c863f881db7d3
2019-04-05 18:27:22 -07:00
Treehugger Robot
6afe016825 Merge "Remove our clang-tidy wrapper" 2019-04-05 21:58:36 +00:00
George Burgess IV
09e5d9b2ba Remove our clang-tidy wrapper
Looks like the reason for it existing has been fixed. It should probably
just be removed.

Bug: None
Test: WITH_TIDY=1 m
Change-Id: Ic001393da7211cd6ef2bbd5af6ef13c7fe8e00e7
2019-04-04 16:21:53 -07:00
Anton Hansson
db064f1f1a Merge "Put DEVICE/PRODUCT overlays in different partitions" am: 94fa0e75cb am: fd946975d0
am: 691c979b62

Change-Id: I1e9c9b79b931229ed3142d1921d784a6bad7baed
2019-03-25 02:46:53 -07:00
Anton Hansson
cb8276fa93 Put DEVICE/PRODUCT overlays in different partitions
This change changes auto-generated RROs from DEVICE_PACKAGE_OVERLAYS
to be generated in the vendor partition, as opposed to /product where
they were generated in the past.

Note that PRODUCT_PACKAGE_OVERLAYS continue generating RRO packages
to /product, which means that a single app can be overlayed from
different partitions. These RROs have been given module and package
names based on their location.

Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: I5cee70e28e3969e67b2d83eaf25d9c6e3a11102d
2019-03-22 13:25:20 +00:00
Vic Yang
5c38a6234d Merge changes from topic "vndk-no-vendor-variant" am: 30dda1da5e am: 38f68f7a2a
am: 1485ea8707

Change-Id: Ia7eaea708743f9f42f6fe605cb0edba7db36db4d
2019-03-20 21:58:12 -07:00
Vic Yang
a2872a3578 Add module-target-built-files function am: 1b83413b5a am: 00e6eb93c9
am: 9b235bbcd5

Change-Id: Ib4f82e58c3c1f74e196b53854bb5ceb3bb6b3dab
2019-03-20 21:57:17 -07:00
Vic Yang
51512c558c Add support for no-vendor-variant VNDK
When TARGET_VNDK_USE_CORE_VARIANT is set to true, the vendor variant of
VNDK libraries are by default not installed.  Instead, the core variant
will be used by vendor binaries at runtime.

To ensure the core variant of VNDK libraries are installed, we also add
a flag LOCAL_VNDK_DEPEND_ON_CORE_VARIANT to indicate that the vendor
variant module depends on the core variant module.  This flag should be
set by Soong for all VNDK libraries without the vendor variant
installed.  When the flag is set, the vendor variant binary is also
compared against the core variant binary to ensure they are
functionally identical.

As we are merging the two variants for some libraries, we need a new
link type to denote a module is usable as both native:vndk and
native:platform.  We add native:platform_vndk for this.

Bug: 119423884
Test: With the corresponding Soong change, build with
      TARGET_VNDK_USE_CORE_VARIANT set to true.
Test: Add a dummy VNDK library and a dummy vendor binary that depends
      on it.  Build with no-vendor-variant VNDK and check the core
      variant is installed.
Test: Add conditional compilation based on __ANDROID_VNDK__ in the
      dummy VNDK library and check build fails.

Change-Id: I40000f2728e8193212113c1ee950e9d697f2d40d
2019-03-20 10:23:04 -07:00
Vic Yang
1b83413b5a Add module-target-built-files function
This is similar to module-built-files, except that it only returns
files built for the target, not the host.

Bug: 119423884
Test: Build with the no-vendor-variant VNDK change that uses this
      function.

Change-Id: I2a3d99003b05999eae01c0b90bb62b5263d65592
2019-03-20 10:22:21 -07:00
Anton Hansson
0a766e9afa Merge "Refactor generate_enforce_rro" am: bec4aa868a am: f5c74dd470
am: 5784c16fc4

Change-Id: I3d12f8a0f50429e8f54631bedec7e6caf667fb61
2019-03-20 09:23:38 -07:00
Anton Hansson
bec4aa868a Merge "Refactor generate_enforce_rro" 2019-03-20 15:18:19 +00:00
Anton Hansson
08231e1786 Refactor generate_enforce_rro
A few tweaks to make it easier to extend to generating RROs in
multiple partitions:
- deduce the module name inside generate_enforce_rro
- dedup rule definition
- tweak framework-res check to use source module name instead

Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: I2f0d6270b21f5427c372c04a5c6e7fb712e72a9a
2019-03-18 14:21:09 +00:00
Nelson Li
ed516e293d Merge "Revert "Revert "Build System: Solve dependency problem for test""" am: 795721ac2a am: 3c4c86943c
am: fd71578493

Change-Id: I369b55cbd93ff3dd679fdbc67cb05c712ca3ed5f
2019-03-13 21:43:13 -07:00
Nelson Li
1f8357fe7d Revert "Revert "Build System: Solve dependency problem for test""
This reverts commit 6fe7f194b9.

Reason for revert: Fixed all build break.

Change-Id: I0a4842df1225399752515a4cd7a7c14173a5bf7b
2019-03-14 01:05:36 +00:00
Nelson Li
f5a4af9e91 Merge "Revert "Build System: Solve dependency problem for test"" am: 8924400a8a am: abc1617463
am: 87a4a179e1

Change-Id: I9e4095865afd148d7e7aec163d0430dd2e497d3d
2019-03-11 15:32:57 -07:00
Nelson Li
6fe7f194b9 Revert "Build System: Solve dependency problem for test"
This reverts commit 224e103308.

Reason for revert: Build Breakage in git_pi-dev-plus-aosp/docs @5366136
make -j110 docs showcommands dist DIST_DIR=/buildbot/dist_dirs/git_pi-dev-plus-aosp-linux-docs/5366136 checkbuild
FAILED:
 Dependencies in out found with no rule to create them:
 out/target/product/generic/data/app/CtsVerifierTester/CtsVerifierTester.apk
 out/target/product/generic/data/app/TradeFedTestApp/TradeFedTestApp.apk
 out/target/product/generic/data/app/TradeFedUiTestApp/TradeFedUiTestApp.apk
 15:53:46 stopping
and
make -j50 showcommands dist TARGET_PRODUCT=cf_x86_phone DIST_DIR=/buildbot/dist_dirs/git_master-linux-ndk_translation_all/5366149 ndk_translation_all
FAILED: ninja: 'out/target/product/vsoc_x86/data/nativetest/arm/arm_insn_tests_arm_static/arm_insn_tests_arm_static', needed by 'out/target/product/vsoc_x86/obj/PACKAGING/ndk_translation_tests_intermediates/arm_insn_tests_arm_static_result.xml', missing and no known rule to make it
15:55:38 ninja failed with: exit status 1
make: *** [run_soong_ui] Error 1
Return Code: 2

Change-Id: Idf95ef2e06526a0a31690420c923207db627605f
2019-03-11 16:48:29 +00:00
nelsonli
6e17758737 Merge "Build System: Solve dependency problem for test" am: 15e76e3848 am: 740ac49c83
am: 6e62c0bdaa

Change-Id: Ic1786c6b153ab105400aa1e2c78101fa288ee913
2019-03-11 08:34:40 -07:00
nelsonli
224e103308 Build System: Solve dependency problem for test
1. A test can add a runtime dependent test module by just setting
   LOCAL_REQUIRED_MODULES or LOCAL_TARGET_REQUIRED_MODULES. Then the dependent test
   module will be copied to testcase folder.
2. Do not install to $(TARGET_OUT_DATA) for testcase

BUG: 117224272

Test: 1. (a) vi cts/tests/tests/text/Android.mk
         (b) add LOCAL_REQUIRED_MODULES := CtsPrintTestCases
         (c) m -j CtsTextTestCases
         (d) Then, CtsPrintTestCases should also be built to testcase folder like below.
             ./target/product/generic_arm64/testcases/CtsPrintTestCases

Change-Id: I24ea3783486c54a05cfa9d3d0375b977afc230f8
2019-03-07 14:08:35 +08:00
Nicolas Geoffray
e7379ba071 Merge "Pass the --api-flags to appcompat explicitly." am: 53cfd9275b am: 40ccefa404
am: 05cee18432

Change-Id: I89ab19518261acaf22565fc608611231288b7a70
2019-03-04 06:31:55 -08:00
Nicolas Geoffray
53cfd9275b Merge "Pass the --api-flags to appcompat explicitly." 2019-03-04 14:14:39 +00:00
Colin Cross
62fc068b69 Merge "Use flags from Soong for d8 and r8" am: 5852c93585 am: fb770b4f84
am: ecc4607403

Change-Id: I863876bb8139fd8c5aceb97f4fde51f2df3697ff
2019-03-01 07:51:15 -08:00
Nicolas Geoffray
ac1f90c39c Pass the --api-flags to appcompat explicitly.
Bug: 125794065
Test: m && appcompat logs contain data
Change-Id: Idef875138d6670efc9ed7b9c63f653229b173d3e
2019-02-28 13:51:14 +00:00
Colin Cross
17ea341950 Use flags from Soong for d8 and r8
Use the flags provided by Soong when running d8 and r8.

Bug: 119270658
Test: m checkbuild
Change-Id: I9459ded386effc27c4c96f1e94f9ea2f8ed19319
2019-02-21 15:04:37 -08:00
Colin Cross
44bc5d6323 Merge "Make copy-many-files take an optional destination directory" am: ceaf716a3d am: e95dc4e3cc
am: da37ee584c

Change-Id: I5b81e3c051dfc15e2bf027be1857d5cf0553ac59
2019-02-13 17:02:19 -08:00
Colin Cross
dc53f450af Make copy-many-files take an optional destination directory
Test: m checkbuild
Change-Id: I777952d27bd1a0cf2608e080a0f46e39268784ce
2019-02-13 08:03:25 -08:00
Colin Cross
e8903ad55c Merge "Make manifest and APK agree on uncompressed native libs" am: 010df4b471 am: b568c2e15d
am: 2197223be0

Change-Id: Iafc06c2cfb9ccdcb3d6774863c1a146977277ded
2019-02-08 18:55:22 -08:00
Colin Cross
ead7b66590 Make manifest and APK agree on uncompressed native libs
Only put uncompressed native libs in an APK if the min_sdk_version
supports it (>= 23, Marshmallow), and set
android:extractNativeLibs="false" in the AndroidManifest.xml so
that the platform won't extract them anyways.

Bug: 117618214
Test: m checkbuild
Change-Id: Iae26e4676c29c68fa3f76187512c82786bfa0522
2019-02-07 21:44:12 -08:00
Colin Cross
58ba970763 Merge "Consolidate sdk version handling" am: 2b526bf7f3 am: 5e2b2c666d
am: 1403c05cc8

Change-Id: I0cb43b0b62692faf23e6ad9ed23a2f4a4ead4936
2019-02-07 18:55:15 -08:00
Colin Cross
a27f42aa5d Consolidate sdk version handling
Share the logic that converts LOCAL_SDK_VERSION, LOCAL_MIN_SDK_VERSION
and the global config values into minSdkVersion, targetSdkVersion,
and compileSdkVersion.

Test: m checkbuild
Change-Id: Id038673662b23cffc9e57978ac55a3f35ef8237a
2019-02-07 08:55:48 -08:00
Colin Cross
c15321795a Merge "Move hiddenapi singleton rules to Soong" am: 6d1ae7a015 am: 4d2fbfd232
am: 38513055b3

Change-Id: Ib094f9f615c914750629bc45bcbdb0102182f6ef
2019-02-07 00:09:18 -08:00
Colin Cross
485c9cd400 Move hiddenapi singleton rules to Soong
Hiddenapi rules are now in build/soong/java/hiddenapi_singleton.go.
This effectively requires any module in PRODUCT_BOOT_JARS to be
defined in Soong.

Bug: 123645297
Test: m checkbuild
Change-Id: If72bd1c20b2014d0a3d400624d37fdb0a3052245
2019-02-05 21:38:55 -08:00
Adrian Roos
b5724ecfbf Merge "Remove dependencies on hiddenapi files with UNSAFE_DISABLE_HIDDENAPI_FLAGS=true" am: 61ae763ec4 am: 840b7b3df2
am: 3c1e101f6d

Change-Id: Iea80bf83b6b051b608c13d27e6f13fed33f50fec
2019-01-31 12:06:10 -08:00
Treehugger Robot
61ae763ec4 Merge "Remove dependencies on hiddenapi files with UNSAFE_DISABLE_HIDDENAPI_FLAGS=true" 2019-01-31 19:25:59 +00:00
Joe Onorato
4abc14b9ed Merge "When using inherit-package for a test, also allow specifying a new test suite." am: c51c523b88 am: ac00ab680e
am: f1847c0a18

Change-Id: Ibac629980c5794b00f0c2e31b9c4c27aef132e55
2019-01-25 17:20:45 -08:00
Adrian Roos
21028b7ad6 Remove dependencies on hiddenapi files with UNSAFE_DISABLE_HIDDENAPI_FLAGS=true
Fixes: 122957987
Test: UNSAFE_DISABLE_HIDDENAPI_FLAGS=true make droid
Change-Id: Iafef8cc69971fd10718882326fbba99a6223d0f8
2019-01-25 17:35:25 +01:00
Joe Onorato
62472b676a When using inherit-package for a test, also allow specifying a new test suite.
Test: make
Change-Id: I2c9b5d998e6cc3159e4d23d7547bfd0b865f714c
2019-01-23 14:50:07 -08:00
David Brazdil
85b0346b7a Replace hiddenapi-{public,private}-list.txt with a CSV file am: fc274bab4d am: a1a433b368
am: 0e4ce6c0e1

Change-Id: Ib8c051aa4c41b83a1530a964c2ed54af3283611a
2019-01-21 12:08:22 -08:00
David Brazdil
fc274bab4d Replace hiddenapi-{public,private}-list.txt with a CSV file
`hiddenapi` is being refactored to work with a single CSV file as
opposued to a multitude of text files (one per flag). This patch
changes the singleton rule for listing public/private APIs from
stubs to expect a CSV as an output.

Bug: 119068555
Test: compiles, hiddenapi-flags.csv unchanged
Change-Id: If56c7ab8a4c3bbd33e447ef0dfd33f2c303a937c
2019-01-19 15:57:35 +00:00
Colin Cross
748e839bdf Merge changes from topics "hiddenapi-soong", "hostdex_install" am: d61a1aba36 am: 9cfe03b9d5
am: b1e0d646e6

Change-Id: Ib2b539012d410a54489e2845c2d7707c1fec42e7
2019-01-17 15:54:28 -08:00
Colin Cross
49adea3bd8 Move hiddenapi to Soong
Perform hiddenapi CSV generation and dex encoding for Soong modules
in Soong.  This fixes an issue where dexpreopting was happening on
a different jar than was being installed.

Bug: 122856783
Test: m checkbuild
Change-Id: I24a235c63ff62fed7e1af9f2fd17e55b0c1598a5
2019-01-17 10:23:10 -08:00
Jeongik Cha
0a87686514 Merge "Dump and enforce certificate for apks" am: bdf0ec03b6 am: 237303f1e2
am: b10dfc9222

Change-Id: I8836193364ea0b21ed0af6beac75250fca192496
2019-01-10 20:50:00 -08:00
Jeongik Cha
bdf0ec03b6 Merge "Dump and enforce certificate for apks" 2019-01-11 04:31:02 +00:00
Dan Willemsen
19fd4d0842 Merge "Stop trying to read depfile from vtsc" am: 82f2cb078f am: d372e54742
am: afbfff0d2d

Change-Id: I4f336a2f8b6d3fce8b1529a0e50a82d15b12d008
2019-01-10 10:12:19 -08:00
Jeongik Cha
b2c4bb7e3d Dump and enforce certificate for apks
Dump the list of APKs that aren't located at system partition and signed
with system certificate.
And when enforcement option is enabled, it makes build error if there is
the apk that satisfies the condition above.

Bug: 74699609

Test: m -j
Test: m out/target/product/$(get_build_var TARGET_DEVICE)/certificate_violation_modules.txt

Change-Id: I23c41f2665dd97abac3e77d1c82d81ff91b894eb
2019-01-10 11:37:22 +09:00
Dan Willemsen
5125746561 Stop trying to read depfile from vtsc
vtsc just ignores the -d argument and apparently can't write a depfile.
So for now, just stop assuming it produces one.

Bug: 121058584
Bug: 120496070
Test: NINJA_ARGS="-w missingdepfile=err" m libvts_interfacespecification
Change-Id: Ie1483fbeead9f710d8a6636df07ce44bbc4a6e2d
2019-01-09 16:40:58 -08:00
Mathew Inwood
0fa280036b Fix hiddenapi-greylist.csv generation.
It was referring to a non-existant macro paramater resulting in empty
output.

Test: m out/target/common/obj/PACKAGING/hiddenapi-greylist.csv
& then check output.

(cherry picked from commit 8626c8ea95)

Change-Id: Ib48042ecca320c4d7c3a27959e41e5c55099b27a
Merged-In: Ib48042ecca320c4d7c3a27959e41e5c55099b27a
2019-01-07 14:59:51 +00:00
Tor Norbye
58027e26aa Merge "Switch apicheck over from doclava to metalava" am: 5ca77c512c am: 52c520096b
am: 30905d6ef7

Change-Id: I4e3187cf8980ada64e7b65eb34a14b8fa2abd675
2019-01-06 08:34:26 -08:00
Tor Norbye
cb58fa13df Switch apicheck over from doclava to metalava
Apicheck seems to only be used for signature file
conversion and diffing at this point.

Test: make dist
Not Yet Merged In Ib8c09ba7f85fbb48526132ca8cc85856d63ca407
Change-Id: I5ca70a019ef4f7828f0a566f7745fc2dbf673b2e
2019-01-01 13:18:04 -08:00
Dario Freni
91bfcc3d3c Merge "Log only errors when invoking veridex." am: 17e9a79fb0 am: a56b6fb49a
am: 3f95d38e05

Change-Id: I3d9bbb01bed418951e2ff7d28f7e58561df0a6a0
2018-12-19 16:25:27 -08:00
Dario Freni
ee835c736b Log only errors when invoking veridex.
Test: m
Bug: 121225084
Change-Id: I7e8cfbb7b0bcdb3f8d941086ce920da38d558145
2018-12-19 18:24:53 +00:00
Mathew Inwood
8626c8ea95 Fix hiddenapi-greylist.csv generation.
It was referring to a non-existant macro paramater resulting in empty
output.

Test: m out/target/common/obj/PACKAGING/hiddenapi-greylist.csv
& then check output.

Change-Id: Ib48042ecca320c4d7c3a27959e41e5c55099b27a
2018-12-05 17:51:37 +00:00
Jaewoong Jung
594e6b0d0e Merge "Use debug mode when running R8 for eng builds." am: 58b7f7480f am: 2623318e10
am: 64f54d3991

Change-Id: Iaf3b88bfa92ac42e7a22e88b31cf64e3b61b015f
2018-12-03 07:58:47 -08:00
David Brazdil
451f79b072 Merge "Replace hidden API lists with a single CSV" am: 8d8d4584f8 am: 3ca0bb066f
am: 26a968f409

Change-Id: I8bb7be6147e826ddbe5c6fe52e04361bbba87a02
2018-12-03 06:34:25 -08:00
Jaewoong Jung
58b7f7480f Merge "Use debug mode when running R8 for eng builds." 2018-11-30 22:40:45 +00:00
David Brazdil
59b6fd541d Replace hidden API lists with a single CSV
Combine existing hiddenapi-* txt files into a single CSV containing
a list of all class members and their corresponding flags.

Test: m, phone boots
Change-Id: I67f1b5f331b262e9b681d9a3c78c9e4cbb5ea082
2018-11-29 15:48:56 +00:00
Jaewoong Jung
b3113da542 Use debug mode when running R8 for eng builds.
Bug: 119601874
Test: Built for different variants.
Change-Id: Icaf300c944b1d0594f524a11999cc5a8229919eb
2018-11-28 15:19:46 -08:00
Yi Kong
f41d24acb3 Merge changes I52805f5d,Ifb16ed87
* changes:
  Allow projects to exclude from libcrt_builtins
  Move libgcc to libcrt.builtins
2018-11-13 21:56:47 +00:00
Anton Hansson
c3229f62c7 Merge "Quote message in echo-error/echo-warning macros" am: 1cdbf8f2bd am: 224210eaba
am: a1cd25650a

Change-Id: I23f135b024feb381e1a62cd696482dd2331b1ac6
2018-11-09 10:19:39 -08:00
Anton Hansson
1cdbf8f2bd Merge "Quote message in echo-error/echo-warning macros" 2018-11-09 17:59:59 +00:00
Anton Hansson
700db42d54 Quote message in echo-error/echo-warning macros
Makes pretty-error and pretty-warning behave more like $(error) and
$(warning), where you don't need to do things like quote parentheses.

Bug: 118833208
Test: trigger the private_apis && sdk set error in sdk_check.mk,
      which no longer produces bash syntax errors

Change-Id: I766ff98ad4e652f59dbef9dd5654f1cd10a2d038
2018-11-09 08:59:25 +00:00
Yi Kong
95fd9d171d Move libgcc to libcrt.builtins
libgcc is kept behind libcrt.builtins to provide unwinder symbols and
any other missing symbols.

Bug: 29275768
Bug: 119007754
Test: m checkbuild
Change-Id: Ifb16ed87afc3391f8830d771971315515f929235
Merged-In: Ifb16ed87afc3391f8830d771971315515f929235
(cherry picked from commit b9d8932279)
2018-11-08 13:40:34 -08:00
Yi Kong
b9d8932279 Move libgcc to libcrt.builtins
libgcc is kept behind libcrt.builtins to provide unwinder symbols and
any other missing symbols.

Bug: 29275768
Bug: 119007754
Test: m checkbuild
Change-Id: Ifb16ed87afc3391f8830d771971315515f929235
2018-11-06 13:04:37 -08:00
Dan Shi
3e7b6d1c69 Merge "Copy shared libraries used by tests to testcases directory" am: 8b86ca8827 am: 0f4e535493
am: 550340760c

Change-Id: If1eaf53fca029de23eef2e43bb70dd7386735ff2
2018-11-05 13:39:26 -08:00
Dan Shi
6fe5bf0adb Copy shared libraries used by tests to testcases directory
This change collects the shared libraries files used by tests in
suite, and deploy the files to testcases/lib*. The shared libraries then
can be zipped in general-tests.zip and device-tests.zip. And the host
test can be run in TradeFed host based on build artifacts.

Bug: 111486845
Test: m -j general-tests; m -j device-tests
Confirm the test can run in testcases directory:
out/host/linux-x86/testcases$ ./net_test_avrcp/x86_64/net_test_avrcp
unzip general-tests.zip, confirm net_test_avrcp can run.

Change-Id: I4f9322118aa4891226ea318cbd1bcee6ca48b050
2018-11-04 19:51:59 -08:00
David Brazdil
6df1b0983c Merge "Revert^4: Change command-line flags of hiddenapi" am: 4438e0bb8e am: 88e7af76fa
am: fda97d6aa6

Change-Id: Ife4a18a9397f427459007827ebbeb72aa56be46d
2018-10-30 03:27:10 -07:00
David Brazdil
4438e0bb8e Merge "Revert^4: Change command-line flags of hiddenapi" 2018-10-30 10:02:20 +00:00
David Brazdil
9007e530aa Revert^4: Change command-line flags of hiddenapi
The `hiddenapi` build tool now reads a dex file from one filename
and writes a modified dex file to another. Change the build rule
to reflect it.

This reverts commit d8c427fbba.

Change-Id: Ic9a4188a65f7a6fb28edae1aeda7422e93800c58
Test: m
2018-10-27 21:46:19 +00:00
Paul Hobbs
06cc313c0f Merge "Revert "Revert^2: Change command-line flags of hiddenapi"" am: 27ec8b868e am: 741724f25e
am: a006361b50

Change-Id: Ie8abc2ba7a47cc743e753373c8a939c68dfae69f
2018-10-26 10:46:46 -07:00
Paul Hobbs
27ec8b868e Merge "Revert "Revert^2: Change command-line flags of hiddenapi"" 2018-10-26 17:22:35 +00:00
Luman Qu
d8c427fbba Revert "Revert^2: Change command-line flags of hiddenapi"
This reverts commit e9540386e2.

Reason for revert: Caught by droidcop https://b.corp.google.com/issues/118481351

Change-Id: I66e45ef5a84d63682e5c33c9aa1e708160606611
2018-10-26 16:53:09 +00:00
David Brazdil
3ed7d14189 Merge "Revert^2: Change command-line flags of hiddenapi" am: 6d0b0f6103 am: cdac626a1d
am: 0f33abc3e7

Change-Id: Ifc8fcbc13fb9d674f4f9b7882261f0690b61c6ed
2018-10-26 02:43:56 -07:00
David Brazdil
6d0b0f6103 Merge "Revert^2: Change command-line flags of hiddenapi" 2018-10-26 09:19:23 +00:00
David Brazdil
e9540386e2 Revert^2: Change command-line flags of hiddenapi
Change command-line flags of hiddenapi

The `hiddenapi` build tool now reads a dex file from one filename
and writes a modified dex file to another. Change the build rule
to reflect it.

This reverts commit 5381eb684e.

Test: m
Change-Id: I8d37935c5ea381348278ec668d474f6ffb8e8411
2018-10-25 17:25:23 +00:00
Colin Cross
99ba50e5e6 Merge "Reduce the propagation of LOCAL_DEX_PREOPT := nostripping" am: aefeae367e am: afabdbcc8b
am: 74cd0c4525

Change-Id: I2ee102dcf101677a866cabc125cc27e526fc6702
2018-10-24 11:28:27 -07:00
David Brazdil
5cbb887495 Merge "Revert "Change command-line flags of hiddenapi"" am: 70b26e5c98 am: a683633732
am: 77f8040a5c

Change-Id: I1e0f4509f841d807609873b09e7d62f1ce16af26
2018-10-24 05:59:21 -07:00
David Brazdil
5381eb684e Revert "Change command-line flags of hiddenapi"
This reverts commit 6b00bfd2fb.

Reason for revert: marlin running out of space

Exempted-From-Owner-Approval: Needed to unblock build, no
  buildcops on call in EMEA today.
Change-Id: I9e86545c8ada2523bc21116c6e958f69fb94dc26
2018-10-24 12:37:41 +00:00
David Brazdil
1ee485702a Merge "Change command-line flags of hiddenapi" am: 7658657ee4 am: a80d9ccbdd
am: 6ec87655fb

Change-Id: I05646eeeca4055079319fe057c960330fd5b8a48
2018-10-24 02:37:41 -07:00
David Brazdil
7658657ee4 Merge "Change command-line flags of hiddenapi" 2018-10-24 09:19:00 +00:00
Colin Cross
fc782ad949 Reduce the propagation of LOCAL_DEX_PREOPT := nostripping
nostripping causes confusing double negatives, allow nostripping
in LOCAL_DEX_PREOPT and DEFAULT_DEX_PREOPT, but convert to
LOCAL_STRIP_DEX outside of dex_preopt_odex_install.mk.

Test: m checkbuild
Change-Id: I996e9258ce20c394900d9fe937d638bc2ab8589d
2018-10-23 22:33:07 -07:00
Mathew Inwood
9b5e92e92b Merge "Put maxTargetSdk=P APIs onto light greylist." am: 5546a543ce am: 5d4f39cbb6
am: ece9efdbaa

Change-Id: Ida3330e89bfd5710ced7ba35c6c31c49f9064335
2018-10-22 09:35:48 -07:00
Treehugger Robot
5546a543ce Merge "Put maxTargetSdk=P APIs onto light greylist." 2018-10-22 15:56:49 +00:00
David Brazdil
6b00bfd2fb Change command-line flags of hiddenapi
The `hiddenapi` build tool now reads a dex file from one filename
and writes a modified dex file to another. Change the build rule
to reflect it.

Test: m
Change-Id: I2c4b080dbfdf348f230e7544c228cfd7419d1c64
2018-10-22 14:08:21 +01:00
David Brazdil
c6c75a6564 Merge "Add UNSAFE_DISABLE_HIDDENAPI_FLAGS to skip hiddenapi processing" am: 6a038d662b am: 3613f69675
am: 0dff3fc393

Change-Id: I2b7384c56dff8b0ab661f5f4c81b36faddb7d6ab
2018-10-22 06:00:18 -07:00
Mathew Inwood
bcde1c52a6 Put maxTargetSdk=P APIs onto light greylist.
Since the per-SDK level enforcement support is not ready in ART yet, we
can't implement the correct enforcement for maxTargetSdk=P. Putting these
APIs on the dark greylist causes problems for existing apps, so put them
on the light greylist instead.

Test: m
Bug: 117899984
Change-Id: Ib3dad2f50eb6a769ba9f21cec4bac01275888ef6
2018-10-22 13:44:15 +01:00
David Brazdil
6a038d662b Merge "Add UNSAFE_DISABLE_HIDDENAPI_FLAGS to skip hiddenapi processing" 2018-10-22 12:43:39 +00:00
Dan Willemsen
9dda44fc51 Merge changes from topic "refactor_dist" am: ac270964f1 am: 92d1847f56
am: a94e9a6e38

Change-Id: I8cc3adf3249ffa3010249c7240dc4ccb76376de3
2018-10-20 16:04:44 -07:00
Dan Willemsen
7ddc50a066 Refactor common makefile fragments
In preparation for setting up another Kati stage, move some common
settings and tools into a common folder. This way it's a bit easier to
see that they're safe to use, and that they shouldn't depend on anything
outside of the common folder.

Bug: 117463001
Test: build-aosp_arm.ninja is the same before and after
Change-Id: Ief4b75a4dbe45b73ffd03bf32c60695c816d979d
2018-10-20 14:43:58 -07:00
David Brazdil
8a6b9a7baf Add UNSAFE_DISABLE_HIDDENAPI_FLAGS to skip hiddenapi processing
Setting environment variable UNSAFE_DISABLE_HIDDENAPI_FLAGS=true
will skip the build step which annotates dex files with information
about public and non-public API membership. This is meant to speed
up incremental local builds.

USE AT OWN RISK: Dex files built with this flag will execute with
hidden API access checks disabled and therefore may exhibit different
behaviour compared to production code.

WARNING: Some JARs cannot be compiled with this flag as ART hardcodes
hidden API access flags of intrinsified methods. Attempting to compile
dex files containing such methods will trigger an assertion.

Test: UNSAFE_DISABLE_HIDDENAPI_FLAGS=true mmm frameworks/base
Bug: 113278235
Bug: 112388925
Change-Id: I51fe99ab53e1bb2aa0db64b22a321dd1e1ed47e1
2018-10-19 20:16:49 +01:00
Mathew Inwood
31175015c5 Merge "Write greylist annotation metadata to a csv file." am: c948d1a101 am: 964070be62
am: 592d644e83

Change-Id: I9d7dc5e8b0d723c4ee81abc17b7aabaca1bdee5e
2018-10-18 08:25:07 -07:00
Mathew Inwood
8c96298a92 Write greylist annotation metadata to a csv file.
Also add support for merging these into a single file elsewhere in the
build.

Test: m, inspect generated greylist.csv
Bug: 117314178
Change-Id: If28110fc1ed090222e55c274e8363110753d10f1
2018-10-16 12:06:02 +01:00
Colin Cross
ed2120d57e Merge "Remove extra JNI libs from prebuilt APKs" am: 0443b46066 am: 4e04fff35e
am: 1ac0bbefc1

Change-Id: I9d645b071472af437b5f037091789d427c060422
2018-10-10 20:01:25 -07:00
Treehugger Robot
0443b46066 Merge "Remove extra JNI libs from prebuilt APKs" 2018-10-09 22:35:26 +00:00
Colin Cross
0e8a2ee172 Remove extra JNI libs from prebuilt APKs
If an APK specifies LOCAL_PREBUILT_JNI_LIBS embedded in the prebuilt
APK, remove any that aren't listed.  Restores the behavior from before
I82dd3aa441712772a1d1ddd6aaf5f41179facaa7.

Bug: 69500920
Test: m checkbuild
Change-Id: I971a9c4206604c172d77144df4c0ed9a8b1c5dd0
2018-10-09 13:06:01 -07:00
nelsonli
7e618d9423 Merge "Build System: Ignore copies in copy-many-files if src == dst" am: 5112afe657 am: f52da96e11
am: 3cd2b2f563

Change-Id: I5b8148f7fd3f4a0899ab01e3a525c11008c91452
2018-10-09 03:47:21 -07:00
nelsonli
c91284dcd8 Build System: Ignore copies in copy-many-files if src == dst
BUG: 117224272

Test: 1. Modify build/core/base_rules.mk
         Add the following line after line 617
	  $(eval my_compat_dist_$(suite) += out/a:out/a))
      2. touch out/a
      3. make -j BluetoothInstrumentationTests
      4. It should build pass without any dependency errors.

Change-Id: I40372eab5b74e042f605c3cb38e72942531ed69a
2018-10-09 14:46:40 +08:00
Colin Cross
d42f15d724 Merge "Use zip2zip for uncompress-dexs and uncompress-shared-libs" am: 0ab356ac20 am: ce594b4549
am: d3371bd1ab

Change-Id: I22fd914d31494fce8036ed28507621da1e9e83de
2018-10-08 17:51:54 -07:00
Colin Cross
2a51a25495 Merge "Don't zip hiddenapi output jar into jar" am: f05a023a5a am: 808af69564
am: bcf2fa33d3

Change-Id: I7ced2ae5b772bec65cc18645b6cb75088650d9ba
2018-10-08 15:49:07 -07:00
Colin Cross
dac94fff8f Use zip2zip for uncompress-dexs and uncompress-shared-libs
Unzipping and rezipping files causes the umask of the host machine
to affect the permissions in the APK.  Use the new zip2zip -0 feature
to rewrite the zip file with selected files uncompressed.

Bug: 69500920
Test: m checkbuild
Change-Id: I82dd3aa441712772a1d1ddd6aaf5f41179facaa7
2018-10-08 12:49:11 -07:00
Colin Cross
c3c62fba96 Don't zip hiddenapi output jar into jar
Zip classes*.dex so that the jar does not contain an empty
classes.jar.

Test: m out/target/common/obj/JAVA_LIBRARIES/android.test.base.impl_intermediates/javalib.jar
Change-Id: I53bdd2035b2963dd781734da64058c95e1cff9d4
2018-10-08 11:23:59 -07:00
Anton Hansson
1d97d35f90 Merge "Move a few more string functions to strings.mk" am: d6e5cb1add am: 21e7c05f7e
am: c0bbfed0dd

Change-Id: I7f17e606ca4d179b43e9b5dbdd41f8443b71e5ae
2018-10-04 07:17:15 -07:00
Anton Hansson
d6e5cb1add Merge "Move a few more string functions to strings.mk" 2018-10-04 13:47:55 +00:00
Anton Hansson
8478f12427 Merge "Fix TWS requirement in definitions.mk" am: ee08d635c7 am: 9920578c25
am: f07cec3b69

Change-Id: I26cd047f958930c8311e79f716e61435158a8828
2018-10-03 09:10:34 -07:00
Anton Hansson
4967b34ddd Move a few more string functions to strings.mk
So they can be used in product.mk

Bug: 80410283
Test: make
Change-Id: Ic94754f6b48a3281ca1dd8c195a3410b543eb366
2018-10-03 15:59:39 +01:00
Anton Hansson
a0f91bd506 Fix TWS requirement in definitions.mk
Removing this TWS breaks the build. Add a backslash to avoid
needing it.

Test: make
Change-Id: I4f8e127218ffbf55a3e11600569f0100e914d2e2
2018-10-03 13:38:00 +01:00
Colin Cross
2ae0d2518d Merge "Pass classpath to d8" am: 1ac080e9e5 am: 5fa79d2afd
am: 807dd63e65

Change-Id: I568884edfca04ab5989b1bfe0cca226f9c6c4bbb
2018-09-27 16:47:54 -07:00
Treehugger Robot
1ac080e9e5 Merge "Pass classpath to d8" 2018-09-27 23:27:45 +00:00
Yifan Hong
29dcc01a54 Merge "to-upper and to-lower move to strings.mk" am: 1f5c41bacf am: b9f8a6fa45
am: 0576f6ed91

Change-Id: I832bcda3ea704d44c52abdb3f1224150a74313a4
2018-09-25 11:05:30 -07:00
Yifan Hong
c49bddfb67 to-upper and to-lower move to strings.mk
So that config.mk can use these functions.
Test: builds

Change-Id: I6634226cbed56c34977803ff9c75b8d481c21c34
2018-09-24 14:45:41 -07:00
Colin Cross
ec17af3364 Pass classpath to d8
d8 requires the full classpath if --min-api requires default method
or try-with-resources desugaring.  Always pass the full classpath,
since it will already have been built to generate the input jar.

Bug: 116243313
Test: m checkbuild
Change-Id: I363b4d3145e23d4eed77455c1897430206f3ac22
2018-09-21 12:36:53 -07:00
Dario Freni
ab2ead7504 Merge "Pass the intermediate dir to appcompat.sh" am: abda944667 am: ea0c204d4f
am: 1eaeb2093a

Change-Id: I83468f462a2927507c8264307e1d1ec8fceedb3e
2018-09-19 17:42:01 -07:00
Colin Cross
adbd94b1ea Merge "Don't set -pie for windows modules" am: a70669e4a5 am: f31d9e78bb
am: 637d2329d1

Change-Id: I7b0f2c0f25c8eef27c24a6972f1de65ed59bd88d
2018-09-19 17:40:44 -07:00
Treehugger Robot
abda944667 Merge "Pass the intermediate dir to appcompat.sh" 2018-09-20 00:00:54 +00:00
Colin Cross
a70669e4a5 Merge "Don't set -pie for windows modules" 2018-09-20 00:00:42 +00:00
Dario Freni
75266ab671 Pass the intermediate dir to appcompat.sh
For ASAN build the intermediate dir might differ from the default
directory.

Test: m (on an affected ASAN build)
Bug: 116020783
Change-Id: Ie4f282ea651d710351799f3fc24dba42e79ee63d
2018-09-19 23:18:38 +01:00