Commit graph

1309 commits

Author SHA1 Message Date
Trevor Radcliffe
0d1b4029b8 Add musl defaults in bp2build
Bug: 261657184
Test: Unit Tests
Test: Manual Inspection of generated files
Change-Id: I69864abb410fddecd530fc75f2531aff33b33c97
2023-01-11 18:43:20 +00:00
Yi Kong
a8b0bfbeab Do not report warnings when testing with the top of trunk LLVM
also clean up flags for Clang r475365.

Test: LLVM_NEXT=true m
Change-Id: I6ebbedc6b3e3adb50c156b852eb113a1c64ffc2a
2022-12-26 16:03:54 +09:00
Yu Liu
19ea53de84 Support env based compiler flags.
Bug: 187086342
Test: Manual and unit tests.
Change-Id: Ic8e5f09dd6552e1121174bb00f0aae647661cf7b
2022-12-21 12:39:30 -08:00
Krzysztof Kosiński
af32e1ba3f Enable -Wno-xor-as-pow for external code.
Bug: 145211022
Test: presubmit
Change-Id: I025842df61cfd3657b21159fe4c05da857043a4c
2022-12-14 22:38:51 +00:00
Treehugger Robot
7853388422 Merge "Add arch variants for Intel Atom CPUs" 2022-12-14 03:32:13 +00:00
Yabin Cui
8e6aeb7682 Update clang version to clang-r475365b
Bug: 253033919
Test: build

Change-Id: Id0fc8e1b135c9478b73d0e0cb5a249c5bd3474ea
2022-12-12 10:02:04 -08:00
Treehugger Robot
c6bea2d26e Merge "Reland "Update clang version to clang-r475365"" 2022-12-01 04:08:08 +00:00
Chih-hung Hsieh
ecd88699fa Reland "Enable sizeof-array-div warning"
This reverts commit 6be24baec4.

Reason for revert: warnings fixed in source files

Change-Id: I223ff6343c41ac957485726a3de006a84b9369df
2022-12-01 01:02:10 +00:00
Yabin Cui
29f248b086 Reland "Update clang version to clang-r475365"
This reverts commit a558be6472.
Reason for revert: broken build was fixed

Bug: 253033919
Test: build
Change-Id: If6adf2ece00081eb2eeec7895461293751f94be1
2022-11-30 13:34:35 -08:00
Yabin Cui
a7526ad43a Merge "Revert "Update clang version to clang-r475365"" 2022-11-30 02:02:37 +00:00
Yabin Cui
a558be6472 Revert "Update clang version to clang-r475365"
This reverts commit 7a53b71f3b.

Reason for revert: fix aosp_riscv64-userdebug build

Change-Id: Ie1579c5692335573b85fd5b062a4104023276287
2022-11-30 02:00:43 +00:00
Treehugger Robot
acf23fe098 Merge "Revert "Enable sizeof-array-div warning"" 2022-11-30 01:50:46 +00:00
Yabin Cui
4a06eea3cf Merge "Update clang version to clang-r475365" 2022-11-30 00:46:00 +00:00
Krzysztof Kosiński
6be24baec4 Revert "Enable sizeof-array-div warning"
This reverts commit 5a06f330ed.

Reason for revert: Breaks aosp_bramble-userdebug
https://android-build.googleplex.com/builds/submitted/9348502/aosp_bramble-userdebug/latest/view/logs/build_error.log

Change-Id: I4e360638dee2c2d620c814ccb1c752cef47c0d21
2022-11-29 23:19:34 +00:00
Chih-Hung Hsieh
5a06f330ed Enable sizeof-array-div warning
Except third-party external/vendor projects.

Bug: 148815709
Test: presubmit; make tidy-soong_subset
Change-Id: I84cf63d1b9e244acb3ff3bc913ee9c2f1eae0e5a
2022-11-29 00:13:01 +00:00
Chih-Hung Hsieh
823e0b7e12 Enable array-parameter warning
Except third-party external/vendor projects.

Bug: 241941550
Test: presubmit; make tidy-soong_subset
Change-Id: Ia74af9155d7d1aca0e6cecf1103f4d0de4345291
2022-11-29 00:12:07 +00:00
Yabin Cui
7a53b71f3b Update clang version to clang-r475365
Bug: 253033919
Test: build
Change-Id: I3c0d133d57cc389ee62502dd6aa36ee019e624d6
2022-11-28 13:40:14 -08:00
Yabin Cui
df3168f60d Merge "Allow deprecated flags when building with LLVM_NEXT." 2022-11-18 00:40:57 +00:00
Yabin Cui
758dfa1c28 Allow deprecated flags when building with LLVM_NEXT.
-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
is deprecated in the next compiler. So add -Wno-unused-command-line-argument
to skip it.

Bug: 253033919
Bug: 259559364
Test: run test_compiler.py
Change-Id: I9133a36700afd3ef411092fd8133a7fe1c2c7343
2022-11-17 13:00:40 -08:00
Sam Delmerico
d87f61ba18 Merge "export clang-tidy extraArgFlags to Bazel" 2022-11-16 14:17:43 +00:00
Ryo Hashimoto
f68c18f710 Add arch variants for Intel Atom CPUs
Bug: 259201836
Test: Build aosp_x86_64-eng with modified build/make/target/board/generic_x86_64/BoardConfig.mk
Change-Id: Ic7410d6874c17af0e4492bf7704066ae9af1a531
2022-11-16 17:26:53 +09:00
Elliott Hughes
9f0c951862 Remove a flag from riscv64 that was copied from arm64.
This causes us to align the text section to 4KiB, not just the data
section. From the bug that added this for arm64, there was an admission
that it costs 17MiB across the tree, and a not entirely convincing claim
of a performance improvement (undermined by the fact that "some stuff
was faster, some stuff was slower"). See http://b/150506341 for that.

Anyway, let's assume we don't want this for riscv64 for now.

Test: `mm -j` in bionic and readelf on the resulting libtest_empty.so
Change-Id: I0ed592a97ef705175191d9c66271a599af4eb18f
2022-11-15 00:56:04 +00:00
Sam Delmerico
ee030d237c export clang-tidy extraArgFlags to Bazel
We want to keep these flags in sync between Soong and Bazel, so we need
to export it to a variable that Bazel can read.

Test: CI
Bug: 255750565
Change-Id: Idf019fa6a85d2d6bb2341b6cb989a48e9ef27d2e
2022-11-10 14:35:23 -05:00
Wei Li
0643c4ebb5 Fix the git_master_bazel mixed build breakage.
There is no cflags defined for cortex-a9 CPU variant, set it to ArmGenericCflags to fix the mixed build breakage for now.

Bug: 258397103
Test: m com.android.build --bazel-mode-staging
Change-Id: I79a9877846ced6334c09a4f5caf115c436f600e6
2022-11-09 22:43:53 -08:00
Mitch Phillips
bbebe7f5a4 Remove deprecated experimental-new-pass-manager flag.
https://reviews.llvm.org/D136789 removed this flag, it's been a no-op
since 15.0.0. The current Android compiler is 15.0.3, but upcoming
compilers will error on the fact that this flag doesn't exist any more.

Change-Id: I54666175b521ed5cdd76c53ed700ad4ddf6931da
Test: make
Bug: N/A
2022-11-03 18:04:21 +00:00
Treehugger Robot
95a3752ab1 Merge "cc_fuzz targets depend on fuzz_interceptors for HWASan builds" 2022-11-02 21:57:20 +00:00
Kris Alder
d406da104b cc_fuzz targets depend on fuzz_interceptors for HWASan builds
This allows us fuzzers to get coverage feedback and mutate more
intelligently based on feedback from strcmp, memcpy, and similar
functions.

Bug: 208297094
Test: make and run 'example_fuzzer', build 'haiku'
Change-Id: Ic51c207f8644cda885fb3f453cc583e2ee1e8c1d
2022-11-02 11:25:59 -07:00
Sam Delmerico
8604df6fb1 Merge "export clang-tidy variables to soong_injection" 2022-10-31 17:23:19 +00:00
Yabin Cui
0ebe7c8eb3 Prepare to build clang-r475365
Allow single-bit-bitfield-constant-conversion warnings to pass
with r475365.

Bug: 253033919
Test: run test_compiler.py
Change-Id: Icc1f1c6c013418f1e5bb839ef70ebe8498b9cedc
2022-10-27 15:55:03 -07:00
Sam Delmerico
b9b6c6773e export clang-tidy variables to soong_injection
Change-Id: If6470c35f5ee8f4867177d641640cdc2806de574
2022-10-25 15:55:17 -04:00
Treehugger Robot
2238c73723 Merge "Export all constants for linux_bionic" 2022-10-24 20:06:48 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
c4d11bc470 Export all constants for linux_bionic
They need to be referenced in adding a `linux_bionic` Bazel cc_toolchain

Test: CI
Bug: 205771732
Change-Id: I5469eac5559cdf76e02fdeccaf496e5ffcc1b08e
2022-10-24 18:08:56 +00:00
Krzysztof Kosiński
e0774afdd0 Merge "Globally enable -Wdefaulted-function-deleted." 2022-10-21 04:29:12 +00:00
Treehugger Robot
26e62c8d74 Merge "Set -fno-emulated-tls for riscv64" 2022-10-21 03:31:38 +00:00
Colin Cross
2c435a00ff Set -fno-emulated-tls for riscv64
Building for riscv64 fails with link errors on __thread variables.
Set -fno-emulated-tls to fix it.

Bug: 254713216
Test: lunch aosp_riscv64-userdebug && m ALLOW_MISSING_DEPENDENCIES=true ndk_sysroot
Change-Id: I3dca81dfd277d681b6c868a5e8385e3a37335a5f
2022-10-20 14:31:24 -07:00
Yi Kong
a9e1df1522 Enable ICF=safe for host binaries as well
We regressed binary size when we switch Darwin to use LLD, because
Darwin LD64 does ICF by default. Turn on ICF for host binaries to regain
the binary size savings (saves some space for Linux as well).

Test: presubmit
Bug: 236924555
Change-Id: I433062c3d263d69e431c1552faf1f18b13c5da42
2022-10-20 14:45:52 +09:00
Chih-Hung Hsieh
ff2efae9b0 Disable external/grpc-grpc even with TIDY_EXTERNAL_VENDOR=1
Some projects do not allow or fix tidy warnings to
avoid warnings-as-errors. They should not run
clang-tidy even with TIDY_EXTERNAL_VENDOR=1.

Bug: 244631413
Test: presubmit; TIDY_EXTERNAL_VENDOR=1 make tidy-external_subset
Change-Id: Id86a55c222fdad813c1c3434245c86bb97d0cad6
2022-10-18 18:58:50 -07:00
Chih-Hung Hsieh
d21c46a5f8 Allow default clang-tidy checks
This will avoid suppressing all checks in user defined
.clang-tidy config files.

Bug: 252877310
Test: TIDY_EXTERNAL_VENDOR=1 make tidy-soong_subset
Change-Id: I99032300542e9b83cba60b00f8d328c63b5728e2
2022-10-18 21:12:19 +00:00
Stephen Hines
6186318b72 Update clang version to clang-r468909b
Bug: http://b/241011085
Bug: http://b/235405318
Test: Builds
Change-Id: Ib415277284fc69f5a6b59b6998f6cdbcaefdd13e
2022-10-07 00:33:59 -07:00
Chih-Hung Hsieh
a4724a0c4e Remove flags rejected by RBE input processor
* This is a temporary work around until the RBE input processor
  can handle those flags.
* It's okay to remove some cflags in clang-tidy command
  if they do not affect tidy check results.

Bug: 248371171
Test: enable RBE; RBE_CLANG_TIDY_EXEC_STRATEGY=remote; make tidy-soong_subset
Change-Id: If499bd7e1f0f89ccc3b7f7df7d67cfc64dc67028
2022-10-04 16:52:36 -07:00
Colin Cross
f05b0d35d2 Add riscv64-linux-android support
Add barebones riscv64-linux-android support.  This should be enough
to add riscv64-specific entries to Android.bp files, but can't
actually compile anything until there are riscv64 toolchains.

Test: arch_test.go
Change-Id: I0dcc7e797d9352dd38243be908a7f19004ff3db1
2022-10-03 08:43:13 -07:00
Colin Cross
4fa894d366 Removed unused GCC references
Remove Toolchain.GccRoot, Toolchain.GccVersion, and Toolchain.GccTriple
that were only used by an unused function.  This removes most of the
references to GCC, although there are still some left in the host
toolchains.

Test: No change to build.ninja for aosp_cf_x86_64_phone-userdebug or aosp_raven-userdebug
Change-Id: I72b8af1f9aa83e6e15c9e00ed1e817b6cc3a031a
2022-09-30 19:32:48 -07:00
Chih-hung Hsieh
5c40a92d33 Reland "Update clang version to clang-r468909"
This reverts commit fc21a0e55b.
Reason for revert: broken builds/tests were fixed

Bug: 241011085
Change-Id: Ifba0bb05e690c8204e3ef34f59d7bf7ef57638ed
2022-09-27 17:18:21 +00:00
Stephen Hines
fc21a0e55b Revert "Update clang version to clang-r468909"
This reverts commit 395e50544f.

Bug: 241941550
Bug: 241601211
Bug: 241011085
Test: Builds

Change-Id: Ic2bb5d5dc52db743435defd129b5c2d0dc794d58
2022-09-22 18:59:01 -07:00
Chih-hung Hsieh
b472d457e0 Merge "Update clang version to clang-r468909" 2022-09-22 23:12:41 +00:00
Colin Cross
5555726311 Merge "Revert^2 "Drop dependency on musl_linker_script"" 2022-09-19 23:18:50 +00:00
Chih-Hung Hsieh
395e50544f Update clang version to clang-r468909
* Allow/show clang deprecated* and array-parameter warnings.

Upstream commit date: 2022-07-25

Test: presubmit
Bug: 241941550
Bug: 241601211
Bug: 241011085
Change-Id: I5c152823500dde656e1306afcb6f45e824b50102
2022-09-19 19:26:18 +00:00
Colin Cross
3699f83c6e Revert^2 "Drop dependency on musl_linker_script"
89a7ba8e38

Change-Id: I6210c46b3f26e86c2531ed254e341c845fd8acbb
2022-09-16 17:26:24 +00:00
Alyssa Ketpreechasawat
89a7ba8e38 Revert "Drop dependency on musl_linker_script"
Revert submission 2216822

Reason for revert: DroidMonitor: Potential culprit for Bug 247028852
Reverted Changes:
I086bb0d14:Copy cc_object output files to a name that matches...
I868cb8b5b:Drop dependency on musl_linker_script
Ib9b5530d3:Run __libc_start_main directly
I1a197dc5c:Move replacement program headers into bss
If59613374:Support missing PT_PHDR
Icb7d8d3e0:Remove note from relinterp
I05cdee7a4:Remove ldso_trampoline_debugger.c

Change-Id: I7eb89766881fb7d76288267ed3b052348b0a9bca
2022-09-16 08:40:25 +00:00
Florian Mayer
a43630f0a1 [cleanup] remove unused variable.
Change-Id: I6788a8ec1db51c0c72ec64d4df5269622934e857
2022-09-15 17:00:39 -07:00