Commit Graph

5787 Commits

Author SHA1 Message Date
TreeHugger Robot 0618d4e9ec Merge changes from topic "revert-15071196-init_first_stage_soong-GBJXQRPEKC" into sc-dev
* changes:
  Revert "Add install_in_root to cc_binary"
  Revert "Add ramdisk_available to sysprop_library"
  Revert "Fix ndk and aml arch order"
2021-07-07 03:02:00 +00:00
Inseob Kim c5fe044474 Revert "Add install_in_root to cc_binary"
Revert "Add ramdisk_available to init_first_stage's deps"

Revert submission 15071196-init_first_stage_soong

Reason for revert: fixes b/192248690
Reverted Changes:
I23cf4f975:Add ramdisk_available to init_first_stage's deps
Icd98c7e24:Add ramdisk_available to init_first_stage's deps
If9da9ba16:Add ramdisk_available to init_first_stage's deps
Ibc8668029:Add ramdisk_available to init_first_stage's deps
I3b4b8c475:Add ramdisk_available to init_first_stage's deps
I59cd149e0:Completely migrate init first stage to Soong
I36d789578:Add ramdisk_available to init_first_stage's deps
I2a0daa612:Add BUILD_USES_RECOVERY_AS_BOOT to soong config
Ic76c325ce:Directly create ramdisk dirs in ramdisk image rule...
I4c5374deb:Add BOARD_BUILD_SYSTEM_ROOT_IMAGE to config vars
I8aab5faf3:Add ramdisk_available to init_first_stage's deps
I9d5a10661:Add ramdisk_available to init_first_stage's deps
Iaa2edeb4a:Add ramdisk_available to init_first_stage's deps
I7cb582ca0:Update init_first_stage
I06091d15e:Add ramdisk_available to init_first_stage's deps
I8bdb8dda3:Add ramdisk_available to init_first_stage's deps
I7436b8dd1:Add ramdisk_available to init_first_stage's deps
I39693fd86:Add ramdisk_available to init_first_stage's deps
I0a9ba90f0:Add ramdisk_available to init_first_stage's deps
Ib66b4c4ea:Add ramdisk_available to init_first_stage's deps
I31ce63d23:Add ramdisk_available to init_first_stage's deps
Icb580f97c:Add ramdisk_available to init_first_stage's deps
I044a075b7:Add ramdisk_available to init_first_stage's deps
I33164a7e7:Fix ndk and aml arch order
Ib8d92904a:Add ramdisk_available to sysprop_library
Ibc3516453:Add install_in_root to cc_binary

Change-Id: I3f48a1bee726c7c2b38c9bdc501b2a32337eaab7
2021-07-01 06:50:40 +00:00
TreeHugger Robot 0e4f95a656 Merge "Switch to clang-r416183b1" into sc-dev 2021-06-25 03:15:49 +00:00
Inseob Kim a66e2b2cba Merge changes from topic "init_first_stage_soong" into sc-dev
* changes:
  Fix ndk and aml arch order
  Add ramdisk_available to sysprop_library
  Add install_in_root to cc_binary
2021-06-24 23:21:02 +00:00
Pirama Arumuga Nainar 088205a050 Switch to clang-r416183b1
Bug: http://b/189328402

This contains a fix to AArch64 __clear_cache.

Test: TH + Manual verification by emulator team.
Change-Id: Iff1064df8361163a6828b01256d5a7950f618652
Merged-In: Iff1064df8361163a6828b01256d5a7950f618652
(cherry picked from commit 3e54508a3a83eef2c8265192e232196a6572b31f)
2021-06-24 16:18:26 -07:00
TreeHugger Robot ffc9ae993a Merge "Propagated srcs from cc_defaults to cc_prebuilt_library_shared." into sc-dev 2021-06-24 00:18:56 +00:00
Yu-Chi Cheng 24b2b0fd0c Propagated srcs from cc_defaults to cc_prebuilt_library_shared.
Bug: 191185522
Test: verified on local P21 devices.
Change-Id: I3bab7144213934f6832000793ee6cbc49abd3beb
2021-06-23 15:56:39 -07:00
Evgenii Stepanov e57ca4ccc3 Disable ubsan diagnostics under HWASan.
This is a workaround for a compiler bug that makes this combination
extremely slow to build.

Bug: 191808836
Test: m net_test_btm_iso with SANITIZE_TARGET=hwaddress
Merged-In: Ide7436bbc564413cb2f29355ada5286976607205
Change-Id: Ide7436bbc564413cb2f29355ada5286976607205
(cherry picked from commit b15a564869dada75d78f72489fc50138cd314764)
2021-06-23 15:06:00 -07:00
Inseob Kim f75c415810 Add install_in_root to cc_binary
To support init_first_stage, install_in_root property is added to
cc_binary. The output is installed to {partition}, rather than
{partition}/{mount_point}/bin.

Bug: 187196593
Test: build init_first_stage
Change-Id: Ibc351645308676ed188f748972eb6312c9cbd64f
Merged-In: Ibc351645308676ed188f748972eb6312c9cbd64f
2021-06-23 04:31:54 +00:00
Pirama Arumuga Nainar 19a5aae35e [cc/pgo] Mark pgo.sampling property as an arch-variant
Bug: http://b/189438896

This allows disabling sampling PGO for some arches.

Test: Build this topic.
Change-Id: Ib6ddca6685c2e53092afd440ad95ec42d3a9538b
2021-06-16 22:01:41 -07:00
Pirama Arumuga Nainar 28bc9698ef Mark more fields in BaseLinkerProperties as arch variant
Bug: http://b/189438896

This allows setting a different version script for vendor and
platform variants.

Test: The following blueprint snippet builds:
      target: { android_arm64: {
        target: vendor: {
            version_script: "..." } } }
(cherry picked from commit 250c5217a264fb3bd53f02339d0b382d70da3fee)
Change-Id: Id0df2e89f87fb2b19e71d529cf00727e6b80b1c7
Merged-In: I47e7afeaee3c9124f4231bf0eece7b6844b5313d
2021-06-15 14:28:26 -07:00
Jooyung Han f8b55cd51e Merge "Interpret CRT object's min_sdk_version with ApiLevel" into sc-dev 2021-06-09 11:18:11 +00:00
Jooyung Han 37c219a1ec Interpret CRT object's min_sdk_version with ApiLevel
min_sdk_version values should be interpreted before use.

Bug: 171506470
Bug: n/a
Test: m (in REL)
Merged-In: Ia45f5c7aeb4efcd8daef1deaf54f333dcdd1379d
Change-Id: Ia45f5c7aeb4efcd8daef1deaf54f333dcdd1379d
(cherry picked from commit 94a76ee86883d2f11a064ce8bd2da226136c6bd3)
2021-06-09 09:53:53 +09:00
Yi-Yo Chiang 0de94db394 cc/sabi.go: Propagate ShouldCreateSourceAbiDump to reuseObjTag deps
`reuseObjTag` is a dependency from the shared variant of a `cc_library`
to the static variant. When such dependency exist, the shared variant
would reuse the object files of the static variant.
Thus if the shared variant requires ABI dump, then the static variant
would need to generate ABI dump as well.

Bug: 190339664
Test: m findlsdump
Change-Id: I015328d74acbeb89ff7622397e59b68864af34a4
Merged-In: I015328d74acbeb89ff7622397e59b68864af34a4
(cherry picked from commit 21d1c6d637deca8b4a5757ea1f30a45a29131b97)
2021-06-08 15:53:46 +08:00
Colin Cross f58e5e8f24 Merge "Don't propagate ASAN through shared library dependencies" into sc-dev 2021-06-01 17:24:09 +00:00
Colin Cross 58b783b460 Remove unused cc.copyDirectlyInAnyApexDependencyTag
Bug: 183759446
Test: go test ./build/soong/cc
Change-Id: I967f5c42cbf7722843a6455cbc2867a8912033cb
Merged-In: I967f5c42cbf7722843a6455cbc2867a8912033cb
(cherry picked from commit 243f3c250e46ec48640c7f1e71ab1f16372e055c)
2021-05-27 13:13:17 -07:00
Jiyong Park 59fa1e4b7f Merge "Update VndkMustUseVendorVariantList after aidl-freeze-api" into sc-dev 2021-05-25 22:43:41 +00:00
Justin Yun acd459728a Do not filter LLNDK lib from llndk.libraries.txt
llndk.libraries.txt is used to list the LLNDKs for the linkerconfig.
This is also required to define the VNDK snapshot modules of LLNDK
stub libraries.
The list had a filter for hwasan libraries, but the filter must be
used only for the LLNDK_LIBRARIES make variable, but not for the
llndk.libraries.txt file.

Bug: 189070366
Bug: 188716508
Test: m nothing
Test: LLNDK_LIBRARIES in make_vars-*.mk does not include hwasan.
Change-Id: I820dd1161892dc76700aa1d696ea2643764d2052
Merged-In: I820dd1161892dc76700aa1d696ea2643764d2052
(cherry picked from commit 611e886ca73cdab96aaff32b5ff1f86222951dff)
2021-05-25 13:29:48 +09:00
Jiyong Park c110a43b92 Update VndkMustUseVendorVariantList after aidl-freeze-api
Bug: 188713899
Test: m
Change-Id: Ib1287208a1c6cfc40e4c01617b64ce05c6c88f6e
2021-05-24 23:51:19 +09:00
TreeHugger Robot 5ff8e3f567 Merge changes from topic "far-dep-exists" into sc-dev
* changes:
  Check for product variant in addition to core variant.
  Plumb through OtherModuleFarDependencyVariantExists from blueprint.
2021-05-22 12:54:47 +00:00
Pirama Arumuga Nainar dcabea581c [cc/coverage] Define a macro during coverage builds
Bug: http://b/186576313

During a coverage build, pass the __ANDROID_CLANG_COVERAGE__ macro to
native compilations.  This allows tools like dalvikvm and dex2oat, which
would otherwise call _exit(), to write profiles on coverage builds by
calling exit() instead.

Test: `m CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS="art" nothing`
          and check compiler flags in out/soong/build.ninja.
Change-Id: I18315b89170abdd650e4c6c55577688348c42225
(cherry picked from commit 551b06d9e69066baf1b621b20d4b838ac2f28902)
2021-05-21 13:48:41 -07:00
Martin Stjernholm f7a62e6c73 Merge changes I4e7a7ac5,I0c73361b into sc-dev
* changes:
  Record the actual APEXes that a module is part of.
  Rename InApexes -> InApexVariants
2021-05-21 19:22:15 +00:00
Bill Peckham 8f37844151 Check for product variant in addition to core variant.
It's possible that a module will have a product variant
but not a core variant. In that case, we still need to
apply the vendor suffix to the androidmk module name.

Bug: 188720375
Bug: 187963715
Test: Build vendor image using vendor snapshot.

Change-Id: I190fdd707ca23357d1c324c1b1f3318457625f03
Merged-In: I190fdd707ca23357d1c324c1b1f3318457625f03
(cherry picked from commit 4016d7b53e70bdf53dfdc93c8a7969f70fe2eb05)
2021-05-21 11:44:45 +09:00
Justin Yun a42f005bd1 VNDK snapshot may provide LLNDK stub libraries
VNDK snapshots newer than v30 have LLNDK stub libraries. In that
case, the vendor variant for the BOARD_VNDK_VERSION must not be
generated from the LLNDK modules. They are already provided by the
VNDK snapshots.
Generate the vendor variant of the BOARD_VNDK_VERSION only if
BOARD_VNDK_VERSION has an integer value less than or equal to 30.

Bug: 187963715
Bug: 181815415
Test: m nothing
Change-Id: I31e90f4d7e7678c45558f6bf987f5582a4c34f78
Merged-In: I31e90f4d7e7678c45558f6bf987f5582a4c34f78
(cherry picked from commit dee806fd094c81515aa9ec88efd0f594a057afb0)
2021-05-21 08:30:07 +09:00
Jiyong Park 712e8b5b1b Rename InApexes -> InApexVariants
.. in preparation for the upcoming change. This change doesn't alter any
behavior.

InApexes is a misleading name. People expects that it has the list of
soong module names of the APEXes that a module is part of. So, for
example, `core-oj` is a part of both `com.android.art` and
`com.google.android.art`. However, in reality, that's not true. The
field has `com.android.art` only. This is because the two APEXes
(android and Google) have the same apex name which is `com.android.art`.
That apex name is used in various places like the `apex_available` and
allows us to keep using the same name regardless of whether the APEX is
overridden or not.

However, this is causing problems in some cases where the exact list of
soong module names is required. The upcoming change will add a new field
to handle the case and the new field actually will get the name
'InApexes'. So, the existing field is renamed to a less misleading name
`InApexVariants`.

Cherry-picked from https://r.android.com/1710528.

Bug: 180325915
Test: m nothing

Change-Id: I0c73361b452eddb812acd5ebef5dcedaab382436
Merged-In: I0c73361b452eddb812acd5ebef5dcedaab382436
2021-05-20 17:36:22 +01:00
Luke Huang 0573b316d3 Fix the apex compatible issue on the platform Q
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1710971

Bug: 187907243
Change-Id: If81c03e8d828cb9e421e48d887b06d5e7ab37d5f
(cherry picked from commit 0c96eb74e228c80881bc2ccbcf2a9d2df9643bc5)
Merged-In: I9aceb7ba33baa23d193a6d554e7892a5d5f0effa
2021-05-20 12:53:22 +00:00
Colin Cross 3aec9423fe Don't propagate ASAN through shared library dependencies
Propagating enabling ASAN through shared library dependencies
doesn't make much sense, because only the non-ASAN variant is exposed
to Make, leading to an non-installed dependency.

Bug: 186487510
Test: TestAsan
Change-Id: I7d3f20f2d10beac09c66c6b6dcb7a34a513ff3b8
Merged-In: I7d3f20f2d10beac09c66c6b6dcb7a34a513ff3b8
(cherry picked from commit af98f58242c043b2f96dd6f415b18354af06b473)
2021-05-18 12:27:25 -07:00
TreeHugger Robot 2ca5b08593 Merge "Define vsr_min_shipping_api_level to cc_test" into sc-dev 2021-05-18 00:42:08 +00:00
Elliott Hughes 0e9cdb04df cc/linker.go: check min_sdk_version.
Checking sdk_version broke mainline code that compiles against a current
API level but needs to be able to run on an older API level.

Bug: http://b/187907243
Test: treehugger
Change-Id: If1192ef2809e39b043f0a384775b6c9e3a8bd619
2021-05-17 17:52:26 +00:00
Justin Yun 9876ffa7b3 Define vsr_min_shipping_api_level to cc_test
test_options in cc_test can have vsr_min_shipping_api_level to define
the minimum shipping api level that checks vendor api level in
addition to the device shipping api level. It can be used for the
tests that have dependency on the vendor api level.
vsr stands for the vendor software requirements.

Bug: 181284704
Test: manual test
Change-Id: I7f2cecd2818d35d86f7c08cb220e0c9db71fe0a8
Merged-In: I7f2cecd2818d35d86f7c08cb220e0c9db71fe0a8
(cherry picked from commit a364cfb69d3c5a3660bc4b19e40b4cd916496682)
2021-05-17 09:30:10 +09:00
Bill Peckham a7eec840cc Merge "Fix missing headers for vndk snapshotted libc" am: 054619d198 am: a1ae5530cb am: 94f308c04a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1708168

Change-Id: I7aa49e3be1ca027ef6a16c8cd3c1b378eb512575
2021-05-14 18:21:23 +00:00
Colin Cross 25c60df217 Merge "Add order-only dependency on shared libraries" am: 9debc21ca3 am: 78894a5ab0 am: 690de6069b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1707986

Change-Id: Id03071cc3809d0c4212839f6be3fec547ae3a61c
2021-05-14 18:19:52 +00:00
Bill Peckham 054619d198 Merge "Fix missing headers for vndk snapshotted libc" 2021-05-14 16:52:11 +00:00
Colin Cross 9debc21ca3 Merge "Add order-only dependency on shared libraries" 2021-05-14 16:48:57 +00:00
Inseob Kim cc12d90753 Fix missing headers for vndk snapshotted libc
VNDK snapshot depends on addExportedGeneratedHeaders to grab generated
headers. This change adds a missing addExportedGeneratedHeaders call to
make libc's headers captured correctly.

Bug: 181326838
Test: VNDK_SNAPSHOT_BUILD_ARTIFACTS=true m dist vndk && unzip -l
out/dist/*.zip

Change-Id: Iaa89b5255c836761a26c77bb27f35f768f49039e
2021-05-14 20:15:55 +09:00
Colin Cross 58dd6a92e5 Add order-only dependency on shared libraries
Improve the dependency accuracy by adding an order-only dependency
on the shared library alongside the existing depenency on the
table of contents file.  The dependency won't cause the module
to be rebuilt when the the shared library changes, but will allow
anything using the ninja graph for sandboxing to know the dependency
exists.

Test: manual
Change-Id: I3accbcabee62fa0ad3eb3d1aaedc5a4bffe27308
2021-05-13 18:01:24 -07:00
Treehugger Robot 0290f6e772 Merge "Soong: check if lndk is needed for apex build" am: ef0439d969 am: 2a4deaaf6d am: 7a89365bc1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1705069

Change-Id: Iaf8d854ab9548591698c1e8240a26124d904a268
2021-05-13 23:23:58 +00:00
Zhijun He ec2858799b Soong: check if lndk is needed for apex build
This is to fix the unnecessary dependencies inclusion
when building apex modules.

Test: Build
Bug: 186306595
Change-Id: I1f3bbdb0a1f97a8338b45ca29c92acf9b20eadd3
2021-05-13 14:04:45 -07:00
Jingwen Chen 8e27e6c226 Merge "bp2build: build //external/scudo/..." am: ccfd7fc939 am: 58344f0391 am: 1c7591cfb9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1704771

Change-Id: I3665975d656141f7919cce5d80eff25ea7edc9d4
2021-05-13 13:23:04 +00:00
Jingwen Chen ccfd7fc939 Merge "bp2build: build //external/scudo/..." 2021-05-13 12:19:43 +00:00
Jingwen Chen d17bb43fe1 Merge "bp2build: export some cc toolchain flags into Starlark." am: 1d35a87072 am: 138b60595c am: a7e79646d3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1698426

Change-Id: Iac3a24bb6a528b1281465ed4a354c95ea01e4a59
2021-05-13 11:29:09 +00:00
Jingwen Chen 1d35a87072 Merge "bp2build: export some cc toolchain flags into Starlark." 2021-05-13 10:31:54 +00:00
Paul Duffin b964b24a51 Merge "Allow module types to force creation of a default APEX variant" am: 9896b3424b am: 05ca6f6919 am: 5c45498964
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1705263

Change-Id: I4365d9d1dfbfcd8bf9aa3f6381ec9470b7ff9921
2021-05-13 09:06:26 +00:00
Paul Duffin 9896b3424b Merge "Allow module types to force creation of a default APEX variant" 2021-05-13 08:07:19 +00:00
Jingwen Chen 75be1cae8f bp2build: build //external/scudo/...
Test: TH
Fixes: 187158841
Change-Id: I73c1d8fe075d2534c2389973b9381405d9389044
2021-05-13 06:25:49 +00:00
Jingwen Chen bf61afb7f7 bp2build: export some cc toolchain flags into Starlark.
This CL exports common/global/device/host clang/ld/ldd flags
from their Ninja variable initialization locations in
cc/config/global.go and cc/config/clang.go to make Bazel's cc_toolchain
and Soong's cc actions more consistent with each other.

This does not handle env-dependent or arch-specific toolchain flags
yet (logic in compiler.go and linker.go).

Test: TH
Bug: 187086342
Bug: 187084737
Bug: 186628704
Bug: 187857770
Change-Id: Ie403d7cd23f35160897b9dd902c799cbf1bd7f0c
2021-05-13 06:25:47 +00:00
Ivan Lozano a072c5ae56 Merge "Refactor vendor snapshot to use LinkableInterface." am: 7ce2dee09e am: 61c475060a am: 001c11e93a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1680606

Change-Id: Ifff15886dba6bda0754d086456a1db3b7524e4ed
2021-05-12 21:13:41 +00:00
Ivan Lozano d7586b6526 Refactor vendor snapshot to use LinkableInterface.
Refactors the vendor snapshot support to use the LinkableInterface
so that support can be extended to Rust. This CL does not add
vendor snapshot support for Rust; that is left for a follow-on CL.

Bug: 184042776
Test: m nothing
Change-Id: Id0c4970ca00053484a52677d182153cbc454c301
2021-05-12 14:01:10 -04:00
Paul Duffin b5769c15a3 Allow module types to force creation of a default APEX variant
Bug: 187910671
Test: m droid
Change-Id: I797d4ab60d15b526744fe6e4df1b55c8b75b0310
2021-05-12 16:16:51 +01:00
Jingwen Chen 0bf1dcc16a bp2build: remove libc_tzcode from denylist. am: 3950cd6ed4 am: 2700ace254 am: 19c563ed78
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1704770

Change-Id: I2c0f87fb73c124d54db0e4a36c9c8e7b8841ee88
2021-05-12 13:18:56 +00:00