Commit graph

1350 commits

Author SHA1 Message Date
Dan Willemsen
3a1072a839 Obsolete BUILD_BROKEN_ANDROIDMK_EXPORTS
Bug: 73959648
Test: treehugger
Change-Id: Ibecc6eb97fef6924e5d909c0393d8dfaa62c7d1d
2019-05-25 17:12:12 -07:00
Dan Willemsen
e048f7eff3 Remove BUILD_BROKEN_ENG_DEBUG_TAGS
All users have been removed.

Test: treehugger
Change-Id: I2cfe720bef88cc5485e90746d85a7e0a5d068ef7
Merged-In: I2cfe720bef88cc5485e90746d85a7e0a5d068ef7
2019-05-25 22:47:35 +00:00
Pete Gillin
42fe06b3c2 Merge "Avoid targeting Java 9 for targets with SDK version up to 29." 2019-05-21 10:19:06 +00:00
Pete Gillin
58090478d7 Avoid targeting Java 9 for targets with SDK version up to 29.
Targets with sdk_version values up to and including 29 should not use
Java language level 9, even if EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true
is set.

This change keeps the make logic in sync with the soong logic in the
other change in this topic.

Bug: 131678633
Test: EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true make droid tests docs cts java
Change-Id: Icd5db432f6b18486e8ede006c15a930c754ad4c2
2019-05-20 15:46:50 +01:00
Anton Hansson
269dd013a5 Move default setting of a product variable
Should be in product_config.mk, before the variables are readonly'd, or
the default will fail to work.

Bug: 131576555
Test: set PRODUCT_SHIPPING_API_LEVEL := 29 in mainline_arm64.mk && lunch
Change-Id: I25faee7ec0a3fff17e1d08b834d868834effda36
2019-05-14 14:33:18 +01:00
Pete Gillin
aa448d138b Merge "Rename EXPERIMENTAL_USE_OPENJDK9 to EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9." 2019-05-10 11:50:08 +00:00
Pete Gillin
273b25f9fd Rename EXPERIMENTAL_USE_OPENJDK9 to EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9.
The current EXPERIMENTAL_USE_OPENJDK9 environment variable is a legacy
from when the 8 -> 9 toolchain upgrade was happening. That migration
is done and the variable only affects the language level, so it should
have a name that reflects that. (The current situation would be
especially confusing if we started a 9 -> 11 toolchain upgrade,
presumably controlled by a variable like EXPERIMENTAL_USE_OPENJDK11,
since the two settings look incompatible but are actually orthogonal.)

The current variable historically allowed a value or "1.8" which meant
"use the OpenJDK 9 toolchain but target language level 8". That value
no longer has any meaning and the new variable doesn't allow it.

Bug: 131678633
Test: `make` with `EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true`
Test: `javap -v $OUT_DIR/soong/.intermediates/libcore/core-oj/android_common/javac/classes/java/util/List.class | grep 'major version'` shows 53
Change-Id: Ic1f76a656bea30713b356a28e82f908a46933893
Test: Audit all mentions of the old string here and downstream
2019-05-09 15:30:39 +01:00
Tao Bao
d14c2f88df Use the installed vboot_signer.
Bug: 34738751
Test: Set `PRODUCT_SUPPORTS_VBOOT := true` and `m -j otatools-package`.
      Check the packed tools.
Test: Set `PRODUCT_SUPPORTS_VBOOT := true` and `m -j bootimage`.
Change-Id: Ia2ea475e3dc03cada1da524a299a21b8ad7ed536
2019-05-06 20:03:24 -07:00
Tao Bao
d5ab10eed4 Update the references to verity tools.
Test: `m -j dist` with aosp_marlin-userdebug
Test: `atest releasetools_test`
Test: Run signing with otatools.
Test: TreeHugger
Change-Id: I60d5bad4435d588c5f97b2245ca67ed3d55299b7
2019-05-02 18:32:11 -07:00
Bowgo Tsai
0013f55ef4 Adding boot-debug.img and ramdisk-debug.img
The two new debugging images adds additional files based on
boot.img and ramdisk.img/ramdisk-recovery.img, respectively.

File /force_debuggable is to trigger special logic in /init to load an
userdebug version of sepolicy and an additional property file from this
ramdisk to allow adb root, if the device is unlocked.

It's intentional to skip signing for boot-debug.img, as it can
only be used if the device is unlocked, where verification error
is allowed.

Those debugging images allows adb root on user build
system.img, vendor.img, product.img, etc. This can facilitate more
automated testings on user builds and is helpful to narrow down the
delta between what's being tested v.s. what's being shipped.

Bug: 126493225
Test: `make dist`, checks both boot-debug.img and ramdisk-debug.img
      are in $OUT/ and out/dist.
Test: `make dist`, checks installed-files-ramdisk-debug.{json,txt} are
       in out/dist.
Test: `system/core/mkbootimg/unpack_bootimg.py --boot_img $OUT/boot-debug.img`,
      checks the extracted out/ramdisk is as expected
Test: Run `gunzip -c ramdisk | cpio -idm` for the ramdisk extracted from
      $OUT/boot-debug.img and $OUT/boot.img, respectively.
      Then compare the root dirs of both, e.g.,
      `diff -rq --no-dereference ./ramdisk ./ramdisk-debug`
Test: `make ramdisk_debug-nodeps` and `make bootimage_debug-nodeps`

Change-Id: I30137c3caef91805d9143d404e5e4d06c0fccc30
2019-04-22 21:50:07 +08:00
Dan Willemsen
1d4a56f1a0 Obsolete BUILD_BROKEN_DUP_COPY_HEADERS
There are no remaining users.

Test: treehugger
Change-Id: I1fd5b933372e3ea391c121d265f41c35b832b206
2019-04-19 18:28:53 +00:00
Dan Willemsen
407ca587be Obsolete BUILD_BROKEN_PHONY_TARGETS
There are no remaining users.

Test: treehugger
Change-Id: Ice6f25a59265305e7e5d3dd041b16cd04674dd1e
2019-04-19 11:26:14 -07:00
Dan Willemsen
c1a836bab0 Merge changes from topic "make_deprecation"
* changes:
  Add infrastructure for deprecating module types
  Mark BUILD_* as readonly
2019-04-18 17:44:19 +00:00
Dan Willemsen
695849ec88 Add infrastructure for deprecating module types
Also start the deprecation for BUILD_HOST_TEST_CONFIG and
BUILD_TARGET_TEST_CONFIG, which have no users.

Bug: 130720555
Bug: 130723115
Bug: 130734993
Test: treehugger
Test: Add entries to DEFAULT_ERROR / OBSOLETE to manually test behavior
Change-Id: Icfdff43a29b6512494d44b9be11d178333505010
2019-04-17 17:02:20 -07:00
Dan Willemsen
bed1918841 Mark BUILD_* as readonly
Test: treehugger (build_test)
Change-Id: I2fddd43ebeaffd48246ab2fa289a19131094a1ac
2019-04-17 12:35:41 -07:00
Tom Cherry
6b28af30fb Remove TARGET_ROOT_OUT_SBIN / TARGET_ROOT_OUT_SBIN_UNSTRIPPED
/sbin was traditionally used for static binaries on the ramdisk for
Android, but now everything is a shared binary, so this directory is
empty and we do not want to encourage creation of new libraries in
this directory.

Bug: 73660730
Test: build
Change-Id: Ia82d892adfffb6fa325d0c570ae7999e7bb28dc2
2019-04-17 11:12:32 -07:00
Dan Willemsen
0ab1be6fe2 Stop using build/target -> build/make/target symlink
Instead, fully specify build/make/target/... everywhere

Test: treehugger
Change-Id: Idf89b2e6a0b777adbfb6370ea34f35faee6d4965
2019-04-09 21:35:37 -07:00
Elliott Hughes
24e47858f2 Merge "Remove 'column' from modules target" 2019-04-04 20:17:05 +00:00
David Sehr
976c3c3651 Remove dalvik/dexdump and rename dexdump2
Complete the migration to use art/dexdump.

Bug: 22322814
Test: make -j 50 checkbuild test-art-host-dexdump
Change-Id: Ie69bed375dff79f66add5bdb6a8b1b7e14d8a173
2019-04-03 09:30:06 -07:00
Johan Harvyl
7005d4f4cc Remove 'column' from modules target
The standard target modules stopped working when restrictions in
soong were introduced to which binaries are allowed to be used during
builds.

Listing a very large amount of modules in columns does not make it
more readable and harder to work with in tools so just drop it.

Bug: 129800175
Test: make modules
Change-Id: I26040479a03916161fb5d072de1af640d8080c7f
2019-04-03 07:41:43 -07:00
Sasha Smundak
da25b691d3 Eliminate ENABLE_DEFAULT_TEST_LOCATION as it is always true
Bug: 117224272
Test: treehugger
Change-Id: Idd47ead31fcd89dbf728f140dc3353e5013ba352
2019-03-25 13:26:03 -07:00
Yifan Hong
889b1f7c0c Allow disabling building super partition for DAP devices
Previously:
if (DAP && !BUILD_SUPER) error;

Now:
if (BUILD_SUPER && !DAP) error;

This allows DAP devices to disable building super partition when the OEM
doesn't want to. The ability to build super partition shouldn't be
a requirement of enabling DAP; rather, building super partition requires
DAP to be enabled.

To do this on a device, PRODUCT_BUILD_SUPER_PARTITION should be set
to false explicitly. If it is unset, it will use the value of
PRODUCT_USE_DYNAMIC_PARTITIONS.

Bug: 127687287
Test: set PRODUCT_BUILD_SUPER_PARTITION to false and build dist

Change-Id: I25f1866e61d73affb445c1aec042cf53aac93583
2019-03-18 11:48:03 -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
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
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
Anton Hansson
d488d2d7d7 Move BoardConfig strip / READONLY marking
This moves the BoardConfig READONLY marking being product.mk's
responsibility to board_config.mk.

Also unify it with the BUILD_BROKEN_* setting handling, and
READONLY a few additional variables.

Test: build_test
Change-Id: Ifcfef588aa459223d6d7f017413d1681f341297f
2019-03-01 10:04:18 +00:00
Anton Hansson
192798513e Move combo makefile parsing
These files may be setting variables usually defined in the
BoardConfig. This moves that setting into board_config.mk so
that the relevant variables can be made readonly.

Test: build_test
Test: diff presubmit target_files vs base cl
Change-Id: I4dab09fa67c0f2e88a8ce1402a35b4ef5f8a0560
2019-03-01 09:54:33 +00:00
Anton Hansson
72e36f0278 Modify INTERNAL_KERNEL_CMDLINE instead of BOARD_ variant
The current modification of the variable within the build system
prohibits making the variable readonly.

Test: build_test
Test: boot blueline
Change-Id: Iec6058a163b5951db389d4adc0d9d0397431efb1
2019-02-27 14:29:01 +00:00
Anton Hansson
b9544694a5 Consolidate some BoardConfig variable checks
Move a few more variable stripping/sanity checking from
config.mk to board_config.mk

Test: build_test
Change-Id: I93fde7293de38398039dbb679b2399c8a68c190d
2019-02-27 14:07:43 +00:00
Anton Hansson
71b7f7fbd0 Add support for *_CPU_VARIANT_RUNTIME flags
Specified in the BoardConfig, and default to the value of the non
_RUNTIME variants.

These flags do not modify build-time compilation, but get written to
system properties on /vendor and can be inspected at runtime to
run/compile code for the specified cpu.

Migrate the bionic and ART cpu variant flags to use the new variables,
but leave the ART preopting using the non-_RUNTIME variants.

Bug: 120773446
Test: boot downstream device specifying CPU_VARIANT_RUNTIME flags
Test: grep dalvik.vm vendor/default.prop
Change-Id: Idc81110172582f38f84cca87f2eff140c5b5f9ac
2019-02-21 14:32:13 +00:00
Treehugger Robot
bee89836c7 Merge "DAP: system_as_root can't be true." 2019-02-14 02:09:20 +00:00
Yifan Hong
f84c7e5c8f DAP: system_as_root can't be true.
Test: builds
Change-Id: I3e47e9717c983703494abc8417526caf5955d2e4
Fixes: 124274480
2019-02-13 15:08:33 -08:00
Tom Cherry
e0f3ed5cd0 Remove TARGET_ANDROID_FILESYSTEM_CONFIG_H
TARGET_FS_CONFIG_GEN has existed as the preferred mechanism for two
releases, so we finally deprecate TARGET_ANDROID_FILESYSTEM_CONFIG_H.

Test: build
Change-Id: I299a4d1d1d893ac16d6e6ce2ec4659bfcdc19095
2019-02-11 13:45:01 -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
Yifan Hong
5cc9230914 Merge "Add kernel info to compatibility.zip" 2019-01-31 19:06:19 +00:00
Dan Willemsen
a734907705 Merge "Deprecate LOCAL_MODULE_TAGS := eng/debug" 2019-01-31 18:32:16 +00:00
Yifan Hong
770ab053b0 Add kernel info to compatibility.zip
Add kernel configs / version to verified_assembled_vendor_manifest.xml
so that the kernel of the incoming package can be checked against
the framework. Previously, the running kernel was used instead.

Bug: 111125947
Test: test_extract_kernel
Test: manual OTA on Pixel 3 from build:
      Android P (kernel version 4.9.96)
      to ToT build:
      device kernel version = (manually modified) framework requirement = latest,
      PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS = true

Change-Id: Id524a58e94bdb6bba348ca461c9d33614ce451a9
2019-01-30 13:28:03 -08:00
Paul Duffin
22efcc114e Merge "Remove REMOVE_OAHL_FROM_BCP flag" 2019-01-24 16:01:40 +00:00
Logan Chien
f42823aa7c Merge "Add prebuilt ELF binaries checker" 2019-01-23 07:21:17 +00:00
Dan Willemsen
9569ddd478 Deprecate LOCAL_MODULE_TAGS := eng/debug
Uses a new BUILD_BROKEN_ENG_DEBUG_TAGS variable that defaults to true
until we mark all of the broken targets, then we'll switch it to false.

These are fairly trivial to fix, so I don't expect to keep this flag
around for long.

Test: build_test on aosp and internal master; check logs
Change-Id: I6176fec265e78aecff965b7cf1636f831f68a140
2019-01-22 20:08:12 -08:00
Paul Duffin
fd24c9fe1f Remove REMOVE_OAHL_FROM_BCP flag
The REMOVE_OAHL_FROM_BCP flag is always set to true and is no longer
necessary so this change removes any uses of the flag.

Bug: 18027885
Test: cts/tests/signature/runSignatureTest.sh
Change-Id: Ied8c3315b29094ad6acee539520af3e4c9e79839
2019-01-22 14:16:12 +00:00
Logan Chien
0e53d887d6 Add prebuilt ELF binaries checker
This commit introduces a prebuilt ELF binaries checker.  The checker
will check:

1. Whether all DT_NEEDED shared libraries are specified in
   `shared_libs` (Android.bp) or `LOCAL_SHARED_LIBRARIES` (Android.mk).

2. Whether all undefined symbols in the prebuilt binary can be resolved
   to defined symbols exported by its dependencies.

This ensures that prebuilt binaries won't silently become ABI
incompatible.

To check the prebuilt binaries, all of the dependencies must be
specified in `shared_libs` (Android.bp) or `LOCAL_SHARED_LIBRARIES`
(Android.mk).

If your prebuilt binaries cannot be checked for some reason, you may add
the following property to Android.bp:

    check_elf_files: false,

Or, add the following setting to Android.mk:

    LOCAL_CHECK_ELF_FILES := false

Bug: 119084334
Test: CHECK_ELF_FILES=true make check-elf-files
Change-Id: I523d3083f22fd4053c096d26f61f8375800281c8
2019-01-21 21:35:01 +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
Treehugger Robot
215e2c828c Merge changes I685ab841,I6ab7e488
* changes:
  Add PRODUCT_BUILD_*_IMAGE, BUILDING_*_IMAGE to control building of images
  Always package ext filesystem tools
2019-01-19 00:18:02 +00:00
Dan Willemsen
674952098b Add PRODUCT_BUILD_*_IMAGE, BUILDING_*_IMAGE to control building of images
These centralize the decisions on whether to build certain images or
not, and allow the product definition to override that choice.

There are a few use cases here:

 * For GSI-like cases, we only want to build the system image. This
   didn't really change, but it's somewhat simpler to configure, and
   easier to understand the build logic.

 * On the opposite side, when you're planning on using a GSI, the device
   specific build can only build the vendor images (or some other set).

 * Some cases (Fuchsia, etc) don't want to build any images, as they'll
   be distributing the build artifacts in their own packaging.

I suspect in the future, TARGET_BUILD_APPS may be able to be refactored
into the third use case.

Test: treehugger
Test: Create a product definition that includes nothing, try to build it.
Test: compare build-aosp_crosshatch.ninja and build-crosshatch.ninja before/after
Change-Id: I685ab841be3718d3dd7052c28ccd764bb6f1991a
2019-01-18 13:11:34 -08:00
Dan Willemsen
4a9a24481d Add PROGUARD_HOME and PROGUARD_DEPS
So that we can pass this into MAINDEXCLASSES.

Fixes: 122988865
Test: OUT_DIR=$HOME/out mmma frameworks/base/core/tests/hosttests/test-apps
Change-Id: I955d3de46d348e3573a6773f69149e7cabab8904
2019-01-17 23:04:27 -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
Treehugger Robot
d148d61ccf Merge "Deprecate USER in favor of BUILD_USERNAME" 2019-01-11 22:32:57 +00:00
Tao Bao
519d18286e Don't build retrofit OTA package if vendor.img is unavailable.
We used to build retrofit full OTA package as long as
PRODUCT_RETROFIT_DYNAMIC_PARTITIONS is true. This doesn't work with AOSP
targets that have the flag set but without any available vendor image.

This CL detects such a condition and uses a separate flag to guard the
retrofit OTA building as well as the split super images generation.

Bug: 120852744
Test: `m -j dist` on blueline (w/ vendor images) and aosp_blueline (w/o
      vendor images).
Change-Id: I65726f24f8fc546be6802941a6a06590a3804c16
2019-01-07 12:22:48 -08:00
Yifan Hong
b3f5918890 Merge "Allow devices launched with DAP to override super partition name." 2019-01-07 18:26:17 +00:00