From 9be2139259e1d03763640002f38585a3cdb05fa1 Mon Sep 17 00:00:00 2001 From: Tomasz Duda Date: Wed, 24 Jul 2024 21:28:16 +0200 Subject: [PATCH] fix clang --- script/helpers.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/script/helpers.py b/script/helpers.py index 29377cf65e..002c6590af 100644 --- a/script/helpers.py +++ b/script/helpers.py @@ -165,7 +165,12 @@ int main() { return 0;} ) zephyr_dir = Path(build_dir / "zephyr") zephyr_dir.mkdir(exist_ok=True) - Path(zephyr_dir / "prj.conf").write_text("", encoding="utf-8") + Path(zephyr_dir / "prj.conf").write_text( + """ +CONFIG_NEWLIB_LIBC=y +""", + encoding="utf-8", + ) subprocess.run( ["pio", "run", "-e", build_environment, "-d", build_dir], check=False ) @@ -240,6 +245,14 @@ int main() { return 0;} idedata["defines"].update(extract_defines(command)) idedata["cxx_flags"].update(extract_cxx_flags(command)) + idedata["defines"].update( + [ + "pthread_attr_t=pthread_attr", + "pthread_mutexattr_t=pthread_mutexattr", + "pthread_condattr_t=pthread_condattr", + ] + ) + # Convert sets to lists for JSON serialization idedata["includes"]["build"] = list(idedata["includes"]["build"]) idedata["defines"] = list(idedata["defines"])