mirror of
https://github.com/urbit/vere.git
synced 2024-09-11 03:45:31 +03:00
Replace arm64
with aarch64
as canonical identifier for 64-bit ARM architecture (#52)
This commit is contained in:
parent
16df0cd516
commit
1203b900bb
16
.github/workflows/shared.yml
vendored
16
.github/workflows/shared.yml
vendored
@ -34,11 +34,11 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- { target: linux-arm64, runner: ubuntu-22.04 }
|
- { target: linux-aarch64, runner: ubuntu-22.04 }
|
||||||
- { target: linux-x86_64, runner: ubuntu-22.04 }
|
- { target: linux-x86_64, runner: ubuntu-22.04 }
|
||||||
# GitHub doesn't provide M1 macOS machines, so we self-host a runner
|
# GitHub doesn't provide M1 macOS machines, so we self-host a runner
|
||||||
# instead.
|
# instead.
|
||||||
- { target: macos-arm64, runner: [self-hosted, macos, ARM64] }
|
- { target: macos-aarch64, runner: [self-hosted, macos, ARM64] }
|
||||||
- { target: macos-x86_64, runner: macos-12 }
|
- { target: macos-x86_64, runner: macos-12 }
|
||||||
|
|
||||||
runs-on: ${{ matrix.runner }}
|
runs-on: ${{ matrix.runner }}
|
||||||
@ -51,7 +51,7 @@ jobs:
|
|||||||
|
|
||||||
- name: chown /usr/local
|
- name: chown /usr/local
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ matrix.target }}" == "linux-arm64" || "${{ matrix.target }}" == "linux-x86_64" ]]; then
|
if [[ "${{ matrix.target }}" == "linux-aarch64" || "${{ matrix.target }}" == "linux-x86_64" ]]; then
|
||||||
# See https://github.com/actions/cache/issues/845.
|
# See https://github.com/actions/cache/issues/845.
|
||||||
sudo chown -R $(whoami) /usr/local
|
sudo chown -R $(whoami) /usr/local
|
||||||
fi
|
fi
|
||||||
@ -78,16 +78,16 @@ jobs:
|
|||||||
echo "${{ inputs.pace }}" > ./pkg/vere/PACE
|
echo "${{ inputs.pace }}" > ./pkg/vere/PACE
|
||||||
params=()
|
params=()
|
||||||
case "${{ matrix.target }}" in
|
case "${{ matrix.target }}" in
|
||||||
"linux-arm64")
|
"linux-aarch64")
|
||||||
bazel run //bazel/toolchain:aarch64-linux-musl-gcc
|
bazel run //bazel/toolchain:aarch64-linux-musl-gcc
|
||||||
params+=(
|
params+=(
|
||||||
--platforms=//:linux-arm64
|
--platforms=//:linux-aarch64
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
"linux-x86_64")
|
"linux-x86_64")
|
||||||
bazel run //bazel/toolchain:x86_64-linux-musl-gcc
|
bazel run //bazel/toolchain:x86_64-linux-musl-gcc
|
||||||
;;
|
;;
|
||||||
"macos-arm64")
|
"macos-aarch64")
|
||||||
;;
|
;;
|
||||||
"macos-x86_64")
|
"macos-x86_64")
|
||||||
# Switch Xcode path to match the path specified in our bazel toolchain.
|
# Switch Xcode path to match the path specified in our bazel toolchain.
|
||||||
@ -111,9 +111,9 @@ jobs:
|
|||||||
echo "$GITHUB_WORKSPACE/bazel-bin/pkg/vere/urbit"
|
echo "$GITHUB_WORKSPACE/bazel-bin/pkg/vere/urbit"
|
||||||
echo "urbit_static=$GITHUB_WORKSPACE/bazel-bin/pkg/vere/urbit" >> $GITHUB_ENV
|
echo "urbit_static=$GITHUB_WORKSPACE/bazel-bin/pkg/vere/urbit" >> $GITHUB_ENV
|
||||||
|
|
||||||
# We have no way of running the linux-arm64 tests on a linux-x86_64
|
# We have no way of running the linux-aarch64 tests on a linux-x86_64
|
||||||
# machine.
|
# machine.
|
||||||
if [[ "${{ matrix.target }}" != "linux-arm64" ]]; then
|
if [[ "${{ matrix.target }}" != "linux-aarch64" ]]; then
|
||||||
params+=(
|
params+=(
|
||||||
--build_tests_only
|
--build_tests_only
|
||||||
)
|
)
|
||||||
|
22
BUILD.bazel
22
BUILD.bazel
@ -7,10 +7,10 @@ load("@io_bazel_rules_docker//container:container.bzl", "container_push")
|
|||||||
#
|
#
|
||||||
|
|
||||||
config_setting(
|
config_setting(
|
||||||
name = "linux_arm64",
|
name = "linux_aarch64",
|
||||||
constraint_values = [
|
constraint_values = [
|
||||||
"@platforms//os:linux",
|
"@platforms//os:linux",
|
||||||
"@platforms//cpu:arm64",
|
"@platforms//cpu:aarch64",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -23,10 +23,10 @@ config_setting(
|
|||||||
)
|
)
|
||||||
|
|
||||||
config_setting(
|
config_setting(
|
||||||
name = "macos_arm64",
|
name = "macos_aarch64",
|
||||||
constraint_values = [
|
constraint_values = [
|
||||||
"@platforms//os:macos",
|
"@platforms//os:macos",
|
||||||
"@platforms//cpu:arm64",
|
"@platforms//cpu:aarch64",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -71,12 +71,12 @@ string_flag(
|
|||||||
# A platform takes one of two formats: `<compiler>-<os>-<cpu>` or `<os>-<cpu>`
|
# A platform takes one of two formats: `<compiler>-<os>-<cpu>` or `<os>-<cpu>`
|
||||||
# if the compiler is unspecified.
|
# if the compiler is unspecified.
|
||||||
|
|
||||||
# Linux arm64 platform with unspecified compiler.
|
# Linux aarch64 platform with unspecified compiler.
|
||||||
platform(
|
platform(
|
||||||
name = "linux-arm64",
|
name = "linux-aarch64",
|
||||||
constraint_values = [
|
constraint_values = [
|
||||||
"@platforms//os:linux",
|
"@platforms//os:linux",
|
||||||
"@platforms//cpu:arm64",
|
"@platforms//cpu:aarch64",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -100,19 +100,19 @@ platform(
|
|||||||
)
|
)
|
||||||
|
|
||||||
platform(
|
platform(
|
||||||
name = "macos-arm64",
|
name = "macos-aarch64",
|
||||||
constraint_values = [
|
constraint_values = [
|
||||||
"@platforms//os:macos",
|
"@platforms//os:macos",
|
||||||
"@platforms//cpu:arm64",
|
"@platforms//cpu:aarch64",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
platform(
|
platform(
|
||||||
name = "clang-macos-arm64",
|
name = "clang-macos-aarch64",
|
||||||
constraint_values = [
|
constraint_values = [
|
||||||
":clang",
|
":clang",
|
||||||
"@platforms//os:macos",
|
"@platforms//os:macos",
|
||||||
"@platforms//cpu:arm64",
|
"@platforms//cpu:aarch64",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -8,9 +8,9 @@ run:
|
|||||||
----------------------------------
|
----------------------------------
|
||||||
Host Platform | Target Platform
|
Host Platform | Target Platform
|
||||||
----------------------------------
|
----------------------------------
|
||||||
`linux-x86_64` | `linux-arm64`
|
`linux-x86_64` | `linux-aarch64`
|
||||||
`linux-x86_64` | `linux-x86_64`
|
`linux-x86_64` | `linux-x86_64`
|
||||||
`macos-arm64` | `macos-arm64`
|
`macos-aarch64` | `macos-aarch64`
|
||||||
`macos-x86_64` | `macos-x86_64`
|
`macos-x86_64` | `macos-x86_64`
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
@ -80,14 +80,14 @@ va.b.c pill.
|
|||||||
|
|
||||||
Release binaries:
|
Release binaries:
|
||||||
|
|
||||||
(linux-arm64)
|
(linux-aarch64)
|
||||||
https://bootstrap.urbit.org/urbit-vx.y-linux-arm64.tgz
|
https://bootstrap.urbit.org/urbit-vx.y-linux-aarch64.tgz
|
||||||
|
|
||||||
(linux-x86_64)
|
(linux-x86_64)
|
||||||
https://bootstrap.urbit.org/urbit-vx.y-linux-x86_64.tgz
|
https://bootstrap.urbit.org/urbit-vx.y-linux-x86_64.tgz
|
||||||
|
|
||||||
(macos-arm64)
|
(macos-aarch64)
|
||||||
https://bootstrap.urbit.org/urbit-vx.y-macos-arm64.tgz
|
https://bootstrap.urbit.org/urbit-vx.y-macos-aarch64.tgz
|
||||||
|
|
||||||
(macos-x86_64)
|
(macos-x86_64)
|
||||||
https://bootstrap.urbit.org/urbit-vx.y-macos-x86_64.tgz
|
https://bootstrap.urbit.org/urbit-vx.y-macos-x86_64.tgz
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
# platform-specific, wrap it in the appropriate URBIT_RUNTIME_* macro.
|
# platform-specific, wrap it in the appropriate URBIT_RUNTIME_* macro.
|
||||||
# We "gate" source patches with these macros so that we only ever need
|
# We "gate" source patches with these macros so that we only ever need
|
||||||
# at most one patch per dependency.
|
# at most one patch per dependency.
|
||||||
# (a) CPU architecture macros: `URBIT_RUNTIME_CPU_{X86_64,ARM64}`.
|
# (a) CPU architecture macros: `URBIT_RUNTIME_CPU_{X86_64,AARCH64}`.
|
||||||
# (b) OS macros: `URBIT_RUNTIME_OS_{LINUX,DARWIN,BSD,MINGW}`.
|
# (b) OS macros: `URBIT_RUNTIME_OS_{LINUX,DARWIN,BSD,MINGW}`.
|
||||||
# (2) Generate a patch file named <dependency_version>.patch and save it in
|
# (2) Generate a patch file named <dependency_version>.patch and save it in
|
||||||
# `bazel/third_party/<dependency>`.
|
# `bazel/third_party/<dependency>`.
|
||||||
@ -93,8 +93,8 @@ versioned_http_archive(
|
|||||||
|
|
||||||
# Use the toolchains we've configured.
|
# Use the toolchains we've configured.
|
||||||
register_toolchains(
|
register_toolchains(
|
||||||
"//bazel/toolchain:gcc-linux-arm64-toolchain",
|
"//bazel/toolchain:gcc-linux-aarch64-toolchain",
|
||||||
"//bazel/toolchain:clang-macos-arm64-toolchain",
|
"//bazel/toolchain:clang-macos-aarch64-toolchain",
|
||||||
"//bazel/toolchain:clang-macos-x86_64-toolchain",
|
"//bazel/toolchain:clang-macos-x86_64-toolchain",
|
||||||
"//bazel/toolchain:gcc-linux-x86_64-toolchain",
|
"//bazel/toolchain:gcc-linux-x86_64-toolchain",
|
||||||
)
|
)
|
||||||
|
2
bazel/third_party/curl/curl.BUILD
vendored
2
bazel/third_party/curl/curl.BUILD
vendored
@ -53,7 +53,7 @@ configure_make(
|
|||||||
"--without-zlib",
|
"--without-zlib",
|
||||||
"--without-zstd",
|
"--without-zstd",
|
||||||
] + select({
|
] + select({
|
||||||
"@//:linux_arm64": ["--host=aarch64-linux-musl"],
|
"@//:linux_aarch64": ["--host=aarch64-linux-musl"],
|
||||||
"@//:linux_x86_64": ["--host=x86_64-linux-musl"],
|
"@//:linux_x86_64": ["--host=x86_64-linux-musl"],
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
}),
|
}),
|
||||||
|
2
bazel/third_party/gmp/gmp.BUILD
vendored
2
bazel/third_party/gmp/gmp.BUILD
vendored
@ -18,7 +18,7 @@ configure_make(
|
|||||||
# but we leave it in for all builds as a precaution.
|
# but we leave it in for all builds as a precaution.
|
||||||
"--with-pic",
|
"--with-pic",
|
||||||
] + select({
|
] + select({
|
||||||
"@//:linux_arm64": ["--host=aarch64-linux-musl"],
|
"@//:linux_aarch64": ["--host=aarch64-linux-musl"],
|
||||||
"@//:linux_x86_64": ["--host=x86_64-linux-musl"],
|
"@//:linux_x86_64": ["--host=x86_64-linux-musl"],
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
}),
|
}),
|
||||||
|
6
bazel/third_party/h2o/2.2.6.patch
vendored
6
bazel/third_party/h2o/2.2.6.patch
vendored
@ -6,7 +6,7 @@ index 742fec90b..9a11a21bd 100644
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
+#if defined(URBIT_RUNTIME_CPU_ARM64)
|
+#if defined(URBIT_RUNTIME_CPU_AARCH64)
|
||||||
+#include "sse2neon.h"
|
+#include "sse2neon.h"
|
||||||
+#else
|
+#else
|
||||||
#include <emmintrin.h>
|
#include <emmintrin.h>
|
||||||
@ -22,7 +22,7 @@ index 3ae3bd309..7db05a186 100644
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
+#if defined(URBIT_RUNTIME_CPU_ARM64)
|
+#if defined(URBIT_RUNTIME_CPU_AARCH64)
|
||||||
+#include "sse2neon.h"
|
+#include "sse2neon.h"
|
||||||
+#else
|
+#else
|
||||||
#include <emmintrin.h>
|
#include <emmintrin.h>
|
||||||
@ -39,7 +39,7 @@ index a707070d1..714850f64 100644
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#ifdef __SSE4_2__
|
#ifdef __SSE4_2__
|
||||||
-#ifdef _MSC_VER
|
-#ifdef _MSC_VER
|
||||||
+#if defined(URBIT_RUNTIME_CPU_ARM64)
|
+#if defined(URBIT_RUNTIME_CPU_AARCH64)
|
||||||
+#include "sse2neon.h"
|
+#include "sse2neon.h"
|
||||||
+#elif defined(_MSC_VER)
|
+#elif defined(_MSC_VER)
|
||||||
#include <nmmintrin.h>
|
#include <nmmintrin.h>
|
||||||
|
12
bazel/third_party/h2o/h2o.BUILD
vendored
12
bazel/third_party/h2o/h2o.BUILD
vendored
@ -43,7 +43,7 @@ cc_library(
|
|||||||
includes = ["deps/klib"],
|
includes = ["deps/klib"],
|
||||||
linkstatic = True,
|
linkstatic = True,
|
||||||
local_defines = select({
|
local_defines = select({
|
||||||
"@platforms//cpu:arm64": ["URBIT_RUNTIME_CPU_ARM64"],
|
"@platforms//cpu:aarch64": ["URBIT_RUNTIME_CPU_AARCH64"],
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
}),
|
}),
|
||||||
visibility = ["//visibility:private"],
|
visibility = ["//visibility:private"],
|
||||||
@ -51,7 +51,7 @@ cc_library(
|
|||||||
"@curl",
|
"@curl",
|
||||||
"@zlib",
|
"@zlib",
|
||||||
] + select({
|
] + select({
|
||||||
"@platforms//cpu:arm64": ["@sse2neon"],
|
"@platforms//cpu:aarch64": ["@sse2neon"],
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
@ -99,12 +99,12 @@ cc_library(
|
|||||||
includes = ["deps/picohttpparser"],
|
includes = ["deps/picohttpparser"],
|
||||||
linkstatic = True,
|
linkstatic = True,
|
||||||
local_defines = select({
|
local_defines = select({
|
||||||
"@platforms//cpu:arm64": ["URBIT_RUNTIME_CPU_ARM64"],
|
"@platforms//cpu:aarch64": ["URBIT_RUNTIME_CPU_AARCH64"],
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
}),
|
}),
|
||||||
visibility = ["//visibility:private"],
|
visibility = ["//visibility:private"],
|
||||||
deps = select({
|
deps = select({
|
||||||
"@platforms//cpu:arm64": ["@sse2neon"],
|
"@platforms//cpu:aarch64": ["@sse2neon"],
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
@ -130,7 +130,7 @@ cc_library(
|
|||||||
],
|
],
|
||||||
linkstatic = True,
|
linkstatic = True,
|
||||||
local_defines = select({
|
local_defines = select({
|
||||||
"@platforms//cpu:arm64": ["URBIT_RUNTIME_CPU_ARM64"],
|
"@platforms//cpu:aarch64": ["URBIT_RUNTIME_CPU_AARCH64"],
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
}),
|
}),
|
||||||
visibility = ["//visibility:private"],
|
visibility = ["//visibility:private"],
|
||||||
@ -139,7 +139,7 @@ cc_library(
|
|||||||
":micro_ecc",
|
":micro_ecc",
|
||||||
"@openssl",
|
"@openssl",
|
||||||
] + select({
|
] + select({
|
||||||
"@platforms//cpu:arm64": ["@sse2neon"],
|
"@platforms//cpu:aarch64": ["@sse2neon"],
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
6
bazel/third_party/openssl/openssl.BUILD
vendored
6
bazel/third_party/openssl/openssl.BUILD
vendored
@ -13,15 +13,15 @@ configure_make(
|
|||||||
"//conditions:default": ["--jobs=`nproc`"],
|
"//conditions:default": ["--jobs=`nproc`"],
|
||||||
}),
|
}),
|
||||||
configure_command = select({
|
configure_command = select({
|
||||||
"@//:linux_arm64": "Configure",
|
"@//:linux_aarch64": "Configure",
|
||||||
"//conditions:default": "config",
|
"//conditions:default": "config",
|
||||||
}),
|
}),
|
||||||
configure_options = [
|
configure_options = [
|
||||||
"no-shared",
|
"no-shared",
|
||||||
] + select({
|
] + select({
|
||||||
"@//:linux_arm64": [
|
"@//:linux_aarch64": [
|
||||||
"linux-aarch64",
|
"linux-aarch64",
|
||||||
# Native compilation on linux-arm64 isn't supported. The prefix is
|
# Native compilation on linux-aarch64 isn't supported. The prefix is
|
||||||
# empty because the configure script detects an absolute path to the
|
# empty because the configure script detects an absolute path to the
|
||||||
# aarch64-linux-gnu-gcc instead of just the binary name. This is
|
# aarch64-linux-gnu-gcc instead of just the binary name. This is
|
||||||
# presumably because of the Bazel toolchain configuration but is not
|
# presumably because of the Bazel toolchain configuration but is not
|
||||||
|
2
bazel/third_party/secp256k1/secp256k1.BUILD
vendored
2
bazel/third_party/secp256k1/secp256k1.BUILD
vendored
@ -19,7 +19,7 @@ configure_make(
|
|||||||
"--enable-module-schnorrsig",
|
"--enable-module-schnorrsig",
|
||||||
"--enable-static",
|
"--enable-static",
|
||||||
] + select({
|
] + select({
|
||||||
"@//:linux_arm64": ["--host=aarch64-linux-musl"],
|
"@//:linux_aarch64": ["--host=aarch64-linux-musl"],
|
||||||
"@//:linux_x86_64": ["--host=x86_64-linux-musl"],
|
"@//:linux_x86_64": ["--host=x86_64-linux-musl"],
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
}),
|
}),
|
||||||
|
2
bazel/third_party/sigsegv/sigsegv.BUILD
vendored
2
bazel/third_party/sigsegv/sigsegv.BUILD
vendored
@ -20,7 +20,7 @@ configure_make(
|
|||||||
"@platforms//os:linux": ["--disable-stackvma"],
|
"@platforms//os:linux": ["--disable-stackvma"],
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
}) + select({
|
}) + select({
|
||||||
"@//:linux_arm64": ["--host=aarch64-linux-musl"],
|
"@//:linux_aarch64": ["--host=aarch64-linux-musl"],
|
||||||
"@//:linux_x86_64": ["--host=x86_64-linux-musl"],
|
"@//:linux_x86_64": ["--host=x86_64-linux-musl"],
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
}),
|
}),
|
||||||
|
4
bazel/third_party/softfloat/softfloat.BUILD
vendored
4
bazel/third_party/softfloat/softfloat.BUILD
vendored
@ -9,14 +9,14 @@ cc_library(
|
|||||||
name = "softfloat",
|
name = "softfloat",
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = select({
|
deps = select({
|
||||||
"@platforms//cpu:arm64": [":softfloat_arm64"],
|
"@platforms//cpu:aarch64": [":softfloat_aarch64"],
|
||||||
"@platforms//cpu:x86_64": [":softfloat_x86_64"],
|
"@platforms//cpu:x86_64": [":softfloat_x86_64"],
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "softfloat_arm64",
|
name = "softfloat_aarch64",
|
||||||
srcs = [
|
srcs = [
|
||||||
# See `OBJS_PRIMITIVES` in `build/Linux-ARM-VFPv2-GCC/Makefile` in the
|
# See `OBJS_PRIMITIVES` in `build/Linux-ARM-VFPv2-GCC/Makefile` in the
|
||||||
# `softfloat` repo.
|
# `softfloat` repo.
|
||||||
|
2
bazel/third_party/uv/uv.BUILD
vendored
2
bazel/third_party/uv/uv.BUILD
vendored
@ -17,7 +17,7 @@ configure_make(
|
|||||||
configure_options = [
|
configure_options = [
|
||||||
"--disable-shared",
|
"--disable-shared",
|
||||||
] + select({
|
] + select({
|
||||||
"@//:linux_arm64": ["--host=aarch64-linux-musl"],
|
"@//:linux_aarch64": ["--host=aarch64-linux-musl"],
|
||||||
"@//:linux_x86_64": ["--host=x86_64-linux-musl"],
|
"@//:linux_x86_64": ["--host=x86_64-linux-musl"],
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
}),
|
}),
|
||||||
|
@ -46,10 +46,10 @@ alias(
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Toolchain identifier.
|
# Toolchain identifier.
|
||||||
_arm64_gcc = "toolchain-gcc-linux-arm64"
|
_aarch64_gcc = "toolchain-gcc-linux-aarch64"
|
||||||
|
|
||||||
cc_toolchain_config(
|
cc_toolchain_config(
|
||||||
name = "gcc-linux-arm64-config",
|
name = "gcc-linux-aarch64-config",
|
||||||
ar = "{}/aarch64-linux-musl/bin/aarch64-linux-musl-ar".format(_install_prefix),
|
ar = "{}/aarch64-linux-musl/bin/aarch64-linux-musl-ar".format(_install_prefix),
|
||||||
cc = "{}/aarch64-linux-musl/bin/aarch64-linux-musl-gcc".format(_install_prefix),
|
cc = "{}/aarch64-linux-musl/bin/aarch64-linux-musl-gcc".format(_install_prefix),
|
||||||
cc_flags = [
|
cc_flags = [
|
||||||
@ -64,12 +64,12 @@ cc_toolchain_config(
|
|||||||
"{}/aarch64-linux-musl/aarch64-linux-musl/include".format(_install_prefix),
|
"{}/aarch64-linux-musl/aarch64-linux-musl/include".format(_install_prefix),
|
||||||
"{}/aarch64-linux-musl/lib/gcc/aarch64-linux-musl/{{compiler_version}}/include".format(_install_prefix),
|
"{}/aarch64-linux-musl/lib/gcc/aarch64-linux-musl/{{compiler_version}}/include".format(_install_prefix),
|
||||||
],
|
],
|
||||||
target_cpu = "arm64",
|
target_cpu = "aarch64",
|
||||||
toolchain_identifier = _arm64_gcc,
|
toolchain_identifier = _aarch64_gcc,
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_toolchain(
|
cc_toolchain(
|
||||||
name = "gcc-linux-arm64",
|
name = "gcc-linux-aarch64",
|
||||||
all_files = ":empty",
|
all_files = ":empty",
|
||||||
compiler_files = ":empty",
|
compiler_files = ":empty",
|
||||||
dwp_files = ":empty",
|
dwp_files = ":empty",
|
||||||
@ -77,21 +77,21 @@ cc_toolchain(
|
|||||||
objcopy_files = ":empty",
|
objcopy_files = ":empty",
|
||||||
strip_files = ":empty",
|
strip_files = ":empty",
|
||||||
supports_param_files = 0,
|
supports_param_files = 0,
|
||||||
toolchain_config = ":gcc-linux-arm64-config",
|
toolchain_config = ":gcc-linux-aarch64-config",
|
||||||
toolchain_identifier = _arm64_gcc,
|
toolchain_identifier = _aarch64_gcc,
|
||||||
)
|
)
|
||||||
|
|
||||||
toolchain(
|
toolchain(
|
||||||
name = "gcc-linux-arm64-toolchain",
|
name = "gcc-linux-aarch64-toolchain",
|
||||||
exec_compatible_with = [
|
exec_compatible_with = [
|
||||||
"@platforms//os:linux",
|
"@platforms//os:linux",
|
||||||
"@platforms//cpu:x86_64",
|
"@platforms//cpu:x86_64",
|
||||||
],
|
],
|
||||||
target_compatible_with = [
|
target_compatible_with = [
|
||||||
"@platforms//os:linux",
|
"@platforms//os:linux",
|
||||||
"@platforms//cpu:arm64",
|
"@platforms//cpu:aarch64",
|
||||||
],
|
],
|
||||||
toolchain = ":gcc-linux-arm64",
|
toolchain = ":gcc-linux-aarch64",
|
||||||
toolchain_type = ":toolchain_type",
|
toolchain_type = ":toolchain_type",
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -150,14 +150,14 @@ toolchain(
|
|||||||
)
|
)
|
||||||
|
|
||||||
#
|
#
|
||||||
# clang-macos-arm64
|
# clang-macos-aarch64
|
||||||
#
|
#
|
||||||
|
|
||||||
# Toolchain identifier.
|
# Toolchain identifier.
|
||||||
_macos_arm64_clang = "toolchain-clang-macos-arm64"
|
_macos_aarch64_clang = "toolchain-clang-macos-aarch64"
|
||||||
|
|
||||||
cc_toolchain_config(
|
cc_toolchain_config(
|
||||||
name = "clang-macos-arm64-config",
|
name = "clang-macos-aarch64-config",
|
||||||
# NOTE: building with `libtool` does not work on macOS due to lack of
|
# NOTE: building with `libtool` does not work on macOS due to lack of
|
||||||
# support in the `configure_make` rule provided by `rules_foreign_cc`.
|
# support in the `configure_make` rule provided by `rules_foreign_cc`.
|
||||||
# Therefore, we require setting `ar` as the archiver tool on macOS.
|
# Therefore, we require setting `ar` as the archiver tool on macOS.
|
||||||
@ -177,12 +177,12 @@ cc_toolchain_config(
|
|||||||
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include",
|
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include",
|
||||||
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/{compiler_version}/include",
|
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/{compiler_version}/include",
|
||||||
],
|
],
|
||||||
target_cpu = "arm64",
|
target_cpu = "aarch64",
|
||||||
toolchain_identifier = _macos_arm64_clang,
|
toolchain_identifier = _macos_aarch64_clang,
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_toolchain(
|
cc_toolchain(
|
||||||
name = "clang-macos-arm64",
|
name = "clang-macos-aarch64",
|
||||||
all_files = ":empty",
|
all_files = ":empty",
|
||||||
compiler_files = ":empty",
|
compiler_files = ":empty",
|
||||||
dwp_files = ":empty",
|
dwp_files = ":empty",
|
||||||
@ -190,21 +190,21 @@ cc_toolchain(
|
|||||||
objcopy_files = ":empty",
|
objcopy_files = ":empty",
|
||||||
strip_files = ":empty",
|
strip_files = ":empty",
|
||||||
supports_param_files = 0,
|
supports_param_files = 0,
|
||||||
toolchain_config = ":clang-macos-arm64-config",
|
toolchain_config = ":clang-macos-aarch64-config",
|
||||||
toolchain_identifier = _macos_arm64_clang,
|
toolchain_identifier = _macos_aarch64_clang,
|
||||||
)
|
)
|
||||||
|
|
||||||
toolchain(
|
toolchain(
|
||||||
name = "clang-macos-arm64-toolchain",
|
name = "clang-macos-aarch64-toolchain",
|
||||||
exec_compatible_with = [
|
exec_compatible_with = [
|
||||||
"@platforms//os:macos",
|
"@platforms//os:macos",
|
||||||
"@platforms//cpu:arm64",
|
"@platforms//cpu:aarch64",
|
||||||
],
|
],
|
||||||
target_compatible_with = [
|
target_compatible_with = [
|
||||||
"@platforms//os:macos",
|
"@platforms//os:macos",
|
||||||
"@platforms//cpu:arm64",
|
"@platforms//cpu:aarch64",
|
||||||
],
|
],
|
||||||
toolchain = ":clang-macos-arm64",
|
toolchain = ":clang-macos-aarch64",
|
||||||
toolchain_type = ":toolchain_type",
|
toolchain_type = ":toolchain_type",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user