Update CI to a more recent Clang on Linux x86-64

/opt/llvm/clang/bin/clang -v
clang version 21.0.0git (https://github.com/llvm/llvm-project 2dee1a2de3d2cc774fbd43507cf4320418fbf279)

This change adds `-Wno-unused-command-line-argument`
to the Clang builds since Bazel is now providing an unused
`-c` to rules that do header syntax checking only.
Rules that were missing copts which causes them to
encounter this error are also fixed.

PiperOrigin-RevId: 764757573
Change-Id: I1eba676327a6023c5b8afb54499e4a3a72c2cdad
This commit is contained in:
Derek Mauro
2025-05-29 09:16:34 -07:00
committed by Copybara-Service
parent 61103b948d
commit 2dd8036891
8 changed files with 12 additions and 3 deletions

View File

@@ -719,6 +719,7 @@ cc_library(
testonly = True,
srcs = ["internal/scoped_set_env.cc"],
hdrs = ["internal/scoped_set_env.h"],
copts = ABSL_DEFAULT_COPTS,
linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = [
"//absl:__subpackages__",

View File

@@ -121,6 +121,7 @@ list(APPEND ABSL_LLVM_FLAGS
"-Wno-implicit-float-conversion"
"-Wno-implicit-int-float-conversion"
"-Wno-unknown-warning-option"
"-Wno-unused-command-line-argument"
"-DNOMINMAX"
)
@@ -160,6 +161,7 @@ list(APPEND ABSL_LLVM_TEST_FLAGS
"-Wno-implicit-float-conversion"
"-Wno-implicit-int-float-conversion"
"-Wno-unknown-warning-option"
"-Wno-unused-command-line-argument"
"-DNOMINMAX"
"-Wno-deprecated-declarations"
"-Wno-implicit-int-conversion"

View File

@@ -122,6 +122,7 @@ ABSL_LLVM_FLAGS = [
"-Wno-implicit-float-conversion",
"-Wno-implicit-int-float-conversion",
"-Wno-unknown-warning-option",
"-Wno-unused-command-line-argument",
"-DNOMINMAX",
]
@@ -161,6 +162,7 @@ ABSL_LLVM_TEST_FLAGS = [
"-Wno-implicit-float-conversion",
"-Wno-implicit-int-float-conversion",
"-Wno-unknown-warning-option",
"-Wno-unused-command-line-argument",
"-DNOMINMAX",
"-Wno-deprecated-declarations",
"-Wno-implicit-int-conversion",

View File

@@ -84,6 +84,7 @@ ABSL_LLVM_FLAGS = [
# Disable warnings on unknown warning flags (when warning flags are
# unknown on older compiler versions)
"-Wno-unknown-warning-option",
"-Wno-unused-command-line-argument",
# Don't define min and max macros (Build on Windows using clang)
"-DNOMINMAX",
]

View File

@@ -49,6 +49,7 @@ cc_library(
cc_test(
name = "sample_recorder_test",
srcs = ["internal/sample_recorder_test.cc"],
copts = ABSL_TEST_COPTS,
linkopts = ABSL_DEFAULT_LINKOPTS,
tags = [
"no_test_wasm",
@@ -69,6 +70,7 @@ cc_library(
name = "exponential_biased",
srcs = ["internal/exponential_biased.cc"],
hdrs = ["internal/exponential_biased.h"],
copts = ABSL_DEFAULT_COPTS,
linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = [
"//absl:__subpackages__",

View File

@@ -1462,6 +1462,7 @@ cc_library(
testonly = True,
srcs = ["internal/pow10_helper.cc"],
hdrs = ["internal/pow10_helper.h"],
copts = ABSL_DEFAULT_COPTS,
linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = ["//visibility:private"],
deps = ["//absl/base:config"],

View File

@@ -663,7 +663,7 @@ absl_cc_library(
SRCS
"internal/pow10_helper.cc"
COPTS
${ABSL_TEST_COPTS}
${ABSL_DEFAULT_COPTS}
DEPS
absl::config
TESTONLY

View File

@@ -16,7 +16,7 @@
# Test scripts should source this file to get the identifiers.
readonly LINUX_ALPINE_CONTAINER="gcr.io/google.com/absl-177019/alpine:20230612"
readonly LINUX_CLANG_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20250430"
readonly LINUX_CLANG_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20250527"
readonly LINUX_ARM_CLANG_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_arm_hybrid-latest:20250430"
readonly LINUX_GCC_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20250430"
readonly LINUX_GCC_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20250527"
readonly LINUX_GCC_FLOOR_CONTAINER="gcr.io/google.com/absl-177019/linux_gcc-floor:20250430"