Commit graph

1664 commits

Author SHA1 Message Date
Yo Chiang
ad4dae71cf Merge "Add phony target to check all PCF ELF prebuilts" 2020-12-04 02:49:33 +00:00
Daniel Norman
97332c9685 Merge "Adds a new build task to run host_init_verifier on partition dirs." 2020-11-20 18:57:17 +00:00
Daniel Norman
c5604a02f7 Adds a new build task to run host_init_verifier on partition dirs.
Also includes passwd_system_ext in copy-init-script-file-checked,
seemingly left out as an oversight.

Bug: 163089173
Test: Treehugger build targets
Change-Id: I3b972e4677a6adad2c515f5762e0062803453d18
2020-11-18 11:36:19 -08:00
Dan Shi
41f6291a9f Add unit tests to host-unit-tests suite
Bug: 172006742
Test: m
Change-Id: Id58f5a24df2fe61229ce2eae2d655f7aa31b6aba
2020-11-16 16:55:42 -08:00
Yo Chiang
336883a64f Add phony target to check all PCF ELF prebuilts
Add phony target check-elf-prebuilt-product-copy-files that asserts
PRODUCT_COPY_FILES doesn't have ELF prebuilts.
This helps triage PCF ELF errors by providing a convenient target to
check / list all errors.

Bug: 140560012
Bug: 156534160
Test: lunch aosp_cf_x86_phone
Test: m USE_NDK_TRANSLATION_BINARY=true \
  check-elf-prebuilt-product-copy-files -k
Change-Id: Ic7fa43c10b0c30b3b1d9b7c2fae75cc6ea4a3513
2020-10-31 06:46:31 +00:00
Jingwen Chen
7d7f94547a symlink_outputs: Add .KATI_SYMLINK_OUTPUTS to build/make/core
Test: m
Bug: 160568334

Change-Id: Ie6fb4f16bb77845787d277857e17e6aac0a8c11a
2020-10-21 08:55:10 +00:00
Kousik Kumar
92f32615ed Revert "Remove env-var-allowlist"
Revert "Add -fdebug-compilation-dir option"

Revert submission 1461902-debug-compilation-dir

Reason for revert: "-Xclang" isn't being uniformly respected everywhere. For example, in ".S" compilations, when I pass `-Xclang -fdebug-compilation-dir=.", the assembler seems to be ignoring it and then inserting the `pwd` into the command, however when I pass "-fdebug-compilation-dir=.", it strips out the path to the current working directory.
This indicates that we need to update re-client's input processor so that we can pass -fdebug-compilation-dir=. without "-Xclang" and then remove `PWD` setting.
For now, I'll update this patch to pass both "-fdebug-compilation-dir=." and `PWD` and when RBE side fix is done, I'll remove `PWD` in a separate CL.

Reverted Changes:
Ib0f271e55:Add -fdebug-compilation-dir option
Ifa0592af5:Remove env-var-allowlist

Change-Id: I7c690b3e00d37dbcc8fbaa66dda49f39032be3ab
2020-10-20 05:52:49 +00:00
Kousik Kumar
405847ac19 Remove env-var-allowlist
We no longer need to set PWD variable with the introduction of
`-fdebug-compilation-dir`, so removing env var allowlist of PWD variable
to RBE.

Change-Id: Ifa0592af519b6cc4364ee653f1a2174fd680bac1
2020-10-15 15:53:13 -04:00
Xin Li
37a9f38115 Merge "Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)" into stage-aosp-master 2020-09-01 20:03:45 +00:00
Martin Stjernholm
a24c0fe655 Merge "Preserve symlinks in the Soong prebuilt install steps for host binaries and shared libs." 2020-09-01 10:32:49 +00:00
Martin Stjernholm
49a4e9b52e Preserve symlinks in the Soong prebuilt install steps for host binaries
and shared libs.

If a prebuilt module file is a symlink in the .intermediates tree it is
preserved when copied to the final install location. This preserves
symlinks to prebuilt binaries, so that they are run from their prebuilt
source location and can find libraries in relative paths from there.

Symlinks are converted to absolute, to not fail if they are relative in
the source tree.

Test: m clean && m droid dist checkbuild
  with and without the change, then compare the lists of symlinks in
  the out/ trees
Test: build/soong/soong_ui.bash --make-mode \
    TARGET_PRODUCT=crosshatch_hwasan TARGET_BUILD_VARIANT=userdebug \
    droid SANITIZE_TARGET=hwaddress \
    continuous_instrumentation_tests_api_coverage \
    continuous_native_tests device-tests platform_tests
  check that libclang_rt.hwasan_static-aarch64-android.a isn't a
  symlink in out/target/product/crosshatch/obj
Bug: 145934348
Change-Id: I7600e5b0754f8ea6cd0ffc8e1ba6d39153f182aa
2020-09-01 00:24:54 +01:00
Xin Li
c2fd58fe67 Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: Ie00dbea32e074838466eeed00f316250c2b4f3c2
Change-Id: I9ee3441fd4d063b9dd489cb1b01d3dbc11332457
2020-08-29 01:19:44 -07:00
Jaewoong Jung
046702a6ef Deduplicate my_compat_dist entries globally.
Fixes: 164319611
Test: m TARGET_PRODUCT=aosp_x86_64 mts dist
Change-Id: Ie47e355ded0ce0221988a405fc77546a4a752c38
2020-08-27 13:10:40 -07:00
Colin Cross
6de1a4a273 Merge "Move definition of dist-for-goals before call." am: 80ef0a212c am: f2458a5da7
Original change: https://android-review.googlesource.com/c/platform/build/+/1128914

Change-Id: Ia3736984d5679d017b254a09f86130ffe6df7a68
2020-06-11 20:47:00 +00:00
Colin Cross
80ef0a212c Merge "Move definition of dist-for-goals before call." 2020-06-11 18:36:18 +00:00
Ulyana Trafimovich
5ed9d68b9e Merge "Fix on-device paths to used libraries in dexpreopt." am: cd33e76411 am: c048d40cc9
Original change: https://android-review.googlesource.com/c/platform/build/+/1325806

Change-Id: Ic563dbd7ae789d6a7ad83a4c4dce02053aff3c83
2020-06-11 14:23:22 +00:00
Ulyana Trafimovich
cd33e76411 Merge "Fix on-device paths to used libraries in dexpreopt." 2020-06-11 13:47:19 +00:00
Ulya Trafimovich
2311f61b12 Fix on-device paths to used libraries in dexpreopt.
Also, add function `install-path-to-on-device-path` that converts
its one argument from on-host install path to on-device path by
stripping PRODUCT_OUT prefix.

Test: lunch aosp_cf_x86_phone-userdebug && m
Test: Cherry-pick in internal master and check that on-device path to
    com.google.android.dialer.support.jar now is on /product partition
    (as it should be) and not on /system:
    $ oatdump \
        --instruction-set=x86 \
        --oat-file=out/target/product/vsoc_x86/product/priv-app/GoogleDialer/oat/x86/GoogleDialer.odex \
      | grep '^classpath' \
      | grep -o '[^[]*com.google.android.dialer.support.jar'
    /product/framework/com.google.android.dialer.support.jar

Bug: 132357300
Change-Id: I9bbe45ffbbed09186ac46e067da7ada599ef9678
2020-06-11 10:10:00 +01:00
Treehugger Robot
4c7dc6e511 Merge "base_rules.mk optimizations" am: 8add8cb145 am: ffbee4fbf3
Original change: https://android-review.googlesource.com/c/platform/build/+/1326240

Change-Id: Idd897d57865e3834d3fcd8fb7788b7a2a75e3e1e
2020-06-10 02:53:43 +00:00
Dan Willemsen
8447b8116a base_rules.mk optimizations
A few more misc improvements that I found while analyzing the
performance of base_rules.mk.

This brings an aosp-master/aosp_crosshatch-userdebug kati run from 33.3s
to 28.6s

Bug: 158488548
Test: build-aosp_crosshatch.ninja is the same before/after
Change-Id: If99c31cc7b5d7133d70eb644c6095f19060b71e5
2020-06-09 09:59:24 -07:00
Treehugger Robot
02dcbdb3f9 Merge "More performance improvements" am: 1d1bb3b94f am: 27d4463cf5
Original change: https://android-review.googlesource.com/c/platform/build/+/1326018

Change-Id: Ic783c75beffd9eac7abb208d2f2697f8c4775325
2020-06-09 05:00:29 +00:00
Dan Willemsen
fd1e67b8ce More performance improvements
Instead of using `x := $(x) foo`, make sure `x` is initialized first,
then use `x += foo`.

For a aosp-master/aosp_crosshatch-userdebug build, this takes the build
from 49s to 33s (no significant difference in peak memory)

Bug: 158488548
Test: build-aosp_crosshatch.ninja is the same before/after
Change-Id: I41fb7611030dd3ba824f896a9c9eadbdd218f464
2020-06-08 19:10:23 -07:00
Treehugger Robot
c47b36bbb9 Merge "Remove unused check-api rule" am: fa9ea4b8b0 am: 6231dd8584
Original change: https://android-review.googlesource.com/c/platform/build/+/1322795

Change-Id: Ia66d72bf145458e7b570b47b766a4bc6a4aae164
2020-06-02 19:40:09 +00:00
Aurimas Liutikas
9c5b07966e Remove unused check-api rule
Change-Id: I0297b226d066e99ee4fc4c2b22e160eafc7f5a8a
Test: Treehugger?
2020-06-02 17:01:52 +00:00
Dan Willemsen
f08587c925 Remove AUX support am: 58634e1482 am: c4fb07d615
Change-Id: Ic54cef973b4573886a562690fe0d3c8b35816f4a
2020-04-21 23:11:48 +00:00
Dan Willemsen
58634e1482 Remove AUX support
This was deprecated in R, which has now branched, and there aren't any
users on master.

Test: build-aosp_crosshatch.ninja is the same (except for the removal of the empty auxiliary target)
Test: treehugger
Change-Id: I306156ab7f91cd4a2258554b4215766c99cd12d1
2020-04-18 21:00:18 -07:00
Kousik Kumar
0a8b83d0cb Merge "Use soong_zip instead of jar to generate .jar files in javac actions" am: 1d56417af0 am: 2d1430e51c
Change-Id: Iec9836498edc164265b79034da7a75b588d65057
2020-04-17 22:41:01 +00:00
Kousik Kumar
1d56417af0 Merge "Use soong_zip instead of jar to generate .jar files in javac actions" 2020-04-17 21:51:31 +00:00
Yo Chiang
b301fd5434 Merge "Check ELF prebuilts in PRODUCT_COPY_FILES" am: 2cbcf3bda2 am: 85e68e75f1
Change-Id: Ifb30cc6423b03d9468ec949ba862c61d70085f4f
2020-04-17 01:41:49 +00:00
Kousik Kumar
7d61116cc1 Use soong_zip instead of jar to generate .jar files in javac actions
This is to make the jar-output deterministic so that we can get
cache-hits for r8/d8 actions from RBE.

Change-Id: I911ee702fa5dabfe7122e82b21f78c811a0c960d
Test: m droid checkbuild
2020-04-16 18:23:32 -07:00
Yo Chiang
2cbcf3bda2 Merge "Check ELF prebuilts in PRODUCT_COPY_FILES" 2020-04-17 01:06:32 +00:00
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