forked from M-Labs/nac3
[tmp] nix: Switch to aarch64-darwin
This commit is contained in:
parent
48cb485b89
commit
2e6fc4cfe5
15
flake.nix
15
flake.nix
|
@ -5,9 +5,9 @@
|
||||||
|
|
||||||
outputs = { self, nixpkgs }:
|
outputs = { self, nixpkgs }:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
pkgs = import nixpkgs { system = "aarch64-darwin"; };
|
||||||
in rec {
|
in rec {
|
||||||
packages.x86_64-linux = rec {
|
packages.aarch64-darwin = rec {
|
||||||
llvm-nac3 = pkgs.callPackage ./nix/llvm {};
|
llvm-nac3 = pkgs.callPackage ./nix/llvm {};
|
||||||
nac3artiq = pkgs.python3Packages.toPythonModule (
|
nac3artiq = pkgs.python3Packages.toPythonModule (
|
||||||
pkgs.rustPlatform.buildRustPackage rec {
|
pkgs.rustPlatform.buildRustPackage rec {
|
||||||
|
@ -142,25 +142,26 @@
|
||||||
|
|
||||||
packages.x86_64-w64-mingw32 = import ./nix/windows { inherit pkgs; };
|
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";
|
name = "nac3-dev-shell";
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
# build dependencies
|
# build dependencies
|
||||||
packages.x86_64-linux.llvm-nac3
|
packages.aarch64-darwin.llvm-nac3
|
||||||
llvmPackages_13.clang-unwrapped # IRRT
|
llvmPackages_13.clang-unwrapped # IRRT
|
||||||
pkgs.llvmPackages_13.llvm.out # IRRT
|
pkgs.llvmPackages_13.llvm.out # IRRT
|
||||||
|
libiconv
|
||||||
cargo
|
cargo
|
||||||
rustc
|
rustc
|
||||||
# runtime dependencies
|
# runtime dependencies
|
||||||
lld_13
|
lld_13
|
||||||
(packages.x86_64-linux.python3-mimalloc.withPackages(ps: [ ps.numpy ]))
|
(packages.aarch64-darwin.python3-mimalloc.withPackages(ps: [ ps.numpy ]))
|
||||||
# development tools
|
# development tools
|
||||||
cargo-insta
|
cargo-insta
|
||||||
clippy
|
clippy
|
||||||
rustfmt
|
rustfmt
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
devShells.x86_64-linux.msys2 = pkgs.mkShell {
|
devShells.aarch64-darwin.msys2 = pkgs.mkShell {
|
||||||
name = "nac3-dev-shell-msys2";
|
name = "nac3-dev-shell-msys2";
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
curl
|
curl
|
||||||
|
@ -171,7 +172,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
hydraJobs = {
|
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;
|
llvm-nac3-msys2 = packages.x86_64-w64-mingw32.llvm-nac3;
|
||||||
nac3artiq-msys2 = packages.x86_64-w64-mingw32.nac3artiq;
|
nac3artiq-msys2 = packages.x86_64-w64-mingw32.nac3artiq;
|
||||||
nac3artiq-msys2-pkg = packages.x86_64-w64-mingw32.nac3artiq-pkg;
|
nac3artiq-msys2-pkg = packages.x86_64-w64-mingw32.nac3artiq-pkg;
|
||||||
|
|
|
@ -19,7 +19,7 @@ nac3core = { path = "../nac3core" }
|
||||||
git = "https://github.com/nbaksalyar/inkwell.git"
|
git = "https://github.com/nbaksalyar/inkwell.git"
|
||||||
branch = "llvm14"
|
branch = "llvm14"
|
||||||
default-features = false
|
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]
|
[features]
|
||||||
init-llvm-profile = []
|
init-llvm-profile = []
|
||||||
|
|
|
@ -15,7 +15,7 @@ nac3parser = { path = "../nac3parser" }
|
||||||
git = "https://github.com/nbaksalyar/inkwell.git"
|
git = "https://github.com/nbaksalyar/inkwell.git"
|
||||||
branch = "llvm14"
|
branch = "llvm14"
|
||||||
default-features = false
|
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]
|
[dev-dependencies]
|
||||||
test-case = "1.2.0"
|
test-case = "1.2.0"
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
typedef _ExtInt(8) int8_t;
|
#include "stdint.h"
|
||||||
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;
|
|
||||||
|
|
||||||
# define MAX(a, b) (a > b ? a : b)
|
# define MAX(a, b) (a > b ? a : b)
|
||||||
# define MIN(a, b) (a > b ? b : a)
|
# define MIN(a, b) (a > b ? b : a)
|
||||||
|
|
|
@ -13,4 +13,4 @@ nac3core = { path = "../nac3core" }
|
||||||
git = "https://github.com/nbaksalyar/inkwell.git"
|
git = "https://github.com/nbaksalyar/inkwell.git"
|
||||||
branch = "llvm14"
|
branch = "llvm14"
|
||||||
default-features = false
|
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"]
|
||||||
|
|
|
@ -115,7 +115,7 @@ in stdenv.mkDerivation (rec {
|
||||||
"-DLLVM_ENABLE_THREADS=OFF"
|
"-DLLVM_ENABLE_THREADS=OFF"
|
||||||
"-DLLVM_INCLUDE_BENCHMARKS=OFF"
|
"-DLLVM_INCLUDE_BENCHMARKS=OFF"
|
||||||
"-DLLVM_BUILD_TOOLS=OFF"
|
"-DLLVM_BUILD_TOOLS=OFF"
|
||||||
"-DLLVM_TARGETS_TO_BUILD=X86;ARM;RISCV"
|
"-DLLVM_TARGETS_TO_BUILD=host;ARM;RISCV"
|
||||||
] ++ optionals enableSharedLibraries [
|
] ++ optionals enableSharedLibraries [
|
||||||
"-DLLVM_LINK_LLVM_DYLIB=ON"
|
"-DLLVM_LINK_LLVM_DYLIB=ON"
|
||||||
] ++ optionals enableManpages [
|
] ++ optionals enableManpages [
|
||||||
|
|
Loading…
Reference in New Issue