[chore]: Bump github.com/tetratelabs/wazero from 1.8.2 to 1.9.0 (#3827)

Bumps [github.com/tetratelabs/wazero](https://github.com/tetratelabs/wazero) from 1.8.2 to 1.9.0.
- [Release notes](https://github.com/tetratelabs/wazero/releases)
- [Commits](https://github.com/tetratelabs/wazero/compare/v1.8.2...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/tetratelabs/wazero
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
dependabot[bot]
2025-02-25 12:48:02 +01:00
committed by GitHub
parent 96d39155f2
commit d2cf9de726
14 changed files with 88 additions and 80 deletions

View File

@ -6,18 +6,28 @@ package platform
import (
"runtime"
)
// archRequirementsVerified is set by platform-specific init to true if the platform is supported
var archRequirementsVerified bool
"github.com/tetratelabs/wazero/api"
"github.com/tetratelabs/wazero/experimental"
)
// CompilerSupported includes constraints here and also the assembler.
func CompilerSupported() bool {
return CompilerSupports(api.CoreFeaturesV2)
}
func CompilerSupports(features api.CoreFeatures) bool {
switch runtime.GOOS {
case "linux", "darwin", "freebsd", "netbsd", "dragonfly", "windows":
return archRequirementsVerified
if runtime.GOARCH == "arm64" {
if features.IsEnabled(experimental.CoreFeaturesThreads) {
return CpuFeatures.Has(CpuFeatureArm64Atomic)
}
return true
}
fallthrough
case "solaris", "illumos":
return runtime.GOARCH == "amd64" && archRequirementsVerified
return runtime.GOARCH == "amd64" && CpuFeatures.Has(CpuFeatureAmd64SSE4_1)
default:
return false
}

View File

@ -1,7 +0,0 @@
package platform
// init verifies that the current CPU supports the required AMD64 instructions
func init() {
// Ensure SSE4.1 is supported.
archRequirementsVerified = CpuFeatures.Has(CpuFeatureAmd64SSE4_1)
}

View File

@ -1,7 +0,0 @@
package platform
// init verifies that the current CPU supports the required ARM64 features
func init() {
// Ensure atomic instructions are supported.
archRequirementsVerified = CpuFeatures.Has(CpuFeatureArm64Atomic)
}