Commit Graph

46078 Commits

Author SHA1 Message Date
Logan Chien c24a265ae9 Support LOCAL_ADDITIONAL_DEPENDENCIES to soong_cc_prebuilt.mk
This commit adds LOCAL_ADDITIONAL_DEPENDENCIES to soong_cc_prebuilt.mk
so that ABI dump and diff files can be generated and checked.

Test: make -j && find out -name '*.abidiff'
Change-Id: If12ec9a321f42efe4f8dc938568e8911400cc053
2018-10-11 11:19:31 +08:00
Colin Cross ff999725ac Merge changes I6a4060a7,I7743fbda,I88eb24f8
* changes:
  Unnest independent dexpreopt conditionals
  Indent dex_preopt_odex_install.mk
  Revert "Build: Do not treat org.apache.http.legacy.boot as boot classpath"
2018-10-10 22:35:49 +00:00
Treehugger Robot 471656df53 Merge "Initialize variable to fix wrong odex installed" 2018-10-10 20:06:32 +00:00
Colin Cross c18757e34d Unnest independent dexpreopt conditionals
Most of the 6 nested conditionals are independent and can be
evaluated individually.  This has a slight change in behavior,
disabling preopt for a module in the product will now override
LOCAL_DEX_PREOPT, but that seems preferable.

Test: m
Change-Id: I6a4060a78df729c34bbf6978c84993859a947bf7
2018-10-10 10:12:03 -07:00
Treehugger Robot c79539baca Merge "Prebuild: Remove --compile-pic and -Xnorelocate." 2018-10-10 09:39:24 +00:00
Po Hu eaef4d8b9f Initialize variable to fix wrong odex installed
When "PRODUCT_DEX_PREOPT_GENERATE_DM_FILES := true" and
"PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER := verify" are set,
boot jar may wrongly refer to previous module's variables such as
my_generate_dm, my_built_dm and my_installed_dm. And then cause
unexpected files installed along with this boot jar.

So initialize my_generate_dm to empty at first.

Bug: 117526952
Test: make out/target/product/generic/module-info.json
Test: cat out/target/product/generic/module-info.json | grep '"apache-xml":'
Change-Id: Iaa851f4fb530b3446de3dbcb1f54e545938830ce
2018-10-10 13:40:15 +08:00
Colin Cross 0a69bb6c90 Indent dex_preopt_odex_install.mk
Test: m checkbuild
Change-Id: I7743fbda98d1f1ea1d3e8242905239ff0115b6a9
2018-10-09 21:20:21 -07:00
Paul Duffin cb846fa6f8 Revert "Build: Do not treat org.apache.http.legacy.boot as boot classpath"
This reverts commit 039bb48f72.

This is no longer needed. Depending on the setting of REMOVE_OAHL_FROM_BCP the org.apache.http.legacy library is now either on the bootclasspath or a standalone library, it cannot be both.

Bug: 18027885
Bug: 72167111
Change-Id: I88eb24f8a4324e206fd384cd8adf79acd6fc0858
Merged-In: I88eb24f8a4324e206fd384cd8adf79acd6fc0858
Test: make with and without REMOVE_OAHL_FROM_BCP=true
(cherry picked from commit 9390268746)
2018-10-09 21:19:25 -07:00
Treehugger Robot 0443b46066 Merge "Remove extra JNI libs from prebuilt APKs" 2018-10-09 22:35:26 +00:00
Treehugger Robot 9cb5cfad6d Merge "Add support for JNI libraries to soong_app_prebuilt.mk" 2018-10-09 21:50:40 +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
Andreas Gampe 10b28befbe Merge "Change install paths of libs in sanitize builds" 2018-10-09 18:14:20 +00:00
Vladimir Marko a332207767 Prebuild: Remove --compile-pic and -Xnorelocate.
The --compile-pic argument is obsolete, all generated code
is now PIC.

The -Xnorelocate is ignored by dex2oat since
    https://android-review.googlesource.com/771001
where the option was reinterpreted from "use patchoat if
needed" to "relocate the boot image in memory if possible"
and dex2oat forbids that relocation.

Test: Pixel 2 XL boots.
Bug: 77856493
Change-Id: I60cdf81267a129be8a482af26fb865110561268e
2018-10-09 17:35:07 +01:00
Treehugger Robot 5112afe657 Merge "Build System: Ignore copies in copy-many-files if src == dst" 2018-10-09 10:25:22 +00:00
Treehugger Robot e58de93cdb Merge "Add acloud shortcut in envsetup.sh" 2018-10-09 08:09:44 +00: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
Treehugger Robot 3f7223984c Merge "Move zipalign off NO_ERROR." 2018-10-09 02:00:27 +00:00
Colin Cross 0ab356ac20 Merge "Use zip2zip for uncompress-dexs and uncompress-shared-libs" 2018-10-09 00:29:14 +00:00
Kevin Cheng bf89aff251 Add acloud shortcut in envsetup.sh
Bug: None
Test: source envsetup.sh and ran acloud successfully.
Change-Id: Ie75c2a6ea002fe3d909afd1760f4ab05c7c94a26
2018-10-08 16:23:40 -07:00
Colin Cross f05a023a5a Merge "Don't zip hiddenapi output jar into jar" 2018-10-08 22:04:59 +00:00
Dan Willemsen 159693a3e5 Merge "Update for flags passed from Soong" 2018-10-08 21:34:46 +00:00
Treehugger Robot 976f1d4577 Merge "base_system: Add iorapd as core product target" 2018-10-08 20:12:59 +00: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
Elliott Hughes ad7d562d27 Move zipalign off NO_ERROR.
I really only care about code that's built for Windows, but I may as
well clean up anywhere that's easy to clean up too...

Bug: N/A
Test: builds
Change-Id: I3ef34fb12ac90e9411b6421e9c23dd8524f056ae
2018-10-08 11:19:28 -07:00
Dan Willemsen 7a5c5d730f Update for flags passed from Soong
Obsolete more GCC-specific flags, TARGET_(arm|thumb)_CFLAGS now contains
pre-filtered clang flags, and GLOBAL_CLANG_CFLAGS_NO_OVERRIDE now
contains all flags instead of just the clang additional flags.

Test: m
Change-Id: I068f155041e681068d38e1a5b6b04d354b85ccee
2018-10-07 19:43:23 -07:00
Treehugger Robot c18b2b28c2 Merge "aidegen: Collect all java sources from makefile system." 2018-10-06 02:14:54 +00:00
Igor Murashkin 962e2dde0a base_system: Add iorapd as core product target
This makes iorapd be built as part of the system image
with a regular 'make' command.

Part of a topic that has 'iorapd' start up by init_rc.

Bug: 72170747
Change-Id: I300bc35f508fbe36bf0f545e20236c718392d571
2018-10-05 16:28:12 -07:00
patricktu b23d8e6502 aidegen: Collect all java sources from makefile system.
Bug: 117129969
Test: make -j64 out/target/product/generic_x86_64/module-info.json
Change-Id: I4bc6cab8e56a1ed6485ad2f5f22fe9b8149b25d0
2018-10-05 14:55:36 +08:00
Tao Bao d124240719 Merge "releasetools: Set default stdout and stderr in common.Run()." 2018-10-05 03:03:56 +00:00
Tao Bao 73dd4f45f3 releasetools: Set default stdout and stderr in common.Run().
stdout and stderr will default to subprocess.PIPE and subprocess.STDOUT
respectively (which is the expected behavior from most of the existing
callers), unless caller specifies any of them.

Test: `m dist`
Test: python -m unittest \
          test_common \
          test_add_img_to_target_files \
          test_ota_from_target_files \
          test_validate_target_files
Change-Id: I43b3f08edfa8a9bcfe54baf9848dc705c048e327
2018-10-04 17:05:09 -07:00
Yifan Hong 3f0d1ad451 Merge "Support "updatable groups"." 2018-10-04 22:21:57 +00:00
Yifan Hong b43012f0ad Support "updatable groups".
* BOARD_SUPER_PARTITION_GROUPS defines a list of "updatable groups". Each
updatable group is a group of partitions that share the same pool of free
spaces.

* For each group in BOARD_SUPER_PARTITION_GROUPS, a BOARD_{GROUP}_SIZE and
BOARD_{GROUP}_PARTITION_PARTITION_LIST may be defined.
    - BOARD_{GROUP}_SIZE: The maximum sum of sizes of all
      partitions in the group.
      If empty, no limit is enforced on the sum of sizes for this group.
    - BOARD_{GROUP}_PARTITION_PARTITION_LIST: the list of partitions that
      belongs to this group.
      If empty, no partitions belong to this group, and the sum of sizes is
      effectively 0.

* BOARD_SUPER_PARTITION_PARTITION_LIST should not be defined
by the device. It is now computed from all
BOARD_{GROUP}_PARTITION_PARTITION_LIST.

* Each 'updatable group' has its own pool of space for its
partitions to grow into. Enforce the following:
    * sum(all partitions) <= super partition (/ 2 for A/B)
    * For each group, sum(partitions in group) <= group size
    * sum(all group sizes) <= super partition (/ 2 for A/B)

Test: builds
Bug: 111610495
Change-Id: I072b011714ec31a1d8813cc75edd27da3c6ff39a
Merged-In: I072b011714ec31a1d8813cc75edd27da3c6ff39a
2018-10-04 13:08:56 -07:00
Colin Cross 0fa751ba68 Add support for JNI libraries to soong_app_prebuilt.mk
Use install_jni_libs_internal.mk to install JNI libraries alongside
preinstalled APKs.  APKs with embedded JNI libraries are handled
within Soong.

Bug: 80095087
Test: m checkbuild
Change-Id: I2ecf10b6771dff14c940cc6e6442eb2ae43a75b0
2018-10-04 11:24:15 -07:00
David Anderson d1428e2748 Merge "Remove uuidgen.py and update lpmake parameters." 2018-10-04 18:20:47 +00:00
Tao Bao 4d36fcba8c Merge "releasetools: build_image.BuildVerityTree() returns a tuple." 2018-10-04 14:35:26 +00:00
Anton Hansson d6e5cb1add Merge "Move a few more string functions to strings.mk" 2018-10-04 13:47:55 +00:00
Treehugger Robot 3e795ee38b Merge "Revert "Fix build error for sdk_gphone_x86_64-userdebug"" 2018-10-04 06:37:38 +00:00
Treehugger Robot 2647067ae9 Merge "Envsetup: Fix lunch choice with number in zsh" 2018-10-04 05:23:16 +00:00
Bowgo Tsai 3ac95b53f4 Revert "Fix build error for sdk_gphone_x86_64-userdebug"
This reverts commit 6924b25729.

Reason for revert: with the following fix, this workaround is no longer needed.
  https://android-review.googlesource.com/c/platform/build/+/762663

Bug: 112322265
Change-Id: I07363f6a5aa1697b6f7702343f3120e1049f07d8
Test: build sdk_gphone_x86_64-userdebug
2018-10-04 04:35:55 +00:00
Tao Bao 2f057467eb releasetools: build_image.BuildVerityTree() returns a tuple.
We don't need verity_root_hash or verity_salt to be in the prop dict.

Test: `m dist` with aosp_marlin-userdebug
Test: python -m unittest test_verity_utils
Change-Id: I5a9c50f4741dfb1083b3f590136335b6bc0e5216
2018-10-03 16:37:58 -07:00
Tianjie Xu 08fff56237 Merge "Generate the compute_hash_tree command" 2018-10-03 23:09:15 +00:00
David Anderson b954afec0b Remove uuidgen.py and update lpmake parameters.
Bug: 117229984
Test: device builds with PRODUCT_USE_LOGICAL_PARTITIONS=true
Change-Id: Ib39d19726861dd79d90923163f9e594ed91da4ca
2018-10-03 14:24:34 -07:00
Tianjie Xu 67c7cbb9c8 Generate the compute_hash_tree command
Generate the transfer command "compute_hash_tree" for incremental
updates of the non-A/B devices that enable verified boot 1.0

Other changes include:
i.  factor out verity_utils to use both in build_image and blockimgdiff
ii. add a new flag 'hashtree_info_generator' in sparse_image to generate
    the hashtree information.

Bug: 25170618
Test: generate a package for aosp_angler; and run simulator
Change-Id: I4d4d7a3e41dc3da810d2cbf8988e85d187c9ab0e
2018-10-03 13:36:35 -07:00
Tao Bao fabb2c9792 Merge "releasetools: Raise on image building errors." 2018-10-03 20:26:35 +00:00
Tao Bao c6bd70a5e6 releasetools: Raise on image building errors.
The image building functions in build_image.py have been returning
(success, result) or special values to indicate the validity of the
result. The same logic can be better expressed by raising exceptions
instead, because
 a) using a special value relies on caller to check for that magic
    value;
 b) exceptions can carry additional messages other than a boolean does,
    e.g. the output from the failing command;
 c) caller can have cleaner code flow without explicitly checking for
    the validity of the result.

This CL changes such functions to raise on errors. The majority of these
functions are internal to build_image.py only, except for BuildImage()
that has a few callers in add_img_to_target_files.py (which all die upon
error anyway).

Test: `m dist`
Test: python -m unittest test_build_image
Test: python -m unittest test_add_img_to_target_files
Test: python -m unittest test_validate_target_files
Test: Inject an error to the depended binaries (e.g. avbtool), and check
      that build_image.py exits with error messages.
Change-Id: Ibe4d51e267756bb1a00fa9238a213f9d55fd9b58
2018-10-03 11:31:44 -07:00
Anton Hansson ee08d635c7 Merge "Fix TWS requirement in definitions.mk" 2018-10-03 15:41:22 +00: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
Treehugger Robot 943be51cf1 Merge "Prevent AVB signing from using _RESERVED_SIZE" 2018-10-03 14:32:47 +00: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