fix: Windows cross-compilation support (GOOS=windows)
- debugcli.go/debugtui.go: add //go:build !windows tag - debugcli_windows.go/debugtui_windows.go: no-op stubs - cdx/cdx.go: extract mmap to platform-specific files - cdx/mmap_posix.go: syscall.Mmap/Munmap - cdx/mmap_windows.go: no-op (falls back to read) - ntx/ntx.go, ntx/build.go: same mmap extraction - ntx/mmap_posix.go, ntx/mmap_windows.go: platform split Builds verified: linux/amd64, windows/amd64, darwin/arm64, darwin/amd64 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
//go:build !windows
|
||||
|
||||
// Copyright (c) 2026 Charles KWON OhJun (charleskwonohjun@gmail.com)
|
||||
// All rights reserved.
|
||||
|
||||
|
||||
13
hbrt/debugcli_windows.go
Normal file
13
hbrt/debugcli_windows.go
Normal file
@@ -0,0 +1,13 @@
|
||||
//go:build windows
|
||||
|
||||
package hbrt
|
||||
|
||||
import "fmt"
|
||||
|
||||
// CLIDebugger returns a no-op debug callback on Windows.
|
||||
func CLIDebugger() DebugCallback {
|
||||
return func(event *DebugEvent) int {
|
||||
fmt.Println("[debugger not available on Windows]")
|
||||
return 0 // continue
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
//go:build !windows
|
||||
|
||||
// Copyright (c) 2026 Charles KWON OhJun (charleskwonohjun@gmail.com)
|
||||
// All rights reserved.
|
||||
|
||||
|
||||
13
hbrt/debugtui_windows.go
Normal file
13
hbrt/debugtui_windows.go
Normal file
@@ -0,0 +1,13 @@
|
||||
//go:build windows
|
||||
|
||||
package hbrt
|
||||
|
||||
import "fmt"
|
||||
|
||||
// TUIDebugger returns a no-op debug callback on Windows.
|
||||
func TUIDebugger() DebugCallback {
|
||||
return func(event *DebugEvent) int {
|
||||
fmt.Println("[TUI debugger not available on Windows]")
|
||||
return 0 // continue
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user