From 32daf2af16118b07b217bbb2f8653831bf86a30e Mon Sep 17 00:00:00 2001 From: Mutalib Mohammed Date: Tue, 28 Oct 2025 16:45:29 +0000 Subject: [PATCH] fix: combine copts and cxxopts for improved compiler argument handling --- lint/clang_tidy.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lint/clang_tidy.bzl b/lint/clang_tidy.bzl index 202cd6fe..792f120f 100644 --- a/lint/clang_tidy.bzl +++ b/lint/clang_tidy.bzl @@ -262,7 +262,7 @@ def _get_args(ctx, compilation_context, srcs): def _get_compiler_args(ctx, compilation_context, srcs): # add args specified by the toolchain, on the command line and rule copts args = [] - rule_flags = ctx.rule.attr.copts if hasattr(ctx.rule.attr, "copts") else [] + rule_flags = list(getattr(ctx.rule.attr, "copts", [])) + list(getattr(ctx.rule.attr, "cxxopts", [])) sources_are_cxx = _is_cxx(srcs[0]) if (sources_are_cxx): user_flags = ctx.fragments.cpp.cxxopts + ctx.fragments.cpp.copts