[tmp] nix: Switch to aarch64-darwin

This commit is contained in:
David Nadlinger 2022-04-22 19:18:35 +01:00
parent 48cb485b89
commit 2e6fc4cfe5
6 changed files with 13 additions and 17 deletions

View File

@ -5,9 +5,9 @@
outputs = { self, nixpkgs }:
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
pkgs = import nixpkgs { system = "aarch64-darwin"; };
in rec {
packages.x86_64-linux = rec {
packages.aarch64-darwin = rec {
llvm-nac3 = pkgs.callPackage ./nix/llvm {};
nac3artiq = pkgs.python3Packages.toPythonModule (
pkgs.rustPlatform.buildRustPackage rec {
@ -142,25 +142,26 @@
packages.x86_64-w64-mingw32 = import ./nix/windows { inherit pkgs; };
devShell.x86_64-linux = pkgs.mkShell {
devShell.aarch64-darwin = pkgs.mkShell {
name = "nac3-dev-shell";
buildInputs = with pkgs; [
# build dependencies
packages.x86_64-linux.llvm-nac3
packages.aarch64-darwin.llvm-nac3
llvmPackages_13.clang-unwrapped # IRRT
pkgs.llvmPackages_13.llvm.out # IRRT
libiconv
cargo
rustc
# runtime dependencies
lld_13
(packages.x86_64-linux.python3-mimalloc.withPackages(ps: [ ps.numpy ]))
(packages.aarch64-darwin.python3-mimalloc.withPackages(ps: [ ps.numpy ]))
# development tools
cargo-insta
clippy
rustfmt
];
};
devShells.x86_64-linux.msys2 = pkgs.mkShell {
devShells.aarch64-darwin.msys2 = pkgs.mkShell {
name = "nac3-dev-shell-msys2";
buildInputs = with pkgs; [
curl
@ -171,7 +172,7 @@
};
hydraJobs = {
inherit (packages.x86_64-linux) llvm-nac3 nac3artiq nac3artiq-pgo;
inherit (packages.aarch64-darwin) llvm-nac3 nac3artiq nac3artiq-pgo;
llvm-nac3-msys2 = packages.x86_64-w64-mingw32.llvm-nac3;
nac3artiq-msys2 = packages.x86_64-w64-mingw32.nac3artiq;
nac3artiq-msys2-pkg = packages.x86_64-w64-mingw32.nac3artiq-pkg;

View File

@ -19,7 +19,7 @@ nac3core = { path = "../nac3core" }
git = "https://github.com/nbaksalyar/inkwell.git"
branch = "llvm14"
default-features = false
features = ["llvm14-0", "target-x86", "target-arm", "target-riscv", "no-libffi-linking"]
features = ["llvm14-0", "target-aarch64", "target-arm", "target-riscv", "no-libffi-linking"]
[features]
init-llvm-profile = []

View File

@ -15,7 +15,7 @@ nac3parser = { path = "../nac3parser" }
git = "https://github.com/nbaksalyar/inkwell.git"
branch = "llvm14"
default-features = false
features = ["llvm14-0", "target-x86", "target-arm", "target-riscv", "no-libffi-linking"]
features = ["llvm14-0", "target-aarch64", "target-arm", "target-riscv", "no-libffi-linking"]
[dev-dependencies]
test-case = "1.2.0"

View File

@ -1,9 +1,4 @@
typedef _ExtInt(8) int8_t;
typedef unsigned _ExtInt(8) uint8_t;
typedef _ExtInt(32) int32_t;
typedef unsigned _ExtInt(32) uint32_t;
typedef _ExtInt(64) int64_t;
typedef unsigned _ExtInt(64) uint64_t;
#include "stdint.h"
# define MAX(a, b) (a > b ? a : b)
# define MIN(a, b) (a > b ? b : a)

View File

@ -13,4 +13,4 @@ nac3core = { path = "../nac3core" }
git = "https://github.com/nbaksalyar/inkwell.git"
branch = "llvm14"
default-features = false
features = ["llvm14-0", "target-x86", "target-arm", "target-riscv", "no-libffi-linking"]
features = ["llvm14-0", "target-aarch64", "target-arm", "target-riscv", "no-libffi-linking"]

View File

@ -115,7 +115,7 @@ in stdenv.mkDerivation (rec {
"-DLLVM_ENABLE_THREADS=OFF"
"-DLLVM_INCLUDE_BENCHMARKS=OFF"
"-DLLVM_BUILD_TOOLS=OFF"
"-DLLVM_TARGETS_TO_BUILD=X86;ARM;RISCV"
"-DLLVM_TARGETS_TO_BUILD=host;ARM;RISCV"
] ++ optionals enableSharedLibraries [
"-DLLVM_LINK_LLVM_DYLIB=ON"
] ++ optionals enableManpages [