Skip to content

Commit

Permalink
further restrict net package usage
Browse files Browse the repository at this point in the history
Signed-off-by: leongross <leon.gross@9elements.com>
  • Loading branch information
leongross committed Oct 24, 2024
1 parent 513f947 commit 4ec411d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions loader/goroot.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,19 @@ func needsSyscallPackage(buildTags []string) bool {

// linuxNetworking returns whether the unmodified go linux net stack should be used
// until the full rework of the net package is done.
// To ensure the correct build target, check for the following tags:
// linux && !baremetal && !nintendoswitch && !tinygo.wasm
func linuxNetworking(buildTags []string) bool {
targetLinux := false
for _, tag := range buildTags {
if tag == "linux" {
return true
targetLinux = true
}
if tag == "baremetal" || tag == "nintendoswitch" || tag == "tinygo.wasm" {
return false
}
}
return false
return targetLinux
}

// The boolean indicates whether to merge the subdirs.
Expand Down

0 comments on commit 4ec411d

Please sign in to comment.