diff options
author | Haibo Xu <haibo.xu@arm.com> | 2019-04-18 16:20:45 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-04-18 16:22:08 -0700 |
commit | f4d434c18002c96511decf8ff1ebdbede46ca6a1 (patch) | |
tree | cc781d877ef0ea64ce33c46d6a30b76eefa4753a /vdso/BUILD | |
parent | c931c8e0829914718a729e20d7db0c2bf4e73f0b (diff) |
Enable vDSO support on arm64.
Signed-off-by: Haibo Xu <haibo.xu@arm.com>
Change-Id: I20103cd6d193431ab7e8120005da1f567b9bc2eb
PiperOrigin-RevId: 244280119
Diffstat (limited to 'vdso/BUILD')
-rw-r--r-- | vdso/BUILD | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/vdso/BUILD b/vdso/BUILD index 3df569233..f95f690eb 100644 --- a/vdso/BUILD +++ b/vdso/BUILD @@ -12,6 +12,11 @@ config_setting( constraint_values = ["@bazel_tools//platforms:x86_64"], ) +config_setting( + name = "aarch64", + constraint_values = ["@bazel_tools//platforms:aarch64"], +) + genrule( name = "vdso", srcs = [ @@ -21,7 +26,8 @@ genrule( "seqlock.h", "syscalls.h", "vdso.cc", - "vdso.lds", + "vdso_amd64.lds", + "vdso_arm64.lds", "vdso_time.h", "vdso_time.cc", ], @@ -49,7 +55,13 @@ genrule( "-Wl,-Bsymbolic " + "-Wl,-z,max-page-size=4096 " + "-Wl,-z,common-page-size=4096 " + - "-Wl,-T$(location vdso.lds) " + + select( + { + ":x86_64": "-Wl,-T$(location vdso_amd64.lds) ", + ":aarch64": "-Wl,-T$(location vdso_arm64.lds) ", + }, + no_match_error = "Unsupported architecture", + ) + "-o $(location vdso.so) " + "$(location vdso.cc) " + "$(location vdso_time.cc) " + |