mirror of
https://github.com/esphome/esphome.git
synced 2024-12-25 15:04:54 +01:00
clang-tidy use only g++ flags
This commit is contained in:
parent
d4a8a0ff88
commit
342febe940
2 changed files with 5 additions and 5 deletions
|
@ -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(
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue