mirror of
https://github.com/hanzoai/visor.git
synced 2026-09-24 17:04:14 +00:00
This change marks all ABI-related structs with `structs.HostLayout`, which was introduced in Go 1.23: https://pkg.go.dev/[email protected]#HostLayout This is intended to force the Go compiler to preserve the layout of the struct, removing it from the liberty of reordering fields as it sees fit. Adds a check automatically generated by our `go_library` rule wrapper which verifies this recursively for all exported structs in a package. Fixes issue #10693. PiperOrigin-RevId: 860238103
26 lines
491 B
Python
26 lines
491 B
Python
load("//tools:defs.bzl", "go_library")
|
|
|
|
package(default_applicable_licenses = ["//:license"])
|
|
|
|
licenses(["notice"])
|
|
|
|
go_library(
|
|
name = "nvgpu",
|
|
srcs = [
|
|
"classes.go",
|
|
"ctrl.go",
|
|
"frontend.go",
|
|
"frontend_unsafe.go",
|
|
"nvgpu.go",
|
|
"status.go",
|
|
"uvm.go",
|
|
],
|
|
hostlayout = True,
|
|
marshal = True,
|
|
visibility = [
|
|
"//pkg/sentry:internal",
|
|
"//tools:__subpackages__",
|
|
],
|
|
deps = ["//pkg/marshal"],
|
|
)
|