From f23d924918c581c68cd5cda5f12b4f8198ac0c35 Mon Sep 17 00:00:00 2001 From: yuyawk <46620009+yuyawk@users.noreply.github.com> Date: Mon, 14 Oct 2024 22:55:29 +0900 Subject: [PATCH] fix: Take `--conlyopt` into consideration (#77) --- clang_tidy/clang_tidy.bzl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clang_tidy/clang_tidy.bzl b/clang_tidy/clang_tidy.bzl index 89e9950..7f96c36 100644 --- a/clang_tidy/clang_tidy.bzl +++ b/clang_tidy/clang_tidy.bzl @@ -132,6 +132,8 @@ def _toolchain_flags(ctx, action_name = ACTION_NAMES.cpp_compile): user_compile_flags = ctx.fragments.cpp.copts if action_name == ACTION_NAMES.cpp_compile: user_compile_flags.extend(ctx.fragments.cpp.cxxopts) + elif action_name == ACTION_NAMES.c_compile and hasattr(ctx.fragments.cpp, "conlyopts"): + user_compile_flags.extend(ctx.fragments.cpp.conlyopts) compile_variables = cc_common.create_compile_variables( feature_configuration = feature_configuration, cc_toolchain = cc_toolchain,