1diff --git a/builder/library.go b/builder/library.go
2index 6517355b..b8de1894 100644
3--- a/builder/library.go
4+++ b/builder/library.go
5@@ -142,7 +142,7 @@ func (l *Library) load(config *compileopts.Config, tmpdir string) (job *compileJ
6 // Note: -fdebug-prefix-map is necessary to make the output archive
7 // reproducible. Otherwise the temporary directory is stored in the archive
8 // itself, which varies each run.
9- args := append(l.cflags(target, headerPath), "-c", "-Oz", "-gdwarf-4", "-ffunction-sections", "-fdata-sections", "-Wno-macro-redefined", "--target="+target, "-fdebug-prefix-map="+dir+"="+remapDir)
10+ args := append(l.cflags(target, headerPath), "-c", "-Oz", "-gdwarf-4", "-ffunction-sections", "-fdata-sections", "-Wno-macro-redefined", "--target="+target, "-fdebug-prefix-map="+dir+"="+remapDir, "-isystem", "@clang_include@")
11 cpu := config.CPU()
12 if cpu != "" {
13 // X86 has deprecated the -mcpu flag, so we need to use -march instead.
14diff --git a/compileopts/config.go b/compileopts/config.go
15index 39fc4f2a..8711b5a8 100644
16--- a/compileopts/config.go
17+++ b/compileopts/config.go
18@@ -264,6 +264,7 @@ func (c *Config) CFlags() []string {
19 for _, flag := range c.Target.CFlags {
20 cflags = append(cflags, strings.ReplaceAll(flag, "{root}", goenv.Get("TINYGOROOT")))
21 }
22+ cflags = append([]string{"-isystem", "@clang_include@"}, cflags...)
23 switch c.Target.Libc {
24 case "darwin-libSystem":
25 root := goenv.Get("TINYGOROOT")