mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 15:03:41 +00:00
windows: add support for the Boehm-Demers-Weiser GC
A few small changes were needed to make this work. In particular, I found a critical bug (see the previous commit) that needed to be fixed to make this work on Windows.
This commit is contained in:
committed by
Ron Evans
parent
fd3976b5bb
commit
b9bf0aa0da
@@ -395,8 +395,10 @@ func (c *Config) LibcCFlags() []string {
|
||||
"-nostdlibinc",
|
||||
"-isystem", filepath.Join(path, "include"),
|
||||
"-isystem", filepath.Join(root, "lib", "mingw-w64", "mingw-w64-headers", "crt"),
|
||||
"-isystem", filepath.Join(root, "lib", "mingw-w64", "mingw-w64-headers", "include"),
|
||||
"-isystem", filepath.Join(root, "lib", "mingw-w64", "mingw-w64-headers", "defaults", "include"),
|
||||
"-D_UCRT",
|
||||
"-D_WIN32_WINNT=0x0a00", // target Windows 10
|
||||
}
|
||||
case "":
|
||||
// No libc specified, nothing to add.
|
||||
|
||||
@@ -427,7 +427,7 @@ func defaultTarget(options *Options) (*TargetSpec, error) {
|
||||
"src/runtime/runtime_unix.c",
|
||||
"src/runtime/signal.c")
|
||||
case "windows":
|
||||
spec.GC = "precise"
|
||||
spec.GC = "boehm"
|
||||
spec.Linker = "ld.lld"
|
||||
spec.Libc = "mingw-w64"
|
||||
// Note: using a medium code model, low image base and no ASLR
|
||||
|
||||
Reference in New Issue
Block a user