fix(build): support Bazel native builds on NixOS ARM64
This commit is contained in:
+7
-3
@@ -150,11 +150,15 @@ crate.from_cargo(
|
||||
)
|
||||
|
||||
# audiopus_sys builds its vendored opus via the `cmake` crate: give the build
|
||||
# script a PATH that resolves cmake/make (runner image, GH runners, dev hosts)
|
||||
# and the policy override its old CMakeLists needs under CMake 4.x. The cmake
|
||||
# script a PATH that resolves cmake/make (runner image, GH runners, NixOS, and
|
||||
# other dev hosts) and the policy override its old CMakeLists needs under CMake
|
||||
# 4.x. The patch pins CMAKE_INSTALL_LIBDIR=lib because the crate always links
|
||||
# from <prefix>/lib while CMake uses lib64 on some aarch64 systems. The cmake
|
||||
# crate picks up CC/CFLAGS from the Bazel cc toolchain on its own.
|
||||
crate.annotation(
|
||||
crate = "audiopus_sys",
|
||||
patches = ["//bazel/patches:audiopus-sys-libdir.patch"],
|
||||
patch_args = ["-p1"],
|
||||
build_script_env = {
|
||||
"CMAKE_POLICY_VERSION_MINIMUM": "3.5",
|
||||
# msvc cross only (cmake-rs reads VAR_<triple> before VAR; the key is
|
||||
@@ -174,7 +178,7 @@ crate.annotation(
|
||||
# the UBSan runtime. Opus shipped without sanitizers under
|
||||
# cargo-zigbuild too.
|
||||
"CFLAGS": "-fno-sanitize=undefined",
|
||||
"PATH": "/usr/local/bin:/usr/bin:/bin:/opt/homebrew/bin",
|
||||
"PATH": "/usr/local/bin:/usr/bin:/bin:/opt/homebrew/bin:/run/current-system/sw/bin",
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user