gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/pkg/safecopy/BUILD (about) 1 load("//tools:defs.bzl", "go_library", "go_test") 2 3 package( 4 default_applicable_licenses = ["//:license"], 5 licenses = ["notice"], 6 ) 7 8 go_library( 9 name = "safecopy", 10 srcs = [ 11 "atomic_amd64.s", 12 "atomic_arm64.s", 13 "memclr_amd64.s", 14 "memclr_arm64.s", 15 "memcpy_amd64.s", 16 "memcpy_arm64.s", 17 "safecopy.go", 18 "safecopy_amd64_unsafe.go", 19 "safecopy_arm64.go", 20 "safecopy_unsafe.go", 21 "sighandler_amd64.s", 22 "sighandler_arm64.s", 23 "xrstor_amd64.s", 24 ], 25 visibility = ["//:sandbox"], 26 deps = [ 27 "//pkg/errors", 28 "//pkg/errors/linuxerr", 29 "//pkg/sighandling", 30 "@org_golang_x_sys//unix:go_default_library", 31 ], 32 ) 33 34 go_test( 35 name = "safecopy_test", 36 srcs = [ 37 "safecopy_test.go", 38 ], 39 library = ":safecopy", 40 deps = [ 41 "@org_golang_x_sys//unix:go_default_library", 42 ], 43 ) 44 45 go_test( 46 name = "safecopy_x_test", 47 srcs = [ 48 "safecopy_amd64_test.go", 49 "safecopy_arm64_test.go", 50 ], 51 # NOTE: It seems that bazel code generation does not properly parse tags 52 # when run via the architecture transition for nogo. This should be fixed 53 # at some point in the future, but for now we can simply skip nogo analysis 54 # on the test itself. It still applies to the core library. 55 nogo = False, 56 tags = ["not_run:arm"], 57 deps = [ 58 "//pkg/cpuid", 59 "//pkg/safecopy", 60 "//pkg/sentry/arch/fpu", 61 ], 62 )