File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -265,11 +265,17 @@ func (c *Config) CFlags(libclang bool) []string {
265265 }
266266 resourceDir := goenv .ClangResourceDir (libclang )
267267 if resourceDir != "" {
268- // The resoure directory contains the built-in clang headers like
268+ // The resource directory contains the built-in clang headers like
269269 // stdbool.h, stdint.h, float.h, etc.
270270 // It is left empty if we're using an external compiler (that already
271271 // knows these headers).
272- cflags = append (cflags , "-resource-dir=" + resourceDir )
272+ cflags = append (cflags ,
273+ "-resource-dir=" + resourceDir ,
274+ )
275+ if strings .HasPrefix (c .Triple (), "xtensa" ) {
276+ // workaround needed in LLVM 16, see: https://github.com/espressif/llvm-project/issues/83
277+ cflags = append (cflags , "-isystem" , filepath .Join (resourceDir , "include" ))
278+ }
273279 }
274280 switch c .Target .Libc {
275281 case "darwin-libSystem" :
You can’t perform that action at this time.
0 commit comments