-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go/analysis/passes/asmdecl: add build tag for loong64
The arch "loong64" doesn't exist before go 1.19 causing a "unknown architecture" message printed to stderr when asmdecl is imported. A build tag now prevents "loong64" from being checked in earlier versions of go. Fixes golang/go#52646 Change-Id: Ibc83ce02d92cfb709a773ca758b21a80516a399c Reviewed-on: https://go-review.googlesource.com/c/tools/+/403874 Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Robert Findley <rfindley@google.com>
- Loading branch information
Showing
3 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright 2022 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
//go:build !go1.19 | ||
// +build !go1.19 | ||
|
||
package asmdecl | ||
|
||
func additionalArches() []*asmArch { | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright 2022 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
//go:build go1.19 | ||
// +build go1.19 | ||
|
||
package asmdecl | ||
|
||
var asmArchLoong64 = asmArch{name: "loong64", bigEndian: false, stack: "R3", lr: true} | ||
|
||
func additionalArches() []*asmArch { | ||
return []*asmArch{&asmArchLoong64} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters