depot/third_party/nixpkgs/pkgs/development/compilers/tinygo/0004-fix-darwin-build.patch
Default email b5f92a349c Project import generated by Copybara.
GitOrigin-RevId: 7c9cc5a6e5d38010801741ac830a3f8fd667a7a0
2023-10-19 15:55:26 +02:00

12 lines
491 B
Diff

diff --git a/compileopts/config.go b/compileopts/config.go
index 39fc4f2a..fb5d4575 100644
--- a/compileopts/config.go
+++ b/compileopts/config.go
@@ -269,6 +269,7 @@ func (c *Config) CFlags() []string {
root := goenv.Get("TINYGOROOT")
cflags = append(cflags,
"--sysroot="+filepath.Join(root, "lib/macos-minimal-sdk/src"),
+ "-isystem", filepath.Join(root, "lib/macos-minimal-sdk/src/usr/include"), // necessary for Nix
)
case "picolibc":
root := goenv.Get("TINYGOROOT")