Skip to content

Commit 25204dc

Browse files
giautmsmira
authored andcommitted
fix(machined): change constants.MinimumGOAMD64Level using build tag
Context: #8537 (comment) Signed-off-by: Giau. Tran Minh <hello@giautm.dev> Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
1 parent 9cd2d79 commit 25204dc

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

pkg/machinery/constants/amd64.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// This Source Code Form is subject to the terms of the Mozilla Public
2+
// License, v. 2.0. If a copy of the MPL was not distributed with this
3+
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
4+
5+
//go:build !amd64.v1
6+
7+
package constants
8+
9+
const (
10+
// MinimumGOAMD64Level is the minimum x86_64 microarchitecture level required by Talos.
11+
MinimumGOAMD64Level = 2
12+
)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// This Source Code Form is subject to the terms of the Mozilla Public
2+
// License, v. 2.0. If a copy of the MPL was not distributed with this
3+
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
4+
5+
//go:build amd64.v1
6+
7+
package constants
8+
9+
const (
10+
// MinimumGOAMD64Level is the minimum x86_64 microarchitecture level required by Talos.
11+
MinimumGOAMD64Level = 1
12+
)

pkg/machinery/constants/constants.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,9 +1231,6 @@ const (
12311231
// SyslogListenSocketPath is the path to the syslog socket.
12321232
SyslogListenSocketPath = "/dev/log"
12331233

1234-
// MinimumGOAMD64Level is the minimum x86_64 microarchitecture level required by Talos.
1235-
MinimumGOAMD64Level = 2
1236-
12371234
// ConsoleLogErrorSuppressThreshold is the threshold for suppressing console log errors.
12381235
ConsoleLogErrorSuppressThreshold = 4
12391236

0 commit comments

Comments
 (0)