Commit graph

1291 commits

Author SHA1 Message Date
Pirama Arumuga Nainar
d9f0822a4e Merge "Reland "Switch to clang-r445002"" am: 2b31fbb805 am: c31610cbce am: 640d3f8587
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1985009

Change-Id: I9b8dadac0a0a7da292f3fec72d9035925219abf3
2022-02-18 10:39:18 +00:00
Pirama Arumuga Nainar
2b31fbb805 Merge "Reland "Switch to clang-r445002"" 2022-02-17 18:07:38 +00:00
Colin Cross
d42fcae75f Merge "Add --sysroot /dev/null to musl compiles" am: e4c400bef5 am: 69324f735d am: b5e24d257f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1983627

Change-Id: Id40f845a799bc1ed8fc565ed9c909946bacbf6d2
2022-02-17 00:40:40 +00:00
Colin Cross
e4c400bef5 Merge "Add --sysroot /dev/null to musl compiles" 2022-02-16 23:32:51 +00:00
Pirama Arumuga Nainar
8a4804f53b Reland "Switch to clang-r445002"
Bug: http://b/214080353
Bug: http://b/218805949

Reland switch to clang-r445002.  The math test failures are fixed by
disabling FMA (-ffp-contract=off).

Test: - atest -a libcore.java.math.RunCSVTestsStrict
      - select bionic tests on go/abtd
      - atest -a \
gatm_algo_test:gatm_algo_test.TestAllGatmTestData/GatmAlgoTest#VerifyOutputValues/05temporaltracing_5frames_1lux_h_drc_free
      - presubmit

Change-Id: I8383edb116caa63884507932406a5f49a223d006
2022-02-15 17:27:30 +00:00
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
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
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
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
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
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
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
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
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
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
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
Elliott Hughes
b039496446 Merge "Disable BTI for now." 2022-02-07 17:02:56 +00: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
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
13775aaefc Disable gnu-designator warnings. am: 9df9dd4d13 am: 176015cae6 am: 8832937e3a am: b490967af0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1971467

Change-Id: I966d3931f5a9cb58e3f89b4839d0a2dac982b218
2022-02-04 13:25:19 +00:00
Chih-Hung Hsieh
9df9dd4d13 Disable gnu-designator warnings.
Bug: 217613071
Test: make
Change-Id: I51a6afdf6d4b1549d2e3b65168c3cce52d8e197d
2022-02-04 00:30:20 -08:00
Pirama Arumuga Nainar
d950ab8bb3 Switch to clang-r445002
- Disable -Wbitwise-instead-of-logical for external projects.

Test: N/A
Change-Id: Icb081bf6f17fcd5bf9759efa99fd26413c74f7c3
2022-02-03 13:42:13 -08:00
Edwin Wong
9586095081 Merge "Add android.hardware.drm-V1-ndk/_platform" 2022-02-03 00:54:43 +00: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
cd08e2b17f Merge "Reland "Make DWARF v5 the default debug information format."" am: 87d576c0a5 am: c91faa3247 am: 3515390b86 am: 4c9b6ac99c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1954424

Change-Id: If7c1428d7ae0c9999f1e714668f4a887db6f9a52
2022-01-22 04:33:23 +00:00
Treehugger Robot
87d576c0a5 Merge "Reland "Make DWARF v5 the default debug information format."" 2022-01-22 03:32:43 +00:00
Jingwen Chen
3d738859cf Export stub library compiler flags to soong_injection. am: 341f73550d am: 82f468476b am: db371b48a5 am: fec1d0f005
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1944691

Change-Id: I90f7ea771b2446826c25de70cdd58d2df1cdb52c
2022-01-21 05:54:41 +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
e58e8665b5 Merge "Switch to clang-r437112b" am: 5bb16c37d6 am: b74e1052c1 am: 3fd35bad56 am: 75b318d2fa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1927344

Change-Id: I0cefb9ea44483e3cbd6acde27a5088d2a55dc5ab
2022-01-05 22:56:06 +00:00
TreeHugger Robot
688bac35f0 Merge "Add sensors AIDL interface" 2022-01-05 17:51:49 +00: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
126fc68a92 Merge "Turn on -Wstring-concatenation" am: 53fc7705ec am: 28a933cf8c am: 0b7fccbb5f am: 64c00f2209
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1922284

Change-Id: I5e7038f84ac6da2144ce097095066557514b5145
2021-12-17 05:36:55 +00:00
Yi Kong
53fc7705ec Merge "Turn on -Wstring-concatenation" 2021-12-17 04:05:37 +00:00
Treehugger Robot
572334fe5b Merge "Add noOverrideExternalGlobalCflags support to Soong" am: cde46d7d98 am: 1f337626d2 am: 4e4352352c am: 3e28e343cd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1924200

Change-Id: I2dde5ba90dcf67897b87f5d68c7bd4780570fd8a
2021-12-16 21:01:56 +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
7001bf44e1 Support macOS 12 SDK am: e3d50bfba9 am: d4105fcf60 am: 3452b082de am: aa967536d7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1914488

Change-Id: Id56dc643580403b5fa26adea30851a1c174d4b7f
2021-12-09 02:07:36 +00:00
Dan Willemsen
d98c144f21 Merge "Add Darwin x86_64+arm64 universal binary support" am: ce69757379 am: 1bd7543d6e am: b2a6b903fb am: 4d913d8528
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1884611

Change-Id: I0b2e79c1ea2c2889c859fbbcd4ffb964531cf046
2021-12-09 00:04:21 +00: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
32c2ff41fd Merge "Move "-fdebug-info-for-profiling" flag to device binaries only" am: 8a8cebb01f am: 985e8bcbfc am: d22b2e11c2 am: 482031602a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1912716

Change-Id: I2434f8b74a32a036f1774467256e705dad9b0ebd
2021-12-07 18:28:39 +00: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