aboutsummaryrefslogtreecommitdiffhomepage
path: root/compileopts/target.go
diff options
context:
space:
mode:
Diffstat (limited to 'compileopts/target.go')
-rw-r--r--compileopts/target.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/compileopts/target.go b/compileopts/target.go
index 3368e20c4..501d99f11 100644
--- a/compileopts/target.go
+++ b/compileopts/target.go
@@ -388,6 +388,8 @@ func defaultTarget(options *Options) (*TargetSpec, error) {
"-arch", llvmarch,
"-platform_version", "macos", platformVersion, platformVersion,
)
+ spec.ExtraFiles = append(spec.ExtraFiles,
+ "src/runtime/runtime_unix.c")
case "linux":
spec.Linker = "ld.lld"
spec.RTLib = "compiler-rt"
@@ -407,6 +409,8 @@ func defaultTarget(options *Options) (*TargetSpec, error) {
// proper threading.
spec.CFlags = append(spec.CFlags, "-mno-outline-atomics")
}
+ spec.ExtraFiles = append(spec.ExtraFiles,
+ "src/runtime/runtime_unix.c")
case "windows":
spec.Linker = "ld.lld"
spec.Libc = "mingw-w64"