Commit Graph

6123 Commits

Author SHA1 Message Date
Colin Cross
4f9d8d6482 Merge "Revert "Split asm and c flags and srcs in bp2build output"" 2021-05-25 15:21:36 +00:00
Colin Cross
52aa4e1fd4 Revert "Split asm and c flags and srcs in bp2build output"
Revert submission 1714835-roboleaf-asm-c

Reason for revert: TestCcLibraryStaticProductVariableSelects fails everywhere
Reverted Changes:
I28cf7437e:Split asm and c flags and srcs in bp2build output
I2b47e6b55:Split libraries by language in cc_library_static

Change-Id: I85d39a462f0a5b3f5ff3d685906813fab9f01358
2021-05-25 15:20:39 +00:00
Christopher Parsons
ed73b76513 Merge "Split asm and c flags and srcs in bp2build output" 2021-05-25 14:58:32 +00:00
Liz Kammer
2222c6bb42 Combine bp2build handling of static/shared props
Test: go test soong tests
Change-Id: I793f88bcbad2cdee042c6b2d17104e9ca03602b9
2021-05-25 08:28:43 -04:00
Justin Yun
c6cdef06dc Merge "Do not filter LLNDK lib from llndk.libraries.txt" am: 708984efbe am: 31353efea4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1716574

Change-Id: I8ea965904c83cde39ea7b8c4638b9316e9569ac2
2021-05-25 05:10:59 +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 611e886ca7)
2021-05-25 13:29:48 +09:00
Justin Yun
708984efbe Merge "Do not filter LLNDK lib from llndk.libraries.txt" 2021-05-25 04:21:54 +00:00
Chris Parsons
af24cdd99f Split asm and c flags and srcs in bp2build output
This allows removal of almost all current items from the mixed build
denylist, which were previously broken due to being unable to separately
control flags for compilations of different languages within the same
target.

Note that this does not appropriately implement asm/c srcs and flags for
either the shared variant or the static variant. This will require a
followup.

Test: bp2build.sh and mixed_libc.sh CI scripts
Test: Updated b2build tests

Change-Id: I28cf7437ee96cdf2fdbcb1eda2303691cff08ba4
2021-05-24 21:49:14 -04:00
Treehugger Robot
b507c380d2 Merge "Handle product config vars in bp2build." am: d01a80869d am: c62327ebf8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1698529

Change-Id: Iba303087148c275c227a4cfc98296011f5bcb84c
2021-05-24 22:58:43 +00:00
Liz Kammer
6fd7b3fee9 Handle product config vars in bp2build.
Test: bp2build ci  & mixed build libc
Bug: 183595873
Change-Id: I2d87434ff4df5a24efc5e3e38f087de035228934
2021-05-24 14:22:31 -04: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
Justin Yun
611e886ca7 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
2021-05-24 20:44:44 +09:00
Christopher Parsons
5fa630590e Merge "Propagate unexported deps via implementation_deps" am: dbfafc0a3c am: 5166c5a9b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1711041

Change-Id: I076d42f013a4554178c7d5660744dea0773381b9
2021-05-22 19:27:53 +00: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
Christopher Parsons
dbfafc0a3c Merge "Propagate unexported deps via implementation_deps" 2021-05-21 21:29:59 +00:00
Pirama Arumuga Nainar
64df571229 Merge "[cc/coverage] Define a macro during coverage builds" am: cb56f0166f am: dfee0cc854
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689270

Change-Id: I31b196fd716c06ef7feb426f6224239a89f339bd
2021-05-21 21:19:06 +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 551b06d9e6)
2021-05-21 13:48:41 -07:00
Pirama Arumuga Nainar
cb56f0166f Merge "[cc/coverage] Define a macro during coverage builds" 2021-05-21 20:47:00 +00: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
Jingwen Chen
a29df3fdc3 Merge "bp2build: generate arm toolchain flags into @soong_injection." am: 857d037566 am: 9a8576be51
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1714248

Change-Id: I5a96029eec031d6cfd7017c8387b53431b264ae1
2021-05-21 04:53:52 +00:00
Jingwen Chen
857d037566 Merge "bp2build: generate arm toolchain flags into @soong_injection." 2021-05-21 04:14:51 +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 4016d7b53e)
2021-05-21 11:44:45 +09:00
Bill Peckham
bcd51263cb Merge changes from topic "far-dep-exists" am: 79610d55fa am: fa8f685b4d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1714569

Change-Id: I24a8134e562f3d88bfce3ee391e4458d32a5b315
2021-05-21 02:23:47 +00:00
Bill Peckham
79610d55fa Merge changes from topic "far-dep-exists"
* changes:
  Check for product variant in addition to core variant.
  Plumb through OtherModuleFarDependencyVariantExists from blueprint.
2021-05-21 01:37:21 +00: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 dee806fd09)
2021-05-21 08:30:07 +09:00
Jingwen Chen
51a1e1cf59 bp2build: generate arm toolchain flags into @soong_injection.
Other architectures will come later.

Bug: 187084665
Test: TH
Change-Id: Ifcc6773625e56b1fc20260d840380e7ee4ecee7f
2021-05-20 22:29:39 +00:00
Bill Peckham
1368d3fc09 Merge "VNDK snapshot may provide LLNDK stub libraries" am: 1d3466a019 am: 06123b76d2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1710768

Change-Id: I311a977c64ac09e8a5f97846bcd7b9a10cf05536
2021-05-20 22:26:54 +00:00
Bill Peckham
4016d7b53e 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
2021-05-20 18:57:04 +00: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
Chris Parsons
d6358775c8 Propagate unexported deps via implementation_deps
Test: bp2build and mixed_libc CI
Test: Manually verified that libc_bionic_ndk compilation gets the
appropriate headers (and no extra headers) from downstream

Change-Id: I79eb6e8ec1d415bd50d12105da4cf97101f95474
2021-05-20 12:05:24 -04: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 0c96eb74e2)
Merged-In: I9aceb7ba33baa23d193a6d554e7892a5d5f0effa
2021-05-20 12:53:22 +00:00
Justin Yun
dee806fd09 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
2021-05-20 21:05:19 +09:00
Jiyong Park
1df9944677 Merge changes I4e7a7ac5,I0c73361b am: 6fae608181 am: 058b7332db
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1710529

Change-Id: I45f947f67305801b2389c2dcb84b66caf997cea1
2021-05-20 10:42:10 +00:00
Luke Huang
9fdb4bd7b0 Merge "Fix the apex compatible issue on the platform Q" am: 4a256414e9 am: c575e41b44
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1710971

Change-Id: I6eae818132585cdc2ce470224479bc1b76be03d5
2021-05-20 10:09:19 +00:00
Jiyong Park
6fae608181 Merge changes I4e7a7ac5,I0c73361b
* changes:
  Record the actual APEXes that a module is part of.
  Rename InApexes -> InApexVariants
2021-05-20 09:59:59 +00:00
Luke Huang
4a256414e9 Merge "Fix the apex compatible issue on the platform Q" 2021-05-20 09:29:02 +00:00
Jingwen Chen
7d36a5a08e Merge "bp2build: avoid adding deps on system_shared_libs temporarily." am: 5ea6e801e4 am: 07bdd0fdc5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1710972

Change-Id: Id7348b08e4382eddf654d02383154eadfd1b3926
2021-05-19 23:00:42 +00:00
Jingwen Chen
f19b7100ed Merge "bp2build: export CommonGlobalIncludes to @soong_injection." am: 4ca2ca5413 am: fef72cb7da
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1710970

Change-Id: I1659c7def751bd620de8922dbdccaa2a16c3d4b4
2021-05-19 11:01:39 +00:00
Jingwen Chen
45dec1072b bp2build: avoid adding deps on system_shared_libs temporarily.
At least until libc and libm builds, which are the common values in
system_shared_libs. We don't have a way to break the cycle of:

libstdc++.so (system_shared_libs) -> libc.so -> ...(whole_static_libs) -> libstdc++.a (system_shared_libs) -> []

because bp2build just sees it as:

libstdc++ (system_shared_libs) -> libc -> (whole_static_libs) -> libstdc++ (system_shared_libs) -> libc -> ...

therefore creating a cycle.

This CL punts the problem for now by ignoring system_shared_libs in the cc deps mutator, with a TODO.

Test: TH

Bug: b/186024507
Bug: b/186489250
Change-Id: Id4744593af39b7eb3b31418c8afaeeac99a0ab5f
2021-05-19 10:30:29 +00:00
Luke Huang
088b53577d Fix the apex compatible issue on the platform Q
Adjust the statement to always check the min_sdk_version
for cc build module.

Test: forrest, TH
Change-Id: I9aceb7ba33baa23d193a6d554e7892a5d5f0effa
2021-05-19 16:48:22 +08:00
Jingwen Chen
2199995129 bp2build: export CommonGlobalIncludes to @soong_injection.
Test: TH
Fixes: 186035856
Change-Id: Iff336427694289c8913b58674e67fc0f792ad851
2021-05-19 05:53:51 +00:00
Colin Cross
33e1a22aed Merge "Don't propagate ASAN through shared library dependencies" am: 48a2d110b3 am: 376c9b5f21
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1705660

Change-Id: Ib9ff3bbedecbf9ff41b527e281e14be135ac086b
2021-05-18 20:00:28 +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 af98f58242)
2021-05-18 12:27:25 -07:00
Colin Cross
48a2d110b3 Merge "Don't propagate ASAN through shared library dependencies" 2021-05-18 19:20:34 +00:00
Elliott Hughes
5f314b1613 Rename gccCmd mingwCmd now that's all it's used for.
Bug: http://b/185257607
Test: treehugger
Change-Id: Ida079183828444f122ba6ea5662f63796677de7d
2021-05-18 11:56:02 -07:00
Elliott Hughes
d80257aad4 Merge "Use "${config.ClangBin}/llvm-" for TOOLS_PREFIX." am: ca8f680040 am: 775ae43973
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1700225

Change-Id: Ib714ea5e28a021aade51fc6c5cf9de1cd7608f99
2021-05-18 17:50:32 +00:00
Elliott Hughes
ca8f680040 Merge "Use "${config.ClangBin}/llvm-" for TOOLS_PREFIX." 2021-05-18 16:32:07 +00:00
Jiyong Park
ab50b0795a 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`.

Bug: 180325915
Test: m nothing

Change-Id: I0c73361b452eddb812acd5ebef5dcedaab382436
2021-05-18 16:05:14 +09: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
Christopher Parsons
b17dc508e4 Merge "bp2build: support generated sources and hdrs" am: 72a13e8d40 am: a15ba2556f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1705758

Change-Id: Id18c0d70af4b27b153656eb79958f722ae079bae
2021-05-17 22:59:41 +00:00