mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-03 17:43:42 +08:00 
			
		
		
		
	vendor: update buildkit to master@8b7bcb900d3c
Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
		
							
								
								
									
										15
									
								
								vendor/golang.org/x/sys/cpu/hwcap_linux.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								vendor/golang.org/x/sys/cpu/hwcap_linux.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -24,6 +24,21 @@ var hwCap uint
 | 
			
		||||
var hwCap2 uint
 | 
			
		||||
 | 
			
		||||
func readHWCAP() error {
 | 
			
		||||
	// For Go 1.21+, get auxv from the Go runtime.
 | 
			
		||||
	if a := getAuxv(); len(a) > 0 {
 | 
			
		||||
		for len(a) >= 2 {
 | 
			
		||||
			tag, val := a[0], uint(a[1])
 | 
			
		||||
			a = a[2:]
 | 
			
		||||
			switch tag {
 | 
			
		||||
			case _AT_HWCAP:
 | 
			
		||||
				hwCap = val
 | 
			
		||||
			case _AT_HWCAP2:
 | 
			
		||||
				hwCap2 = val
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		return nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	buf, err := ioutil.ReadFile(procAuxv)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		// e.g. on android /proc/self/auxv is not accessible, so silently
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										16
									
								
								vendor/golang.org/x/sys/cpu/runtime_auxv.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								vendor/golang.org/x/sys/cpu/runtime_auxv.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
			
		||||
// Copyright 2023 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.
 | 
			
		||||
 | 
			
		||||
package cpu
 | 
			
		||||
 | 
			
		||||
// getAuxvFn is non-nil on Go 1.21+ (via runtime_auxv_go121.go init)
 | 
			
		||||
// on platforms that use auxv.
 | 
			
		||||
var getAuxvFn func() []uintptr
 | 
			
		||||
 | 
			
		||||
func getAuxv() []uintptr {
 | 
			
		||||
	if getAuxvFn == nil {
 | 
			
		||||
		return nil
 | 
			
		||||
	}
 | 
			
		||||
	return getAuxvFn()
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										19
									
								
								vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,19 @@
 | 
			
		||||
// Copyright 2023 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.21
 | 
			
		||||
// +build go1.21
 | 
			
		||||
 | 
			
		||||
package cpu
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	_ "unsafe" // for linkname
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
//go:linkname runtime_getAuxv runtime.getAuxv
 | 
			
		||||
func runtime_getAuxv() []uintptr
 | 
			
		||||
 | 
			
		||||
func init() {
 | 
			
		||||
	getAuxvFn = runtime_getAuxv
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user