From 342febe94009698d060275be91c6664b8f057f10 Mon Sep 17 00:00:00 2001 From: Tomasz Duda Date: Fri, 26 Jul 2024 09:42:58 +0200 Subject: [PATCH] clang-tidy use only g++ flags --- script/clang-tidy | 5 ----- script/helpers.py | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/script/clang-tidy b/script/clang-tidy index 6e79c84ea7..3f40932fad 100755 --- a/script/clang-tidy +++ b/script/clang-tidy @@ -52,14 +52,9 @@ def clang_options(idedata): if "zephyr" in triplet: omit_flags += ( - "-fno-printf-return-value", "-fno-reorder-functions", - "-format-zero-length", "-mfp16-format=ieee", - "-std=c99", - "-fno-defer-pop", "--param=min-pagesize=0", - "--specs=picolibc.specs", ) else: cmd.extend( diff --git a/script/helpers.py b/script/helpers.py index 002c6590af..1b463c5f1f 100644 --- a/script/helpers.py +++ b/script/helpers.py @@ -194,6 +194,8 @@ CONFIG_NEWLIB_LIBC=y for entry in commands: command = entry["command"] cxx_path = command.split()[0] + if not cxx_path.endswith("++"): + continue return cxx_path def get_builtin_include_paths(compiler): @@ -240,6 +242,9 @@ CONFIG_NEWLIB_LIBC=y for entry in compile_commands: command = entry["command"] + exec = command.split()[0] + if exec != cxx_path: + continue idedata["includes"]["build"].update(extract_include_paths(command)) idedata["defines"].update(extract_defines(command))