diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-11-11 16:15:12 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-11-11 16:15:12 -0800 |
commit | 07f9041187c5aedb8b3d3abdec17f3f00d159153 (patch) | |
tree | 5d8a04c7a45bd337821b02b8dbf20ddd541bb3c0 /pkg/sentry/platform/ring0/BUILD | |
parent | 2b0e4dc6aa7fb8a3f619220b72537a8fff2f95b4 (diff) | |
parent | 2cee0669299cd2b980aa9ae253c24107a4813b26 (diff) |
Merge pull request #918 from lubinszARM:pr_ring0
PiperOrigin-RevId: 279840214
Diffstat (limited to 'pkg/sentry/platform/ring0/BUILD')
-rw-r--r-- | pkg/sentry/platform/ring0/BUILD | 41 |
1 files changed, 36 insertions, 5 deletions
diff --git a/pkg/sentry/platform/ring0/BUILD b/pkg/sentry/platform/ring0/BUILD index 48b0ceaec..f1af18265 100644 --- a/pkg/sentry/platform/ring0/BUILD +++ b/pkg/sentry/platform/ring0/BUILD @@ -4,7 +4,7 @@ load("//tools/go_generics:defs.bzl", "go_template", "go_template_instance") package(licenses = ["notice"]) go_template( - name = "defs", + name = "defs_amd64", srcs = [ "defs.go", "defs_amd64.go", @@ -14,11 +14,29 @@ go_template( visibility = [":__subpackages__"], ) +go_template( + name = "defs_arm64", + srcs = [ + "aarch64.go", + "defs.go", + "defs_arm64.go", + "offsets_arm64.go", + ], + visibility = [":__subpackages__"], +) + go_template_instance( - name = "defs_impl", - out = "defs_impl.go", + name = "defs_impl_amd64", + out = "defs_impl_amd64.go", package = "ring0", - template = ":defs", + template = ":defs_amd64", +) + +go_template_instance( + name = "defs_impl_arm64", + out = "defs_impl_arm64.go", + package = "ring0", + template = ":defs_arm64", ) genrule( @@ -29,17 +47,30 @@ genrule( tools = ["//pkg/sentry/platform/ring0/gen_offsets"], ) +genrule( + name = "entry_impl_arm64", + srcs = ["entry_arm64.s"], + outs = ["entry_impl_arm64.s"], + cmd = "(echo -e '// build +arm64\\n' && $(location //pkg/sentry/platform/ring0/gen_offsets) && cat $(SRCS)) > $@", + tools = ["//pkg/sentry/platform/ring0/gen_offsets"], +) + go_library( name = "ring0", srcs = [ - "defs_impl.go", + "defs_impl_amd64.go", + "defs_impl_arm64.go", "entry_amd64.go", + "entry_arm64.go", "entry_impl_amd64.s", + "entry_impl_arm64.s", "kernel.go", "kernel_amd64.go", + "kernel_arm64.go", "kernel_unsafe.go", "lib_amd64.go", "lib_amd64.s", + "lib_arm64.go", "ring0.go", ], importpath = "gvisor.dev/gvisor/pkg/sentry/platform/ring0", |