Commit graph

1519 commits

Author SHA1 Message Date
Colin Cross
05d007ae20 Merge "Propagate USE_HOST_MUSL to Soong" am: ee20ae1a8d
Original change: https://android-review.googlesource.com/c/platform/build/+/1796674

Change-Id: Ie9c9e6ed81a70d699537131a5cd9d77c3f8eca7b
2021-08-26 05:26:46 +00:00
Colin Cross
ee20ae1a8d Merge "Propagate USE_HOST_MUSL to Soong" 2021-08-26 05:12:15 +00:00
Colin Cross
178de6308c Propagate USE_HOST_MUSL to Soong
Support enabling musl in Make builds with USE_HOST_MUSL=true.  Only
modules defined in Soong will use musl, but that's almost all host
modules.

Bug: 195988762
Test: m USE_HOST_MUSL=true adb
Change-Id: Ia88f6e20b302d86f2241877b017aebe218d968cf
2021-08-25 15:07:17 -07:00
Alexander Smundak
8fccb65188 Merge "Fix add_soong_config_namespace/add_soong_config_var macros" am: ed266e5fb8
Original change: https://android-review.googlesource.com/c/platform/build/+/1804317

Change-Id: I2cc898db10140c9a59d9b4376f812d50f147b6d8
2021-08-24 16:18:58 +00:00
Sasha Smundak
4a94bb884a Fix add_soong_config_namespace/add_soong_config_var macros
They were failing with an argument containing whitespace. That is,
calling `$(call add_soong_config_namespace, foo)` would result in
the attempt to assign to an empty variable. It went unnoticed
because `ckati` silently ignores such an assignment (`make` is
more diligent and fails).

Bug: 190051051
Test: treehugger
Change-Id: Ifcc168eaf2db725e705887889e732bcd4410db39
2021-08-20 11:18:32 -07:00
Treehugger Robot
7388ed30aa Merge "Imply ALLOW_MISSING_DEPENDENCIES for Mac builds" am: 42b072f4a7 am: f19de55328
Original change: https://android-review.googlesource.com/c/platform/build/+/1760965

Change-Id: Ib8393cc70ffa9e5cda7035fd67878287180cdfed
2021-07-09 01:56:02 +00:00
Dan Willemsen
fd224efb7f Imply ALLOW_MISSING_DEPENDENCIES for Mac builds
At least until the device builds are largely disabled and host builds
become opt-in rather than opt-out. Otherwise every host test that
depends on a linux-only library breaks the mac build, even if it won't
be used.

Bug: 187222815
Change-Id: Ic598f2b66a949b90e5b3fbebf463f28278e4834f
2021-07-08 14:26:03 -07:00
Treehugger Robot
f4d7292e02 Merge "Add 31.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS" am: 97b0ada631 am: 6b27401ca1
Original change: https://android-review.googlesource.com/c/platform/build/+/1737423

Change-Id: Ifa8965c94f08395de223c887c10e9dc52a2bdfd4
2021-06-18 11:41:43 +00:00
Treehugger Robot
97b0ada631 Merge "Add 31.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS" 2021-06-18 11:15:42 +00:00
Treehugger Robot
9dc7457b20 Merge "Remove --compatible-output=no as it is now default" am: 8d67d62e55 am: 2f58c897aa
Original change: https://android-review.googlesource.com/c/platform/build/+/1739037

Change-Id: I7a0c89754ea84b084cfadd5aaa54292dbf390ed0
2021-06-17 20:01:38 +00:00
Aurimas Liutikas
b3ca1a632f Remove --compatible-output=no as it is now default
Change-Id: I4dbc78473eda1807cfa812dc7e79f804e6dd8c9c
Test: treehugger
2021-06-17 09:13:20 -07:00
Inseob Kim
94c27efb68 Add 31.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS
Bug: 189161483
Test: m selinux_policy
Change-Id: I48b681fb28c78ea9dca922f5fb58f19a940c1a51
2021-06-16 02:25:48 +00:00
Jeff Sharkey
fcc2b97e54 platform/build/make - S is now 31
Bug: 171506470
Test: Build
Change-Id: I1f3475479659855c0185236f88bc388a61844968
2021-06-02 10:19:19 -06:00
Colin Cross
e85c66ccea Remove module-lib and system-server from TARGET_AVAILABLE_SDK_VERSIONS
module-lib and system-server are not supported in Make, remove them
from TARGET_AVAILABLE_SDK_VERSIONS.

Also replace the hardcoded test_current version with the one found in
the prebuilts.

Fixes: 185903998
Test: get_build_var TARGET_AVAILABLE_SDK_VERSIONS
Change-Id: I745fbcf019092ec27a9903c48fdb95e892c02e3e
2021-04-20 10:18:37 -07:00
Yi-Yo Chiang
f35afe97b1 Mark PRODUCT_CHECK_ELF_FILES as obsolete
Follow-up of aosp/1655468.

Bug: 149715904
Test: Presubmit
Change-Id: I3998c7356e3a41adaa00ab3d1d2c2ec66e2e37d7
2021-03-31 04:25:55 +00:00
Ulya Trafimovich
1a3b145803 Add PRODUCT_BROKEN_VERIFY_USES_LIBRARIES.
If set to true, it disables <uses-library> checks for a product. It is
possible to override with environment variable RELAX_USES_LIBRARY_CHECK
on the command-line.

Per product configuration is needed rather than per board configuration
(such as BUILD_BROKEN_* variables) because of the specifics of
<uses-library> checks: they depend on the product packages list, and
not on the board config.

One example of a product family that needs to disable the checks are
the SDK builds (e.g. sdk_gphone_x86_64), see b/183339664.

Bug: 183339664
Bug: 132357300
Test: treehugger
Change-Id: Ia58559e4e70163da94e9eb7b8a6133e0cbecd459
2021-03-23 12:36:24 +00:00
Martin Stjernholm
786bbea407 Include android_soong_config_vars.mk in the make (kati) step.
Test: `m nothing` with https://r.android.com/1592872
Bug: 172480615
Change-Id: I960cd234a5dd607f4f5af6bb68ae15b9bd104e7a
2021-03-01 23:14:10 +00:00
Treehugger Robot
c66465a4b0 Merge "Add non-fatal mode for verify_uses_libraries check." 2021-02-23 20:45:42 +00:00
Ulya Trafimovich
5a09c2084d Add non-fatal mode for verify_uses_libraries check.
The new mode is enabled with environment variable
RELAX_USES_LIBRARY_CHECK. If the variable is set to true, then a
verify_uses_libraries check failure does not fail the build, instead it
sets a special compiler filter "extract" for dexpreopt, which means that
the DEX file will be extracted, but it won't be compiled to native code.
Class loader context will be set to empty in this case (not &, as it is
going to be deprecated soon).

If the variable RELAX_USES_LIBRARY_CHECK is unset or set to something
other than "true", then the old behaviour of the verify_uses_libraries
check is preserved.

The intended use case for this flag is to have a smoother migration path
for the Java modules that need to add <uses-library> information in
the build files. The flag allows to quickly silence build errors. This
flag should be used with caution and only as a temporary measure, as it
masks real errors and affects performance.

verify_uses_libraries check is reworked so that it writes the error
message to a status file (which is used instead of the former timestamp
file). Currently the stored error message is not used, but it may be
used later to produce a warning. Dexpreopt command checks if the status
file exists and is nonempty; if that is the case, then compiler filter
is set to "extract".

Bug: 132357300

Test: Manually add some mismatch between the libraries in the Android.bp
      and Android.mk files for dexpreopted apps, build with
      RELAX_USES_LIBRARY_CHECK=true and obsserve that the build doesn't
      fail and they are compiled with compiler-filter "extract".
      Unset RELAX_USES_LIBRARY_CHECK and observe that the build fails.

Change-Id: Ie1a6298c4dba2f368ca9ac8b9fee2de0a26e68e8
2021-02-22 14:49:47 +00:00
Timi
baada2ad67 Remove extra dot from depreceation, obsoletion warnings
Remove extra dot from depreceation and obsoletion warnings to be consistent.
Changes
 x: warning: BOARD_PLAT_PUBLIC_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead..
to
 x: warning: BOARD_PLAT_PUBLIC_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead.

Test: m
Change-Id: I60a4258e549570e261252cffee69e5640f62295e
Signed-off-by: Timi <timi.rautamaki@gmail.com>
2021-02-21 15:26:00 +01:00
Bill Peckham
e3cf60911a Enable prebuilt hiddenapi CSV files.
By enabling these hiddenapi CSV files to be prebuilt, it
becomes possible to create a split build that supports
the hiddenapi encode dex step, but doesn't contain all
of the java sources needed to generate the CSV files.

Bug: 175048716
Test: m nothing
Test: new TestHiddenAPISingletonWithPrebuiltCsvFile
Test: local build without prebuilt hiddenapi
Test: local build with prebuilt hiddenapi
Change-Id: Ia38c5016d2aeba54aa537a5ce601898d46330730
2021-01-16 22:07:40 +00:00
Inseob Kim
2e88158571 Revert^2 "Always turn on compatible property"
This reverts commit facfb54ee4.

Reason for revert: Fixed broken targets

Change-Id: Ia713b08cf15fd356494984964a1e61eaa9991266
2020-11-19 09:48:49 +00:00
Inseob Kim
facfb54ee4 Revert "Always turn on compatible property"
This reverts commit 9994e96c7d.

Reason for revert: broken targets on the internal branch

Change-Id: Ic440fb1ca6ae5774a1d51e8fe1f3724426511841
2020-11-18 11:04:17 +00:00
Inseob Kim
9994e96c7d Always turn on compatible property
It's mandatory for devices launching with Android P or later.
Some makefiles still depend on PRODUCT_COMPATIBLE_PROPERTY, so rather
than aggressively removing all codes, this forces
PRODUCT_COMPATIBLE_PROPERTY to be true.

Bug: 170082975
Test: m
Change-Id: I49dab8d573c21781e6295a8581a5ad2944e165d7
2020-11-17 10:00:40 +00:00
Gao Xiang
961041ac80 Allow flashing erofs system imgs
Bug: 158339527
Test: build & boot
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Change-Id: Ie74db8ebcd7214ffbec49d42b305b2f3ac2e8c9d
2020-10-28 01:24:39 +08:00
Treehugger Robot
fd8dae609f Merge "Revert "Remove env-var-allowlist"" 2020-10-20 19:58:46 +00:00
Daniel Norman
6a93af91dc Merge "Removes usage of TARGET_NO_VENDOR_BOOT." 2020-10-20 17:18:01 +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
Daniel Norman
ad6293c098 Removes usage of TARGET_NO_VENDOR_BOOT.
- true -> PRODUCT_BUILD_VENDOR_BOOT_IMAGE=false
- false -> (removed, uses default option which builds vendor-boot.img
            if BOARD_BOOT_HEADER_VERSION>=3)

Bug: 170423509
Test: Inspect build artifacts from treehugger.
Change-Id: Id16fbda7fdfc70d62db389d6efb5201cb0d6d4e3
2020-10-16 15:10:21 -07: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
Felix Elsner
d7df770c4a soong_config: Support SYSTEM_EXT* sepolicy vars
The new variable name reflects its actual usage.

Keep compatibility with BOARD_PLAT_* because it has been a
convention for years. Also add warning messages for BOARD_PLAT_*
variables via KATI_deprecated_var.

Test: `make selinux_policy` with
      `SYSTEM_EXT_{PUBLIC,PRIVATE_SEPOLICY_DIRS}` set,
      observe additions in `$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/selinux`

Signed-off-by: Felix Elsner <google@ix5.org>
Change-Id: I58c64839cc513ae082cd3ee3c1e108843ea7439e
2020-10-07 15:56:52 +08:00
Yifan Hong
4e501b58b8 Merge "Revert "Add modules partition."" 2020-09-16 22:45:54 +00:00
Yifan Hong
c08cbf0f4a Revert "Add modules partition."
Revert submission 1413808-modules_partition

Reason for revert: modules partition no longer needed
Reverted Changes:
Iceafebd85:Add modules partition
I2fa96199a:rootdir: Add modules directory
Ie397b9ec6:Add modules partition.
I4200d0cf5:fastboot: add modules partition

Bug: 163543381

Change-Id: Iec1d9421bbfeb114fb705f85d910c6def1f211b6
2020-09-15 19:09:26 +00:00
Yifan Hong
b1e66600c0 Merge "Add modules partition." 2020-09-11 00:25:24 +00:00
Yifan Hong
c0f187f5f9 Add modules partition.
Modules partition is a dynamic read-write partition.
- AVB is not enabled on the partition
- OTA is file-based; see follow up CL for details
- No build prop files; in particular, no build fingerprint
- No fs_config
- No notice files; notice files are included in individual APEXes

Test: build on CF
Bug: 163543381

Change-Id: Ie397b9ec61dfd1c158450d050196024604854d4d
2020-09-09 15:00:02 -07:00
Treehugger Robot
dc7ff33e38 Merge "Set PRODUCT_PRODUCT_VNDK_VERSION from product_config.mk" am: 6a052b1118
Original change: https://android-review.googlesource.com/c/platform/build/+/1420908

Change-Id: I22f04a976e81f73523a42829b862c02692d55b00
2020-09-08 04:47:54 +00:00
Justin Yun
70f7dbaf21 Set PRODUCT_PRODUCT_VNDK_VERSION from product_config.mk
As a product variable, PRODUCT_PRODUCT_VNDK_VERSION cannot be defined
in config.mk. Instead it can be defined from product_config.mk.

Bug: 144534640
Test: check if the following command returns empty value
      $ PRODUCT_USE_PRODUCT_VNDK_OVERRIDE=false \
        get_build_var PRODUCT_PRODUCT_VNDK_VERSION
Change-Id: I304fb980610aec1dd5da05864b4c137997fc9aff
2020-09-07 19:29:45 +09: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
Jeongik Cha
0d1d98157a Introduce BOARD_CURRENT_API_LEVEL_FOR_VENDOR_MODULES
If BOARD_CURRENT_API_LEVEL_FOR_VENDOR_MODULES has a numeric value,
it replaces "current" or "system_current" with the version which
the flag indicates.

Bug: 163009188
Test: BOARD_CURRENT_API_LEVEL_FOR_VENDOR_MODULES=29 m, and then check if every vendor
java module's sdk_version is 29 if its sdk_version was current.

Change-Id: I8c7cf21563b984b8e9ef398192031b1f66d96494
2020-08-24 23:16:19 +09:00
Dan Willemsen
1a9ee40547 Merge "Reland "Move some prebuilt build tool configs to Soong"" 2020-08-12 14:48:08 +00:00
Pirama Arumuga Nainar
6552424ff9 Merge "[config_sanitizers] Fail if LOCAL_SANITIZE_BLACKLIST is used." 2020-08-11 21:23:56 +00:00
Pirama Arumuga Nainar
1ac5384aaf [config_sanitizers] Fail if LOCAL_SANITIZE_BLACKLIST is used.
All uses of this property have been migrated to
LOCAL_SANITIZE_BLOCKLIST.

Update language to comply with Android’s inclusive language guidance

See https://source.android.com/setup/contribute/respectful-code for
reference

Bug: 161896447
Bug: 162245450

Test: Add the old property to an Android.mk and ensure error is thrown.
Change-Id: I797ff651f03b954b410f76f4d201a962ded717df
2020-08-11 11:00:53 -07:00
Dan Willemsen
a3f6632de9 Remove obsolete PDK build functionality
This hasn't worked for a couple years, and continues to bitrot. Just
remove it.

Test: treehugger
Change-Id: Iea6caf3c08252a560155e095135c5ddaad712991
Merged-In: Iea6caf3c08252a560155e095135c5ddaad712991
2020-08-11 01:12:01 +00:00
Dan Willemsen
fd72f7f3ac Reland "Move some prebuilt build tool configs to Soong"
Now that they're defined with prebuilt_build_tool, we don't need to set
them here.

In future changes we can replace more of these definitions with
prebuilt_build_tool, as it can centralize the selection of
build-from-source or prebuilt for Make, Soong, and user-defined
genrules.

Test: treehugger
Change-Id: I5821bbad1b655d561919245320d7c184a6eac737
2020-08-07 13:40:10 -07:00
Jeongik Cha
f26015449f Unset ENABLE_PREOPT when DISABLE_PREOPT is set
Instead of TARGET_BUILD_APPS, introduce DISABLE_PREOPT,
which is true when TARGET_BUILD_UNBUNDLED_IMAGE or TARGET_BUILD_APPS is set.

Test: TARGET_BUILD_UNBUNDLED_IMAGE=true m vendorimage and then
      check if there is no preopt
Bug: 160390776

Change-Id: Id27030e602a29ebd438678270db13744dd145143
2020-08-04 10:39:57 +09:00
Jeongik Cha
d05b57a362 Introduce TARGET_BUILD_UNBUNDLED_IMAGE
- TARGET_BUILD_UNBUNDLED_IMAGE is similar to TARGET_BUILD_APPS, but
its targets are the unbundled partitions instead of apps.
- Rename TARGET_BUILD_APPS_USE_PREBUILT_SDK to TARGET_BUILD_USE_PREBUILT_SDKS
because it is used even without TARGET_BUILD_APPS.
-Instead of TARGET_BUILD_APPS, use TARGET_BUILD_USE_PREBUILT_SDKS
to build java modules with prebuilt sdks, and propagate to Soong.

Bug: 160390776
Test: TARGET_BUILD_UNBUNDLED_IMAGE=true m vendorimage
Change-Id: Ie096212ccbcca0018baae55e106af693b002c9e5
2020-08-03 15:47:09 +09:00
Kiyoung Kim
c8343a3f0e Merge "Deprecate VNDK-Lite" 2020-07-28 00:36:10 +00:00
Bill Peckham
48ae71a6f0 Export TARGET_ENABLE_MEDIADRM_64 to Soong.
The change enables conversion of
hardware/interfaces/drm/1.0/default from make to Soong
by exporting a variable used in a conditional check by
the modules in that directory.

Bug: 161571531
Bug: 123557988
Test: Build with TARGET_ENABLE_MEDIADRM_64 :=
Test: Build with TARGET_ENABLE_MEDIADRM_64 := true
Test: Insepction of out/soong/soong.variables for each
Test: Inspection of target files package for each
Test: Verify inclusion of modules in vendor snapshot
Change-Id: I5737d9d4687e182595a213be000b2e56c7536b8a
2020-07-23 20:57:22 +00:00
Kiyoung Kim
7ae3ce79aa Deprecate VNDK-Lite
Android S would not support upgrade from O-MR1 devices, so VNDK Lite
configuration is no more valid. This change removes all VNDK-Lite
related steps and makr BOARD_VNDK_RUNTIME_DISABLE as deprecated
variable.

Bug: 158719241
Test: m -j passed
Change-Id: Ifb355da936933843862426e7ddfce9c7f69cea61
Merged-In: Ifb355da936933843862426e7ddfce9c7f69cea61
2020-07-20 05:39:29 +00:00
Yifan Hong
76a337f65e Add odm_dlkm partition. am: f496f1b94f am: 4f2ea25d5f
Original change: https://android-review.googlesource.com/c/platform/build/+/1363859

Change-Id: I4aaa3967e889923f0958afaa3227474176e36ea9
2020-07-17 22:52:14 +00:00