From c306fbaa1c0dc8be7d015d55db4ddd3253ccf98e Mon Sep 17 00:00:00 2001 From: Than McIntosh Date: Wed, 8 Apr 2020 20:05:31 -0400 Subject: [PATCH] [dev.link] cmd/link: add IsWasm method for Target Add Target.IsWasm method. Change-Id: Ia3bfc359208b8e392b1a484c41aebce9761bc2f1 Reviewed-on: https://go-review.googlesource.com/c/go/+/227758 Reviewed-by: Cherry Zhang Reviewed-by: Jeremy Faller --- src/cmd/link/internal/ld/target.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cmd/link/internal/ld/target.go b/src/cmd/link/internal/ld/target.go index 95f6ca17ab..09a67365d0 100644 --- a/src/cmd/link/internal/ld/target.go +++ b/src/cmd/link/internal/ld/target.go @@ -99,6 +99,10 @@ func (t *Target) IsS390X() bool { return t.Arch.Family == sys.S390X } +func (t *Target) IsWasm() bool { + return t.Arch.Family == sys.Wasm +} + // // OS Functions //