Commit graph

11 commits

Author SHA1 Message Date
Kiyoung Kim
0d1c1e6aef Remove VNDK information from CC and APEX tests
VNDK is deprecated in 24Q2, so soong should be tested with no device and
platform vndk versions. This change removes all VNDK related tests and
VNDK versions from soong-cc and soong-apex tests.

Bug: 330100430
Test: m nothing --no-skip-soong-tests passed
Change-Id: I45e6c13e6c0a6bc9710b120e8d5b167e2051631e
2024-03-28 15:15:01 +09:00
Yi-Yo Chiang
88960aa827 cc: Vendor modules should NOT derive its "SDK" level from VNDK
Although vendor modules can be built bundled, they are technially not
part of the "platform", as it cannot access platform libraries (system
partition) directly.
They can only link to a restricted set of platform libraries (LLNDK),
and access restricted set of APIs.
We used to derive the LLNDK API level from the VNDK version. However
after VNDK deprecation, there is no "VNDK version" anymore.
Instead we would just derive the value from platform SDK version:
* If building an in-development build, build vendor modules against the
  in-development "current" API level.
* If building a REL / Final build, vendor should target the latest
  stable API.

Bug: 320423828
Test: go test
Test: presubmit
Test: build and boot
Change-Id: I2c5ef6530e9046b2dcc282bc1f020d8a505eab15
2024-01-23 12:43:38 +08:00
Colin Cross
8ff105860d Remove ConvertWithBp2build implementations
Remove the ConvertWithBp2build implementations from all the module
types, along with the related code.

Bug: 315353489
Test: m blueprint_tests
Change-Id: I212672286686a318893bc7348ddd5a5ec51e77a7
2023-12-08 13:51:05 -08:00
Dan Albert
5b0d4f3a30 Include NDK CRT object variants in the sysroot.
The actual NDK distribution will overwrite these (they're branded with
the platform's version information, which isn't what the NDK wants to
brand apps with), but including them here makes it easier to iterate
on the platform sysroot in situations that don't require a strictly
correct NDK sysroot.

Bug: None
Test: None
Change-Id: I22d4de9caa8753578a2327b1ece0deb005708b08
2023-04-04 23:27:15 +00:00
Colin Cross
fb44cd2e8e Copy cc_object output files to a name that matches the module
cc_object output files match the name of the module if there are any
postprocessing steps like partial linking or prefixing symbols.  If
there are no postprocessing steps the output file matches the name
of the source file with the extension changed to ".o".  Always copy
the object to an output file that matches the module name.

This relands I086bb0d14a3c02093515f55395aa7a11473f8040 with a fix
for modules that already have a .o suffix in the module name.

Bug: 242601708
Test: TestCcObjectOutputFile
Change-Id: I603d06f1c36f72913aec3e22bbd0857166e142b5
2022-09-16 10:34:09 -07:00
Jiyong Park
5df7bd33f7 crt objects for APEX and vendor variants have correct target API levels
Previously, crt objects for APEX and vendor variants targetted API level
16 regardless of their context. For example, even if BOARD_VNDK_VERSION
is set to 29, or an APEX has `min_sdk_version: "29"`, the target API
level was from `min_sdk_version` property of the crt object which is set
to 16.

The meaning of min_sdk_version is quite different when it comes to crt
objects. It means the lowest API level that it CAN target for. It does
NOT mean the API level it SHOULD always target.

This has caused some other problems like TLS segment underalignment for
vendor libraries because the vendor libraries were all built with TLS
layout from API level 16.

This change fixes the problem by correctly implementing the different
semantic of min_sdk_version for crt objects.

Bug: N/A
Test: m nothing

Change-Id: I15328e0b6cbabbe151dd65c7469c6355e167b78a
2021-08-25 16:26:47 +09:00
Liz Kammer
25f369fdca Move cc_object tests to object_test.go
Test: go test cc tests
Change-Id: I6a138482f678b6168b06b523ddbfeb639bf70364
2021-04-19 12:44:51 -04:00
Liz Kammer
07bc5f9c4e Add test for building cc_object with Bazel.
Test: go test cc tests
Change-Id: I45a341d09c92f57769d1c3b686f8abac113b3548
2021-04-09 11:50:38 -04:00
Colin Cross
405af07859 Revert "Make lots of tests run in parallel"
This reverts commit 323dc60712.

Reason for revert: Possible cause of test instability
Bug: 170513220
Test: soong tests

Change-Id: Iee168e9fbb4210569e6cffcc23e60d111403abb8
2020-10-09 18:34:24 -07:00
Colin Cross
323dc60712 Make lots of tests run in parallel
Putting t.Parallel() in each test makes them run in parallel.
Additional t.Parallel() could be added to each subtest, although
that requires making a local copy of the loop variable for
table driven tests.

Test: m checkbuild
Change-Id: I5d9869ead441093f4d7c5757f2447385333a95a4
2020-10-06 15:12:22 -07:00
Pete Bentley
74c9bbacb6 Allow linker scripts when building objects.
Test: m nothing
Test: TreeHugger
Bug: 134581881
Bug: 137267623

Change-Id: If1422372585ec032a9e36eab73a04e98fe1c1b6c
2019-08-22 13:21:37 -07:00