Skip to content

Instantly share code, notes, and snippets.

@abishekmuthian
Last active February 26, 2020 13:25
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Patch to fix bazel rule issues for boost library in ARM (aarch64)
This patch fixes ARM (aarch64) bazel build rules for boost libraries when
building ray as discussed in this issue - https://github.com/ray-project/ray/issues/7184.
Patch v2 by Abishek Muthian (@heavyinfo).
--- BUILD.boost 2020-02-23 09:03:02.937872389 +0530
+++ BUILD.boost 2020-02-26 07:18:26.287128627 +0530
@@ -49,6 +49,15 @@
)
config_setting(
+ name = "linux_aarch64",
+ constraint_values = [
+ "@bazel_tools//platforms:linux",
+ "@bazel_tools//platforms:aarch64",
+ ],
+ visibility = ["//visibility:public"],
+)
+
+config_setting(
name = "linux_x86_64",
constraint_values = [
"@bazel_tools//platforms:linux",
@@ -91,6 +100,11 @@
) for name in ["make", "jump", "ontop"]]
BOOST_CTX_ASM_SOURCES = select({
+ ":linux_aarch64": [
+ "libs/context/src/asm/jump_arm64_aapcs_elf_gas.S",
+ "libs/context/src/asm/make_arm64_aapcs_elf_gas.S",
+ "libs/context/src/asm/ontop_arm64_aapcs_elf_gas.S",
+ ],
":linux_arm": [
"libs/context/src/asm/jump_arm_aapcs_elf_gas.S",
"libs/context/src/asm/make_arm_aapcs_elf_gas.S",
@@ -111,6 +125,7 @@
"libs/context/src/asm/jump_x86_64_ms_pe_masm.S",
"libs/context/src/asm/ontop_x86_64_ms_pe_masm.S",
],
+ "//conditions:default": [],
})
boost_library(
@@ -125,6 +140,7 @@
":windows_x86_64": [
"libs/context/src/windows/stack_traits.cpp",
],
+ "//conditions:default": [],
}),
exclude_src = [
"libs/context/src/fiber.cpp",
@@ -1616,6 +1632,7 @@
"BOOST_THREAD_USE_LIB",
"BOOST_WIN32_THREAD",
],
+ "//conditions:default": [],
}),
linkopts = select({
":linux": [
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment