Commit graph

1192 commits

Author SHA1 Message Date
Treehugger Robot
cf637f101c Merge "Disable tidy default DeprecatedOrUnsafeBufferHandling check" 2022-02-08 03:30:31 +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
Elliott Hughes
b039496446 Merge "Disable BTI for now." 2022-02-07 17:02:56 +00:00
Treehugger Robot
56fc48c482 Merge "Remove unnecessary --warn-shared-textrel flags." 2022-02-04 23:58:41 +00:00
Stephen Hines
a66590a98d Remove unnecessary --warn-shared-textrel flags.
This flag has never done anything for ld.lld, since it has this behavior
by default (and actually can't turn it off either). It's now being
removed as a valid flag from ld.lld, so it's time for Android to drop
the unnecessary flags. See https://reviews.llvm.org/D118942.

Test: builds
Change-Id: I22c344b7a55e275c1fbd5fef25f85e97a39de5c4
2022-02-04 11:02:17 -08:00
Chih-Hung Hsieh
9df9dd4d13 Disable gnu-designator warnings.
Bug: 217613071
Test: make
Change-Id: I51a6afdf6d4b1549d2e3b65168c3cce52d8e197d
2022-02-04 00:30:20 -08:00
Elliott Hughes
c75994d623 Disable BTI for now.
Bug: https://issuetracker.google.com/216395195
Test: readelf -aW libc.so | grep PROPERTY
Change-Id: I4d157cbe5bf5b54cb7d3c4efe8fb74d4f72af6f3
2022-02-02 14:45:41 -08:00
Treehugger Robot
87d576c0a5 Merge "Reland "Make DWARF v5 the default debug information format."" 2022-01-22 03:32:43 +00:00
Jingwen Chen
341f73550d Export stub library compiler flags to soong_injection.
These are used by the "stub_library" cc toolchain feature.

Test: CI
Bug: 207812332
Change-Id: I392e51f32c92b30b30e85658e7627e16190bdbad
2022-01-21 01:43:13 +00:00
Stephen Hines
8afd175e43 Reland "Make DWARF v5 the default debug information format."
This reverts commit bb1a17aecb.

Bug: http://b/182004844
Bug: http://b/195152239
Bug: http://b/195698910
Test: Builds

Change-Id: I6f84bd7e0f2a26799de2d6b9db4abe5d3dc968be
2022-01-20 11:01:47 -08:00
Chih-Hung Hsieh
66e8f72579 Switch to clang-r437112b
Bug: 201432564
Test: make
Change-Id: Iae5eb34b924c9e3707158d17761cf732518462d4
2021-12-28 11:16:30 -08:00
Yi Kong
53fc7705ec Merge "Turn on -Wstring-concatenation" 2021-12-17 04:05:37 +00:00
Stephen Hines
e24303f71a Add noOverrideExternalGlobalCflags support to Soong
noOverrideExternalGlobalCflags is a new set of flags intended to be
added at the end of the command line for 3rd party projects like
external/, hardware/, vendor/, and more. Our previous flags for external
projects occur way too early on the command line, leading to issues with
use for suppressing diagnostics. Note that support for this variable in
build/make is currently unimplemented, as there are no projects that
would depend on it. It could be added in the future, if it turns out to
be useful.

This change initially applies `-Wno-unused-but-set-variable` and
`-Wno-unused-but-set-parameter` to external projects because these
upstream projects aren't easily fixed, and the risk of actual bugs is
low.

Bug: http://b/197240255
Test: Build and check warnings
Change-Id: I26f56c5c52725dddb70dd8130ad61270eac7a9aa
2021-12-15 03:14:26 -08:00
Yi Kong
9feb029fe1 Turn on -Wstring-concatenation
Test: presubmit
Bug: 175068488
Change-Id: If1d37f744412ac2064d8cece251b39066f0e86c0
2021-12-15 17:30:31 +08:00
Dan Willemsen
e3d50bfba9 Support macOS 12 SDK
Test: build w/Xcode 13.1
Change-Id: I9062b8045c4b02551aeeff06f4d7416c766e53a6
2021-12-08 22:12:49 +00:00
Dan Willemsen
4745007bb1 Add Darwin x86_64+arm64 universal binary support
This is configured from Make by setting up Darwin+Arm64 as a HOST_CROSS
target (which is largely true, as binaries can't be executed on X86_64
machines). On the Soong side, it's a bit blurier, as we don't current
have any other users that are the same OS but not natively executable
(Linux/musl is executable, Windows/x86 is a different OS).

Instead of requiring cc_binary/etc to become multi-architecture-aware
and using something like common_first/MultiTarget, this defaults all
non-multi-architecture-aware modules to be built with both
architectures. It then adds a dependency with the
DarwinUniversalVariantTag so that supporting modules can get the outputs
of the other variant.

Cc uses that dependency tag to run lipo on shared libraries and binaries
so that the output of the x86_64 variant is actually a fat binary
including both architectures.

Bug: 203607969
Test: build sdk-repo targets on a Mac
Change-Id: Icbddb0a177c0ba19d3e0d11f8cf568e0d1ea3245
2021-12-07 22:01:25 -08:00
Yi Kong
196b926ac2 Move "-fdebug-info-for-profiling" flag to device binaries only
We do not profile host binaries. Moving to device binaries only helps
saving some disk space as well as shortening build time.

Test: presubmit
Change-Id: I09afb106d0e2ee250b3bc75d9dfd9cb8b6552c97
2021-12-07 13:51:38 +08:00
Jack Yu
bc07b0c67e Merge "Support for OMAPI Vendor stable interface" 2021-11-23 04:54:02 +00:00
Chih-hung Hsieh
933e7014da Revert "Revert "Switch to clang-r437112""
This reverts commit 1973f4d2cc.

Reason for revert: try to fix the failed test

Change-Id: I70b6e32d45db9e272432c85233cbf38e1e38a6ad
Bug: 201432564
2021-11-17 22:53:25 +00:00
Martin Stjernholm
1973f4d2cc Revert "Switch to clang-r437112"
This reverts commit 0d58894613.

Reason for revert: Suspected culprit for test failure b/206716119

Change-Id: Ibdd0aa783e07df5b41fd804efd175c12a7fe6592
2021-11-17 12:23:49 +00:00
Chih-Hung Hsieh
0d58894613 Switch to clang-r437112
* to test with build 7917927

Bug: 201432564
Test: make
Change-Id: Ic21f76f238abb2727e559ece41fd6cc76fb69f85
2021-11-16 18:18:08 +00:00
Dan Willemsen
1332eda6e0 Drop support for pre-macOS 11 SDKs
As they can't built arm64 binaries. All of our master-based builds are
now running on macOS 11 buildbots.

Bug: 203607969
Change-Id: I24c34a8365a399fbe43629ab5a22a1d53e3429b3
2021-11-01 16:04:43 -07:00
Dan Willemsen
8528f4ec5e Add Darwin+Arm64 toolchain support
This just sets up the toolchain and allows Darwin+Arm64 to be specified
as a HostCross target. These variants will not be exported to Make, or
be installed on a Soong-only build. A future CL will add support for
universal binaries using these variants.

This config is a bit stranger than the regular 64/32 multilib, as it's
two primary 64-bit configs. And on a Darwin/X86 machine, the Arm64
versions are HostCross (doesn't work on the current machines), while a
Darwin/Arm64 machine, either version works (if Rosetta is installed).

Bug: 203607969
Change-Id: Iacaed77d267773672da027cd74917e33fb1c1e94
2021-11-01 15:07:37 -07:00
Steven Moreland
bc909df732 Merge "Add health to vndk vendor variant list" 2021-10-26 22:33:31 +00:00
Nick Desaulniers
16bc50a128 remove support for *.rc files
We're now packaging llvm-windres (aosp/1870074) which can be used as a
substitute for GNU binutils' windres, but we've also removed the last
consumer of .rc files in aosp/1867048 (external/mdnsresponder/).

In the worst case, we can bring back support for .rc files but instead
process them with llvm-windres.

Bug: 203794880
Test: lunch aosp_cf_x86_64_phone-userdebug && m
Change-Id: I30a873537e004b46a87191a932d076a89463c873
2021-10-26 11:32:36 -07:00
Gabriel Biren
cbab07b45f Merge "Add android.hardware.wifi.supplicant-V1-ndk to VNDK list." 2021-10-26 04:43:57 +00:00
Yifan Hong
932920f403 Add health to vndk vendor variant list
Test: pass
Bug: 177269435

Change-Id: I40841daba4e52f65a27f5ed35b2731afb9a26a45
2021-10-25 20:22:11 -07:00
Gabriel Biren
f355d3c5ae Add android.hardware.wifi.supplicant-V1-ndk to VNDK list.
Bug: 196235436
Test: m
Change-Id: Ifc23ca36423de0a842e09120e783f6e8dfc807c3
2021-10-25 20:27:35 +00:00
Dan Willemsen
7368d86a20 Rewrite macOS SDK selection
Modern Xcode versions only have a single macOS SDK installed anymore, so
we don't need to iterate through our supported versions, only check
whether the current version is supported.

This also makes it so that we can specify "11" (or soon, "12") to
specify all 11.x SDKs, instead of having to update our supported list
multiple times a year. This matches previous years that had multiple
patch releases on 10.14.y, 10.15.y, etc.

Bug: 203607969
Test: build on Mac, changing the supported SDK list
Change-Id: I42715f7e8dfec811de440a435927c14c742dede9
2021-10-19 21:43:41 -07:00
Chris Parsons
3b1f83d076 Add x86_host vars to config.bzl
Test: USE_BAZEL_ANALYSIS=1 m adbd
Test: Manually verified config.bzl contains various x86_host flags after
bp2build.
Test: Unit tests

Change-Id: Ie9201ea2be4cd1c6659bea088a797cedbae37403
2021-10-19 12:18:13 -04:00
Treehugger Robot
adf2b3e68f Merge "Add android_sdk_repo_host to build platform-tools&build-tools" 2021-10-15 02:04:45 +00:00
Stephen Hines
b7b0ae12be Switch to clang-r433403b (13.0.3)
Bug: http://b/202099787
Test: m
Change-Id: Id923948c56b0308842c94846edd6528fd26dbf72
2021-10-14 01:21:21 -07:00
Dan Willemsen
9fe1410213 Add android_sdk_repo_host to build platform-tools&build-tools
The Android SDK has been built with Make up until now, monolithically,
then split up into several sdk-repo zip files for different purposes.
The Mac and Windows SDKs really only need to contain the platform-tools
and build-tools pieces, but due to this monolithic sdk zip, we had to
build the whole SDK first.

This adds an `android_sdk_repo_host` module that can build these
platform-tools and build-tools zips.

Bug: 187222815
Change-Id: I55809e1d7447dd65e22461f921b2b8abb6d5f822
2021-10-13 01:25:02 -07:00
Yi Kong
62e75f507d Re-enable unused-command-line-argument warning
Turn on the warning by default, unless USE_CCACHE is set.

Test: presubmit
Bug: 197177755
Change-Id: I01e2b0f1be3f4bd3a8d78bb4ab053b4db227596d
2021-10-13 04:11:56 +00:00
Rajesh Nyamagoud
3e4a48850b Support for OMAPI Vendor stable interface
Changes are made to include OMAPI VNDK libraries.

Bug: b/180639372
Test: m -j64
Change-Id: I6b2122c5f9c696e4676fdbd85eefb5bc194a7342
2021-10-08 22:38:37 +00:00
Sarah Chin
84fdadfe83 Add IRadio modules to VNDK
Test: build
Bug: 198331451
Change-Id: Ia468b563c6485464db56b3c9cdbae80de6b3f165
2021-09-21 23:34:20 -07:00
Serik Beketayev
af68148d19 [IRadioConfig] Add to VNDK variant list
Test: build
Bug: 198331805
Change-Id: Ibacc996f42c4bfa12b135247a2cebe1e28bbff09
Merged-In: Ibacc996f42c4bfa12b135247a2cebe1e28bbff09
2021-09-21 04:52:44 +00:00
Yi Kong
910cf32f49 Merge "Remove unused-but-set-{variable,parameter} from ClangUnknownCflags" am: 861441fa36
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1824620

Change-Id: Ieec9bdef68bb233e125e49d633803b39f200c81d
2021-09-13 19:07:01 +00:00
Yi Kong
a1ebc2d072 Remove unused-but-set-{variable,parameter} from ClangUnknownCflags
These warnings are now implemented by Clang.

Change-Id: I78d04216da0ca3d1db616c7b658ca6075b20e7f6
Test: presubmit
Bug: 197230471
2021-09-13 06:25:41 +00:00
Treehugger Robot
0e7f8e9919 Merge "Don't use bugprone-easily-swappable-parameters for global tidy builds either" am: 07e7294a75
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1824475

Change-Id: I6f7e0578f6e934dbc89a5d06f532b7111d1c8d55
2021-09-11 10:36:47 +00:00
Stephen Hines
4b721450c8 Don't use bugprone-easily-swappable-parameters for global tidy builds either
We turned this off in local tidy flags, but didn't disable it on global
tidy builds. Let's remove this for now, since the upkeep cost is large
on it, and it also is currently crashing in some cases.

Bug: http://b/199534745
Bug: http://b/194865868
Test: WITH_TIDY=1 m
Change-Id: Ife39ab4949c5baf825efff66326b276c6a2a59f4
2021-09-11 01:14:36 -07:00
Yi Kong
7d927b62bf Merge "Switch to clang r433403" am: 6afa749d1d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1814448

Change-Id: I19285347bc70349ce02de3d8b2b6793a4d56fa75
2021-09-10 04:39:04 +00:00
Yi Kong
6afa749d1d Merge "Switch to clang r433403" 2021-09-10 04:21:54 +00:00
Yi Kong
e82732916a Switch to clang r433403
Bug: 197230471
Test: presubmit
Change-Id: I374a66deb785bae99953ea23c67f873f33c2081b
2021-09-10 04:20:49 +00:00
Sarah Chin
d2432e668d Merge "Add Radio AIDL to VNDK variant list" 2021-09-09 05:21:43 +00:00
Sarah Chin
40eb29e39b Merge "Add Radio AIDL to VNDK variant list" into stage-aosp-master 2021-09-09 04:25:24 +00:00
Sarah Chin
2b9ad1c484 Add Radio AIDL to VNDK variant list
Test: build
Bug: 198331182
Change-Id: I922961b8311d024ebbf3f3339dfdb41c72ee9dd9
Merged-In: I922961b8311d024ebbf3f3339dfdb41c72ee9dd9
2021-09-08 19:08:44 +00:00
Chih-hung Hsieh
5ee3f91dcd Merge "Use tidyExternalVendor for external/googletest" am: 095aac0614
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1819240

Change-Id: I8b6abe23e57168ff4e01c6f78009edafd8e075ad
2021-09-08 18:50:44 +00:00
Chih-hung Hsieh
095aac0614 Merge "Use tidyExternalVendor for external/googletest" 2021-09-08 18:29:05 +00:00
Sarah Chin
b03e96874e Add Radio AIDL to VNDK variant list
Test: build
Bug: 198331182
Change-Id: I922961b8311d024ebbf3f3339dfdb41c72ee9dd9
Merged-In: I922961b8311d024ebbf3f3339dfdb41c72ee9dd9
2021-09-08 17:31:38 +00:00