Commit Graph

7111 Commits

Author SHA1 Message Date
Colin Cross
0728720d45 Merge changes Ibd19d9a5,Icfc42ad7,Ieafdcceb am: 7b2e5cd134 am: 4a9761befe am: 14eea8f7d5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1980449

Change-Id: I605243788a153758a9ebdddd4250d65efdf1f5ab
2022-02-11 23:57:03 +00:00
Colin Cross
7b2e5cd134 Merge changes Ibd19d9a5,Icfc42ad7,Ieafdcceb
* changes:
  Fix musl clang triple
  Add musl_<arch> and glibc_<arch> properties
  Add libc_musl as a dependency of RuleBuilderCommand.BuiltTool
2022-02-11 23:09:27 +00:00
Colin Cross
6745a8ef1d Add --sysroot /dev/null to musl compiles
Prevent linking against host glibc libraries by passing
--sysroot /dev/null to compile and link rules targeting musl.

Bug: 190084016
Test: m USE_HOST_MUSL=true host-native
Change-Id: Ief2c9507af9ae7cf5376cb874fcef0f2cbaf9994
2022-02-11 13:51:41 -08:00
Colin Cross
a2bcf2c4b8 Fix transitive whole_static_libs on prebuilt static libraries
whole_static_libs on static library usually uses the .o files from
the dependency, but on a prebuilt static library has to use the .a file.
whole_static_libs on a static library that itself has whole_static_libs
on a prebuilt static library also needs to use the .a file transitively.

Test: TestWholeStaticLibPrebuilts
Change-Id: I9d4aabf72be0941b461a72e610f2b28287251cb2
2022-02-11 13:51:41 -08:00
Treehugger Robot
ee18fb6589 Merge "Add error message for unsupported x86 arch variant" am: 104ecf6708 am: baeeb601cc am: ca7d468a5d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1980008

Change-Id: I02dff31376d00f8912036cb89956139fee9b60d6
2022-02-11 14:38:37 +00:00
Treehugger Robot
104ecf6708 Merge "Add error message for unsupported x86 arch variant" 2022-02-11 13:55:43 +00:00
Treehugger Robot
82f65281f6 Merge "Propagate runtime_libs from Soong to Make" am: b451101f6e am: 7966092c95 am: 3489f67ca8 am: 8a5ab8baf9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1976466

Change-Id: I2247f4ba15ced638933acc06735cbefd9a7b543f
2022-02-11 02:07:40 +00:00
Treehugger Robot
b451101f6e Merge "Propagate runtime_libs from Soong to Make" 2022-02-11 00:56:26 +00:00
Liz Kammer
f610a74f4c Add error message for unsupported x86 arch variant
Previously this would result in a Ninja variable lookup, instead, let's
error sooner in Soong.

Test: CI
Change-Id: Ib3e15dce84364e6f7a83b82cb5f0e8694ffc9d2a
2022-02-10 16:58:08 -05:00
Colin Cross
06c80eb851 Add builtins and minimal runtime as dependencies instead of flags
Use dependencies instead of libflags to link libclang_rt.builtins
and libclang_rt.ubsan_minimal.

Test: m checkbuild
Change-Id: I403cee0fb8cc21c347b42d8f8a3c20d6f43337a4
2022-02-10 11:50:31 -08:00
Colin Cross
72ee67659d Fix musl clang triple
Use x86_64-linux-musl and i686-linux-musl as the clang triple when
targeting musl.

Bug: 190084016
Test: m USE_HOST_MUSL=true host-native
Change-Id: Ibd19d9a5fbf4b67950745480d1e0ed8e02eeeba1
2022-02-10 11:50:31 -08:00
Liz Kammer
df191be7ec Merge "Create subdir for cc rules." am: da0b38772d am: 4a223606eb am: ccb7a63768 am: 1add73dc46
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1963459

Change-Id: Ie77c0cfc5324bd3c0d78b7bc949fa5f507747808
2022-02-10 15:09:43 +00:00
Nicolas Geoffray
ddc1b5b56f Merge "Revert "Switch to clang-r445002"" am: 2b2d9392fc am: 9bd52c7f71 am: 61bbe44e53 am: 6e5d419d34
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1976654

Change-Id: Id70eabf8070bbc0ddcb4ab96fe8ec4f7a5868592
2022-02-10 15:09:30 +00:00
Liz Kammer
da0b38772d Merge "Create subdir for cc rules." 2022-02-10 14:16:07 +00:00
Nicolas Geoffray
2b2d9392fc Merge "Revert "Switch to clang-r445002"" 2022-02-10 14:15:46 +00:00
Nicolas Geoffray
83b2b326b7 Revert "Switch to clang-r445002"
This reverts commit d950ab8bb3.

Reason for revert: Breaks Java math tests
Test: atest libcore.java.math.RunCSVTestsStrict

Change-Id: Ief6d0422fda991616afa59f5ce419aee5ac26a58
2022-02-10 09:58:50 +00:00
Yi Kong
71198ac516 Turn on Unique Internal Names for AFDO
AutoFDO uses a function’s symbol name to look up profile data but
functions with internal linkages do not have globally unique
identifiers. This can lead to name conflicts leading to missing profiles
and performance. We are enabling compiler option
-funique-internal-linkage-names for AFDO builds that will uniquefy
internal linkage symbols making this problem go away.

This CL might regress the performance due to mismatched profiles. It
will recover once we update the profiles.

Test: presubmit
Bug: 218448389
Change-Id: I92a2b6f72b52faab79aec9148f1962111bad7232
2022-02-10 08:09:38 +00:00
yangbill
6db86e5f01 Propagate runtime_libs from Soong to Make
Write the list of a module's runtime-required libraries to the
`LOCAL_RUNTIME_LIBRARIES` Makefile variable defined for each module.
This enables downstream tools to correctly set up the runtime environment
for execution.


Bug: 215243373
Test: out/soong/Android-aosp_cf_x86_64_phone.mk

Change-Id: Ia64a75cfba27af0202973d749d02620b355ec802
2022-02-10 06:19:31 +00:00
Treehugger Robot
a3cb9b7fe6 Merge "Escape cc ldflags in bp2build conversion" am: 9deb87e8e2 am: e2f1b14961 am: 04bf233677 am: ef3b27ec23
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1973479

Change-Id: Ia6d24953475454388ff4dbc5fe194c1f2608332b
2022-02-10 00:15:44 +00:00
Treehugger Robot
9deb87e8e2 Merge "Escape cc ldflags in bp2build conversion" 2022-02-09 23:05:01 +00:00
Pirama Arumuga Nainar
64db9c71c9 Merge "Switch to clang-r445002" am: 111817435a am: db6af1e8d3 am: 5f83a7f3bc am: 867de48cbe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1961820

Change-Id: I1b306bde187576daaa3c337045ffdc34ca700d0f
2022-02-09 20:03:48 +00:00
Pirama Arumuga Nainar
111817435a Merge "Switch to clang-r445002" 2022-02-09 18:55:08 +00:00
Treehugger Robot
310e688d18 Merge "Add package for printing starlark formatted data" am: 5974423b06 am: f768e9d92a am: 39c446e760 am: fced333be4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1971139

Change-Id: Iea83ff9e2ccb520584801fed3d48602784afd677
2022-02-09 05:49:20 +00:00
Treehugger Robot
5974423b06 Merge "Add package for printing starlark formatted data" 2022-02-09 04:48:33 +00:00
Chih-hung Hsieh
ff96c3eaee Merge "Use only single dash for tidy flags" am: def9bf2c1c am: df8fe32206 am: 31989351ac am: 05c54e2b71
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1972547

Change-Id: Iba7ea388f51c7950eab13d7e0fbae3058011e4f7
2022-02-08 23:23:17 +00:00
Liz Kammer
72beb34609 Add package for printing starlark formatted data
Bug: 216168792
Test: build/bazel/ci/bp2build.sh
Change-Id: I3a06b19396f7ffe1c638042cda7e731dd840f1d6
2022-02-08 17:32:28 -05:00
Chih-hung Hsieh
def9bf2c1c Merge "Use only single dash for tidy flags" 2022-02-08 22:13:47 +00:00
Treehugger Robot
8c1bec5dac Merge "Use -fno-sanitize-link-runtime for bionic sanitizers" am: 3e7f5c411d am: 8793c78b35 am: 0959ae13e7 am: deb07ed7e0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1975927

Change-Id: I5836b7e8e3f0af826615d305b2ba84b6f054a9e4
2022-02-08 21:30:08 +00:00
Treehugger Robot
3e7f5c411d Merge "Use -fno-sanitize-link-runtime for bionic sanitizers" 2022-02-08 20:33:43 +00:00
Yu Liu
24003e9c28 Merge "Support bssl hash injection for libcrypto." am: febce2dfa7 am: 126db90364 am: 5daae6f2b6 am: af8948be4b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1966148

Change-Id: I7ae6542997d1e140af1cb3f8dedbf9ce95b3d7cf
2022-02-08 19:48:06 +00:00
Mitch Phillips
7fbac74dc9 [cc_fuzz] Revert 'disable LTO' patches.
The toolchain no longer has a problem with sancov + LTO.

Bug: 131771163
Test: make haiku
Change-Id: If85931f092c41336a8a5e0e7999ad39dd8ec3daf
2022-02-08 10:51:35 -08:00
Yu Liu
febce2dfa7 Merge "Support bssl hash injection for libcrypto." 2022-02-08 16:59:34 +00:00
Treehugger Robot
87f6b657ca Merge "Disable tidy default DeprecatedOrUnsafeBufferHandling check" am: cf637f101c am: ccf8597e8a am: a16ecabf5f am: 6f507a5e00
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1976066

Change-Id: Ic5af155f1c01f916d3a63dde083a1d2b9f1eefff
2022-02-08 04:42:42 +00:00
Treehugger Robot
cf637f101c Merge "Disable tidy default DeprecatedOrUnsafeBufferHandling check" 2022-02-08 03:30:31 +00:00
Jooyung Han
35dc3aca98 Merge changes I11693286,I8d79a434 am: 472be14f26 am: 601cb3422d am: 4749d6884d am: c909932b23
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1972300

Change-Id: I21afcefa5fa7ee98efef8fad035463ba292909b7
2022-02-08 02:12:55 +00:00
Colin Cross
234b01de96 Use -fno-sanitize-link-runtime for bionic sanitizers
Currently when using sanitizers and building for the device
the -fsanitize= argument is not passed to the linker so that the
linker won't add the runtimes, which have already been added
as explicit dependencies.  Pass -fno-sanitize-link-runtime instead
in case the linker has other behaviors when passed -fsanitize=
besides adding the runtimes.  Also check for bionic instead of host
so that linux bionic gets the same linker behavior as bionic for
the device.

Test: m USE_HOST_MUSL=true host-native
Test: m checkbuild
Change-Id: I0f2966e2fd4ae8adc5cb21eb116c349bcc0c668f
2022-02-08 01:35:23 +00:00
Jooyung Han
472be14f26 Merge changes I11693286,I8d79a434
* changes:
  VNDK libs use "unique" APEX variants
  use_vndk_as_stable APEX shouldn't include VNDK lib
2022-02-08 01:03:41 +00:00
Chih-Hung Hsieh
9bcce2ef3a Disable tidy default DeprecatedOrUnsafeBufferHandling check
This will suppress warning like:
system/chre/chpp/app.c:637:3: warning: Call to function 'memset' is insecure
as it does not provide security checks introduced in the C11 standard.
Replace with analogous functions that support length arguments or provides
boundary checks such as 'memset_s' in case of C11
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

Test: WITH_TIDY=1 CLANG_ANALYZER_CHECKS=1 make tidy-system-chre-chpp_subset
Change-Id: I87a7bba31aa10260fc408317a8cd54bf80c03152
2022-02-07 16:44:13 -08:00
Yu Liu
75be7b94d6 Support bssl hash injection for libcrypto.
Bug: 215541108
Test: Build libcrypto with Bazel and verify the hash injected, add unit
test
Change-Id: I0375307aab0b1e60a8be298d680e1e0af1ebb454

Change-Id: I9133ce398e2024fe7834a292bf2f5ba3222d630b
2022-02-07 14:15:42 -08:00
Treehugger Robot
1f1ad1f67d Merge "Update error messages for failed globs." am: c01e074fef am: f0fcf896f9 am: 61f5ba2ec4 am: f41f38cce2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1973544

Change-Id: I0ae667a5173bf61444a8e672b6c70b458556d5ce
2022-02-07 18:26:49 +00:00
Elliott Hughes
c19e95946a Merge "Disable BTI for now." am: b039496446 am: 188a5f90d8 am: 2bf5b9ca57 am: 2bfd0ddb90
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1969222

Change-Id: I0bcf26ddfa83f056e272b3e1cbec742fd01aa1ee
2022-02-07 18:03:26 +00:00
Treehugger Robot
c01e074fef Merge "Update error messages for failed globs." 2022-02-07 17:24:23 +00:00
Elliott Hughes
b039496446 Merge "Disable BTI for now." 2022-02-07 17:02:56 +00:00
Liz Kammer
0ea7998208 Update error messages for failed globs.
Currently error messages appear like:
&fs.PathError{Op:"open", Path:"..." Err:0x18}
which make them difficult to parse.

Test: CI
Change-Id: I18da18abc43230d0ea37d166179d07e585077f51
2022-02-07 08:56:47 -05:00
Chih-Hung Hsieh
63d59eb77c Use only single dash for tidy flags
* Work around RBE preprocessor bug, which rejects double dash flags.

Bug: 217778010
Test: make tidy-soong_subset
Change-Id: Ic7c0a95ae7afefb49cc9d124fd3c9f38fe2e0f56
2022-02-04 20:34:27 -08:00
Treehugger Robot
0eec7ea176 Merge "Remove unnecessary --warn-shared-textrel flags." am: 56fc48c482 am: 1cc8b23a02 am: c55e748b28 am: e6b66f6445
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1973342

Change-Id: Ib8a8e14dbba1e0090a1b66a74ce83ce148a52d9c
2022-02-05 01:00:40 +00:00
Treehugger Robot
56fc48c482 Merge "Remove unnecessary --warn-shared-textrel flags." 2022-02-04 23:58:41 +00:00
Liz Kammer
f38a8379ff Escape cc ldflags in bp2build conversion
Bug: 217757720
Test: bp2build.sh
Change-Id: I704acfb01527f15ff762afeaaf4e0e328e4737d8
2022-02-04 15:43:08 -05:00
Sam Delmerico
67a4f2511b Merge "add target_compatible_with stanza for host targets" am: 75664acd70 am: c9c5269342 am: 608b32f41a am: d3b10485f0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1966480

Change-Id: I521a6c7e2ef12516bebe06661086ebe3338a1bad
2022-02-04 20:15:02 +00:00
Sam Delmerico
75664acd70 Merge "add target_compatible_with stanza for host targets" 2022-02-04 19:15:04 +00:00