mirror of
https://github.com/esphome/esphome.git
synced 2025-08-03 17:07:54 +00:00
Revert "more aggressive fix"
This reverts commit 4f10a0ccf73e22b283cd0f5e3aa57e8f1368d382.
This commit is contained in:
parent
5e8f1d82c3
commit
b95449615f
@ -105,7 +105,7 @@ def clang_options(idedata):
|
|||||||
# idedata contains include directories for all toolchains of this platform, only use those from the one in use
|
# idedata contains include directories for all toolchains of this platform, only use those from the one in use
|
||||||
toolchain_dir = os.path.normpath(f"{idedata['cxx_path']}/../../")
|
toolchain_dir = os.path.normpath(f"{idedata['cxx_path']}/../../")
|
||||||
for directory in idedata["includes"]["toolchain"]:
|
for directory in idedata["includes"]["toolchain"]:
|
||||||
if directory.startswith(toolchain_dir) or "/.platformio/" in directory:
|
if directory.startswith(toolchain_dir):
|
||||||
cmd.extend(["-isystem", directory])
|
cmd.extend(["-isystem", directory])
|
||||||
|
|
||||||
# add library include directories using -isystem to suppress their errors
|
# add library include directories using -isystem to suppress their errors
|
||||||
@ -129,11 +129,6 @@ def clang_options(idedata):
|
|||||||
# add the esphome include directory using -I
|
# add the esphome include directory using -I
|
||||||
cmd.extend(["-I", root_path])
|
cmd.extend(["-I", root_path])
|
||||||
|
|
||||||
# Also ensure any remaining directories with .platformio are system includes
|
|
||||||
for i in range(len(cmd)):
|
|
||||||
if cmd[i] == "-I" and i + 1 < len(cmd) and "/.platformio/" in cmd[i + 1]:
|
|
||||||
cmd[i] = "-isystem"
|
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user