Commit graph

8 commits

Author SHA1 Message Date
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