Skip to content

Commit

Permalink
Add remaining MacOS targets for further testing (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmondal committed Dec 7, 2023
1 parent befd1b6 commit 8f9da8f
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 8 deletions.
31 changes: 28 additions & 3 deletions Cargo.Bazel.lock
@@ -1,5 +1,5 @@
{
"checksum": "23af5237f25c8c8d8b18e23ebbe5438fcbe890c9983d2b5a8d183f2de498fa5d",
"checksum": "9d8ddaa95a4e20df6be7199ff8e40a18aa52cb04e2321784f413277f05bd92cb",
"crates": {
"addr2line 0.21.0": {
"name": "addr2line",
Expand Down Expand Up @@ -7201,6 +7201,11 @@
"default",
"std"
],
"x86_64-apple-darwin": [
"default",
"extra_traits",
"std"
],
"x86_64-unknown-linux-gnu": [
"default",
"std"
Expand Down Expand Up @@ -11719,6 +11724,10 @@
"default",
"use-libc-auxv"
],
"x86_64-apple-darwin": [
"default",
"use-libc-auxv"
],
"x86_64-unknown-linux-gnu": [
"default",
"use-libc-auxv"
Expand Down Expand Up @@ -17451,7 +17460,8 @@
"x86_64-unknown-linux-gnu"
],
"cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = \"linux\", target_endian = \"little\", any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"riscv64\", all(rustix_use_experimental_asm, target_arch = \"powerpc64\"), all(rustix_use_experimental_asm, target_arch = \"mips\"), all(rustix_use_experimental_asm, target_arch = \"mips32r6\"), all(rustix_use_experimental_asm, target_arch = \"mips64\"), all(rustix_use_experimental_asm, target_arch = \"mips64r6\"), target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\")))))))": [
"aarch64-apple-darwin"
"aarch64-apple-darwin",
"x86_64-apple-darwin"
],
"cfg(all(target_arch = \"aarch64\", target_env = \"msvc\", not(windows_raw_dylib)))": [],
"cfg(all(target_arch = \"aarch64\", target_os = \"linux\"))": [
Expand Down Expand Up @@ -17480,19 +17490,22 @@
"cfg(any(target_arch = \"aarch64\", target_arch = \"x86\", target_arch = \"x86_64\"))": [
"aarch64-apple-darwin",
"aarch64-unknown-linux-gnu",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
"x86_64-unknown-linux-gnu"
],
"cfg(any(target_arch = \"aarch64\", target_arch = \"x86_64\", target_arch = \"x86\"))": [
"aarch64-apple-darwin",
"aarch64-unknown-linux-gnu",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
"x86_64-unknown-linux-gnu"
],
"cfg(any(target_arch = \"x86\", target_arch = \"x86_64\", all(any(target_arch = \"aarch64\", target_arch = \"arm\"), any(target_os = \"android\", target_os = \"fuchsia\", target_os = \"linux\", target_os = \"windows\"))))": [
"aarch64-unknown-linux-gnu",
"arm-unknown-linux-gnueabi",
"armv7-unknown-linux-gnueabi",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
"x86_64-unknown-linux-gnu"
],
Expand All @@ -17501,20 +17514,23 @@
"aarch64-unknown-linux-gnu",
"arm-unknown-linux-gnueabi",
"armv7-unknown-linux-gnueabi",
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu"
],
"cfg(any(unix, target_os = \"wasi\"))": [
"aarch64-apple-darwin",
"aarch64-unknown-linux-gnu",
"arm-unknown-linux-gnueabi",
"armv7-unknown-linux-gnueabi",
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu"
],
"cfg(any(windows, unix, target_os = \"redox\"))": [
"aarch64-apple-darwin",
"aarch64-unknown-linux-gnu",
"arm-unknown-linux-gnueabi",
"armv7-unknown-linux-gnueabi",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
"x86_64-unknown-linux-gnu"
],
Expand All @@ -17524,6 +17540,7 @@
"aarch64-unknown-linux-gnu",
"arm-unknown-linux-gnueabi",
"armv7-unknown-linux-gnueabi",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
"x86_64-unknown-linux-gnu"
],
Expand All @@ -17532,13 +17549,15 @@
"aarch64-unknown-linux-gnu",
"arm-unknown-linux-gnueabi",
"armv7-unknown-linux-gnueabi",
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu"
],
"cfg(not(target_family = \"wasm\"))": [
"aarch64-apple-darwin",
"aarch64-unknown-linux-gnu",
"arm-unknown-linux-gnueabi",
"armv7-unknown-linux-gnueabi",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
"x86_64-unknown-linux-gnu"
],
Expand All @@ -17547,11 +17566,13 @@
"aarch64-unknown-linux-gnu",
"arm-unknown-linux-gnueabi",
"armv7-unknown-linux-gnueabi",
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu"
],
"cfg(target_os = \"hermit\")": [],
"cfg(target_os = \"macos\")": [
"aarch64-apple-darwin"
"aarch64-apple-darwin",
"x86_64-apple-darwin"
],
"cfg(target_os = \"redox\")": [],
"cfg(target_os = \"wasi\")": [],
Expand All @@ -17565,12 +17586,16 @@
"aarch64-unknown-linux-gnu",
"arm-unknown-linux-gnueabi",
"armv7-unknown-linux-gnueabi",
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu"
],
"cfg(windows)": [
"x86_64-pc-windows-msvc"
],
"i686-pc-windows-gnu": [],
"x86_64-apple-darwin": [
"x86_64-apple-darwin"
],
"x86_64-pc-windows-gnu": [],
"x86_64-pc-windows-gnullvm": [],
"x86_64-pc-windows-msvc": [
Expand Down
5 changes: 3 additions & 2 deletions WORKSPACE.bazel
Expand Up @@ -43,12 +43,13 @@ crates_repository(
lockfile = "//:Cargo.Bazel.lock",
manifests = ["//:Cargo.toml"],
supported_platform_triples = [
"aarch64-unknown-linux-gnu",
"aarch64-apple-darwin",
"aarch64-unknown-linux-gnu",
"arm-unknown-linux-gnueabi",
"armv7-unknown-linux-gnueabi",
"x86_64-unknown-linux-gnu",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
"x86_64-unknown-linux-gnu",
],
)

Expand Down
23 changes: 20 additions & 3 deletions flake.nix
Expand Up @@ -15,10 +15,24 @@

outputs = inputs @ { self, flake-parts, crane, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ];
systems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
imports = [ inputs.pre-commit-hooks.flakeModule ];
perSystem = { config, pkgs, system, ... }:
let
isDarwin = builtins.elem system [
"x86_64-darwin"
"aarch64-darwin"
];

maybeDarwinDeps = pkgs.lib.optionals isDarwin [
pkgs.darwin.apple_sdk.frameworks.Security
pkgs.libiconv
];

customStdenv = import ./tools/llvmStdenv.nix { inherit pkgs; };

craneLib = crane.lib.${system};
Expand All @@ -34,7 +48,10 @@
inherit src;
strictDeps = true;
buildInputs = [ ];
nativeBuildInputs = [ pkgs.autoPatchelfHook pkgs.cacert ];
nativeBuildInputs = [
pkgs.autoPatchelfHook
pkgs.cacert
] ++ maybeDarwinDeps;
stdenv = customStdenv;
};

Expand Down Expand Up @@ -107,7 +124,7 @@

# Additional tools from within our development environment.
local-image-test
];
] ++ maybeDarwinDeps;
shellHook = ''
# Generate the .pre-commit-config.yaml symlink when entering the
# development shell.
Expand Down

0 comments on commit 8f9da8f

Please sign in to comment.