Commit Graph

1585 Commits

Author SHA1 Message Date
Jaewoong Jung b34f64fc7a Do not alter presigned prebuilt apks for SDK > 29.
Bug: 185811447
Test: Manual
Change-Id: I5ea143331e1bd1885dde4e46b086f4ce811f4981
2021-05-13 16:16:19 -07:00
Chris Wailes 095bc7d668 Update init.rc prebuilt handling
This CL modifies the build system to skip checking of init.rc files if
TARGET_BUILD_UNBUNDLED is set.  This is necessary because several of the
artifacts required by the host_init_verifier program aren't present in
unbundled builds.

Test: m
Change-Id: I37be43af81057c5adddc1b80a04d74a090183bc7
2021-04-22 16:15:17 -07:00
Po Hu e1e871db1a Do not run "mkdir ./" in codebase root directly
Test: grep "mkdir -p \.\/" out/build-*.ninja
Bug: 185197550
Change-Id: Ic9568ff91006b0cf362d5b5b105eb25ea3e228a8
2021-04-14 17:39:21 +08:00
Treehugger Robot 13ebf1bdf5 Merge "Remove legacy host shared library linking with gcov" 2021-04-08 18:31:08 +00:00
Colin Cross df682c6fe1 Merge "Package jacoco and proguard files out of a PACKAGING directory" 2021-04-08 17:17:53 +00:00
Colin Cross 330b1fef31 Package jacoco and proguard files out of a PACKAGING directory
Package jacoco-report-classes.jar, proguard_usage.zip and
proguard_dictionary out of directories in $OUT/obj/PACKAGING
so that they get cleared by m installclean.  This will make
incremental builds that package these files accurate as long
as installclean was run, which is much faster than a full clean
build.

Bug: 184583915
Test: m TARGET_BUILD_APPS=DeskClock EMMA_INSTRUMENT=true dist
Change-Id: I60c6a0fec1fbce26eab8d5adab25a2231b48e251
2021-04-07 18:52:02 -07:00
Stephen Hines 39e9090e7e Remove legacy host shared library linking with gcov
Test: build
Change-Id: I5f701edcfa9021f75659b6be4790119e6baca51c
2021-04-05 16:29:57 -07:00
Ryan Prichard 663b98bbab Stop linking against libatomic
The __atomic_* library functions are now part of the compiler-rt
builtins library:

https://android-review.googlesource.com/c/toolchain/llvm_android/+/1625025

Bug: http://b/153025717
Test: treehugger
Change-Id: Iebd5eaf17f8559696b6d6e2e0dd782f77b6bcab5
2021-04-02 21:05:48 -07:00
Christoffer Quist Adamsen 40c399732c Allow missing classes in R8 mk builds
Bug: 180878971
Bug: 72683872
Test: TARGET_PRODUCT=aosp_arm64 m -j core-oj
Change-Id: I4e3d49d4d8aa7e373bae6710db57f503eb95fab1
2021-02-22 13:21:00 +01:00
Bob Badour 3412a07822 Avoid duplicate installed notice file rules.
For cases with a my_register_name, move into $(call license-metadata-rule).

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m nothing

Change-Id: Ib6c610960347db84503831b1e1519622696d4500
Merged-in: Ib6c610960347db84503831b1e1519622696d4500
2021-02-21 09:03:15 -08:00
Treehugger Robot 6be34750a3 Merge "Remove module dependency on license metadata." 2021-02-19 22:11:01 +00:00
Bob Badour 0061204726 Remove module dependency on license metadata.
Test: m nothing
Change-Id: I3fb75261ec67eb80023b7ef085c459229d8950a6
2021-02-18 17:31:12 -08:00
Jaewoong Jung c18ebafcb9 Remove unwanted JNI libs outside inflating action.
Take the unwanted JNI lib removal action out of JNI uncompression
function so that they work independently when building prebuilt apks.

Fixes: 180475879
Test: Manually with a test apk.
Change-Id: I7392d0bf4ca7db76f27e883df08f7cb256162440
2021-02-18 16:09:10 -08:00
Colin Cross a1271eb343 Turn missing jarjar output files into errors
Jarjar doesn't exit with a nonzero return code when there is a syntax
error in a rules file and doesn't write the output file.  Without a
nonzero return code ninja prints a warning but continues, which leads
to stale results on incremental builds where the output file already
exists, or delayed errors on clean builds whre the output file didn't
exist.

Delete the output file before running jarjar, and then check if it
exists after running jarjar.

Fixes: 119516143
Test: m out/target/common/obj/JAVA_LIBRARIES/noto-emoji-compat-java_intermediates/classes-jarjar.jar
Change-Id: Ib99167403948ee11f039dd4d2d7e63052bb92136
2021-02-08 10:55:05 -08:00
Ulya Trafimovich 558cb6c5ac Merge <uses-library> dependency configs into dexpreopt.config files.
Since Make does not visit modules in topological order of their
<uses-library> dependencies, information from dependencies to the
dexpreopted module has to be passed via dexpreopt.config files. A build
rule for a dexpreopt.config file depends on dexpreopt.config files for
<uses-library> dependencies, and dex_preopt_config_merger.py script
extracts the necessary information from dependency configs and patches
the module's config.

Bug: 132357300
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Id0b71170a4d2ab1d33059de0e9ad9d7e61f2345e
2021-01-28 14:59:14 +00:00
Bob Badour 7a95820907 Revert^2 "Rough-in license metadata support to make."
Changed shell script to /bin/sh syntax for portability to mac_os etc.

54066744f0

Change-Id: Ibd472fc1bedfdc228a704108f0280b13ab1c9333
2021-01-06 20:52:43 -08:00
Bob Badour 21bd34fe09 Revert^2 "Add variables for notice deps, license kinds etc."
dcfb9c5ef5

Change-Id: I6a60f55ab0e7013061a695cb1b7c5ffde29577dd
2021-01-06 20:46:49 -08:00
Jerome Gaillard dcfb9c5ef5 Revert "Add variables for notice deps, license kinds etc."
Revert "Export soong license data to make."

Revert "Add ability to declare licenses in soong."

Revert submission 1377717-metalics

Reason for revert: This has broken renderscript_mac target for aosp-master, see b/176909442

Reverted Changes:
I26ac54ca9:Define the standard license_kind rules.
I656486070:Export soong license data to make.
If9d661dfc:Export soong license data to make.
I97943de53:Add ability to declare licenses in soong.
Icaff40171:Rough-in license metadata support to make.
Ib8e538bd0:Add variables for notice deps, license kinds etc.

Change-Id: I1f672e6e8ec48f0141bb4b6cc4eb2efed1eeef6b
2021-01-06 19:00:05 +00:00
Jerome Gaillard 54066744f0 Revert "Rough-in license metadata support to make."
Revert "Export soong license data to make."

Revert "Add ability to declare licenses in soong."

Revert submission 1377717-metalics

Reason for revert: This has broken renderscript_mac target for aosp-master, see b/176909442

Reverted Changes:
I26ac54ca9:Define the standard license_kind rules.
I656486070:Export soong license data to make.
If9d661dfc:Export soong license data to make.
I97943de53:Add ability to declare licenses in soong.
Icaff40171:Rough-in license metadata support to make.
Ib8e538bd0:Add variables for notice deps, license kinds etc.

Change-Id: Iaf2243cba16f6191b022371a14f81ef8194a47d1
2021-01-06 19:00:05 +00:00
Bob Badour 20fc1b3719 Rough-in license metadata support to make.
Change-Id: Icaff40171b94538219a8caa697b182dbdcc8229a
2021-01-05 08:42:48 -08:00
Bob Badour 6421674a39 Add variables for notice deps, license kinds etc.
Change-Id: Ib8e538bd09044a5791083b362d807cd9293833d5
2021-01-05 08:42:48 -08:00
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