From 9f316a3294344c8de822d45fa824980b6119c085 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 26 Nov 2021 17:00:20 +0800 Subject: [PATCH 01/11] flake: revert nixpkgs to unbreak rust cross-compilation --- flake.lock | 8 ++++---- flake.nix | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index b7922587b..1930cc3d8 100644 --- a/flake.lock +++ b/flake.lock @@ -2,17 +2,17 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1637636156, - "narHash": "sha256-E2ym4Vcpqu9JYoQDXJZR48gVD+LPPbaCoYveIk7Xu3Y=", + "lastModified": 1637328665, + "narHash": "sha256-z6ufVwquLM0IiNZxd5oT1M33Lv0aB3WICpk8ZKwpxjw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b026e1cf87a108dd06fe521f224fdc72fd0b013d", + "rev": "0f4b4b85d959200f52c16bbb74036994e7db5f74", "type": "github" }, "original": { "owner": "NixOS", - "ref": "release-21.11", "repo": "nixpkgs", + "rev": "0f4b4b85d959200f52c16bbb74036994e7db5f74", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 0e89187fc..e63673673 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,7 @@ { description = "The third-generation ARTIQ compiler"; - inputs.nixpkgs.url = github:NixOS/nixpkgs/release-21.11; + inputs.nixpkgs.url = github:NixOS/nixpkgs/0f4b4b85d959200f52c16bbb74036994e7db5f74; outputs = { self, nixpkgs }: let From 5e1b0a10a0fdac966212bdea0b208cc7d8c72e66 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 26 Nov 2021 17:01:44 +0800 Subject: [PATCH 02/11] flake: patch nixpkgs to fix mingw llvm_12 build --- flake.nix | 2 +- llvm-mingw-crosscompile.diff | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 llvm-mingw-crosscompile.diff diff --git a/flake.nix b/flake.nix index e63673673..c75bec59a 100644 --- a/flake.nix +++ b/flake.nix @@ -10,7 +10,7 @@ nixpkgs-patched = pkgs-orig.applyPatches { name = "nixpkgs"; src = nixpkgs; - patches = [ ./llvm-future-riscv-abi.diff ./llvm-restrict-targets.diff ]; + patches = [ ./llvm-future-riscv-abi.diff ./llvm-restrict-targets.diff ./llvm-mingw-crosscompile.diff ]; }; pkgs = import nixpkgs-patched { system = "x86_64-linux"; }; in rec { diff --git a/llvm-mingw-crosscompile.diff b/llvm-mingw-crosscompile.diff new file mode 100644 index 000000000..09fc6599a --- /dev/null +++ b/llvm-mingw-crosscompile.diff @@ -0,0 +1,35 @@ +diff --git a/pkgs/development/compilers/llvm/12/llvm/default.nix b/pkgs/development/compilers/llvm/12/llvm/default.nix +index 30a1a7a16df..4f9435d1819 100644 +--- a/pkgs/development/compilers/llvm/12/llvm/default.nix ++++ b/pkgs/development/compilers/llvm/12/llvm/default.nix +@@ -15,10 +15,11 @@ + , buildLlvmTools + , debugVersion ? false + , enableManpages ? false +-, enableSharedLibraries ? !stdenv.hostPlatform.isStatic ++, enableSharedLibraries ? (!stdenv.hostPlatform.isStatic && !stdenv.targetPlatform.isMinGW) + , enablePFM ? !(stdenv.isDarwin + || stdenv.isAarch64 # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245 + || stdenv.isAarch32 # broken for the armv7l builder ++ || stdenv.targetPlatform.isMinGW + ) + , enablePolly ? false + }: +@@ -120,7 +121,7 @@ in stdenv.mkDerivation (rec { + "-DLLVM_INSTALL_CMAKE_DIR=${placeholder "dev"}/lib/cmake/llvm/" + "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}" + "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc +- "-DLLVM_BUILD_TESTS=ON" ++ "-DLLVM_BUILD_TESTS=${if stdenv.targetPlatform.isMinGW then "OFF" else "ON"}" + "-DLLVM_ENABLE_FFI=ON" + "-DLLVM_ENABLE_RTTI=ON" + "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" +@@ -134,7 +135,7 @@ in stdenv.mkDerivation (rec { + "-DSPHINX_OUTPUT_MAN=ON" + "-DSPHINX_OUTPUT_HTML=OFF" + "-DSPHINX_WARNINGS_AS_ERRORS=OFF" +- ] ++ optionals (!isDarwin) [ ++ ] ++ optionals (!isDarwin && !stdenv.targetPlatform.isMinGW) [ + "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" + ] ++ optionals isDarwin [ + "-DLLVM_ENABLE_LIBCXX=ON" From 701ca36e99bbd0354b78f648ed3c6a4f21b7c192 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 26 Nov 2021 17:26:18 +0800 Subject: [PATCH 03/11] flake: windows build WIP --- flake.nix | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index c75bec59a..3ccc5c3e9 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,17 @@ patches = [ ./llvm-future-riscv-abi.diff ./llvm-restrict-targets.diff ./llvm-mingw-crosscompile.diff ]; }; pkgs = import nixpkgs-patched { system = "x86_64-linux"; }; + pkgs-mingw = import nixpkgs-patched { system = "x86_64-linux"; crossSystem = { config = "x86_64-w64-mingw32"; libc = "msvcrt"; }; }; + cargoSha256 = "sha256-otKLhr58HYMjVXAof6AdObNpggPnvK6qOl7I+4LWIP8="; + msys2-python-tar = pkgs.fetchurl { + url = "https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-python-3.9.7-4-any.pkg.tar.zst"; + sha256 = "0iwlgbk4b457yn9djwqswid55xhyyi35qymz1lfh42xwdpxdm47c"; + }; + msys2-python = pkgs.runCommand "msys2-python" { buildInputs = [ pkgs.gnutar pkgs.zstd ]; } + '' + mkdir $out + tar xvf ${msys2-python-tar} -C $out + ''; in rec { inherit nixpkgs-patched; @@ -21,7 +32,7 @@ pkgs.rustPlatform.buildRustPackage { name = "nac3artiq"; src = self; - cargoSha256 = "sha256-otKLhr58HYMjVXAof6AdObNpggPnvK6qOl7I+4LWIP8="; + inherit cargoSha256; nativeBuildInputs = [ pkgs.python3 pkgs.llvm_12 ]; buildInputs = [ pkgs.python3 pkgs.libffi pkgs.libxml2 pkgs.llvm_12 ]; cargoBuildFlags = [ "--package" "nac3artiq" ]; @@ -36,6 +47,34 @@ ); }; + packages.x86_64-w64-mingw32 = { + nac3artiq = pkgs-mingw.python3Packages.toPythonModule ( + pkgs-mingw.rustPlatform.buildRustPackage { + name = "nac3artiq"; + src = self; + inherit cargoSha256; + nativeBuildInputs = [ pkgs-mingw.llvm_12 ]; + buildInputs = [ pkgs-mingw.libffi pkgs-mingw.libxml2 pkgs-mingw.llvm_12 ]; + configurePhase = + '' + export PYO3_CROSS_PYTHON_VERSION=3.9 + export PYO3_CROSS_LIB_DIR=${msys2-python}/mingw64/lib + echo Using Python $PYO3_CROSS_PYTHON_VERSION in $PYO3_CROSS_LIB_DIR + ''; + cargoBuildFlags = [ "--package" "nac3artiq" ]; + doCheck = false; + installPhase = + '' + TARGET_DIR=$out/${pkgs.python3Packages.python.sitePackages} + mkdir -p $TARGET_DIR + #cp target/x86_64-unknown-linux-gnu/release/libnac3artiq.so $TARGET_DIR/nac3artiq.so + ls target + ''; + meta.platforms = ["x86_64-windows"]; + } + ); + }; + devShell.x86_64-linux = pkgs.mkShell { name = "nac3-dev-shell"; buildInputs = with pkgs; [ From 31fba04cee5052c572ca4b5472a66947d077a2ce Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 1 Dec 2021 18:30:26 +0800 Subject: [PATCH 04/11] flake: fix Windows build, now finding LLVM and Python --- flake.nix | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 3ccc5c3e9..041e71335 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,21 @@ mkdir $out tar xvf ${msys2-python-tar} -C $out ''; + pyo3-mingw-config = pkgs.writeTextFile { + name = "pyo3-mingw-config"; + text = + '' + implementation=CPython + version=3.9 + shared=true + abi3=false + lib_name=python3.9 + lib_dir=${msys2-python}/mingw64/lib + pointer_width=64 + build_flags=WITH_THREAD + suppress_build_script_link_lines=false + ''; + }; in rec { inherit nixpkgs-patched; @@ -53,13 +68,12 @@ name = "nac3artiq"; src = self; inherit cargoSha256; - nativeBuildInputs = [ pkgs-mingw.llvm_12 ]; - buildInputs = [ pkgs-mingw.libffi pkgs-mingw.libxml2 pkgs-mingw.llvm_12 ]; configurePhase = '' - export PYO3_CROSS_PYTHON_VERSION=3.9 - export PYO3_CROSS_LIB_DIR=${msys2-python}/mingw64/lib - echo Using Python $PYO3_CROSS_PYTHON_VERSION in $PYO3_CROSS_LIB_DIR + export PYO3_CONFIG_FILE=${pyo3-mingw-config} + mkdir llvm-cfg + ln -s ${pkgs-mingw.llvm_12.dev}/bin/llvm-config-native llvm-cfg/llvm-config + export PATH=$PATH:`pwd`/llvm-cfg ''; cargoBuildFlags = [ "--package" "nac3artiq" ]; doCheck = false; From 8a46032f4cf5d036aeb36c6691d149a2c5e06bb4 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 2 Dec 2021 18:46:04 +0800 Subject: [PATCH 05/11] flake: unbreak llvm-config for cross-compilation of static libs --- flake.nix | 2 +- llvm-unbreak-static-cross.diff | 44 ++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 llvm-unbreak-static-cross.diff diff --git a/flake.nix b/flake.nix index 041e71335..a88b7a84c 100644 --- a/flake.nix +++ b/flake.nix @@ -10,7 +10,7 @@ nixpkgs-patched = pkgs-orig.applyPatches { name = "nixpkgs"; src = nixpkgs; - patches = [ ./llvm-future-riscv-abi.diff ./llvm-restrict-targets.diff ./llvm-mingw-crosscompile.diff ]; + patches = [ ./llvm-future-riscv-abi.diff ./llvm-restrict-targets.diff ./llvm-mingw-crosscompile.diff ./llvm-unbreak-static-cross.diff ]; }; pkgs = import nixpkgs-patched { system = "x86_64-linux"; }; pkgs-mingw = import nixpkgs-patched { system = "x86_64-linux"; crossSystem = { config = "x86_64-w64-mingw32"; libc = "msvcrt"; }; }; diff --git a/llvm-unbreak-static-cross.diff b/llvm-unbreak-static-cross.diff new file mode 100644 index 000000000..594731dee --- /dev/null +++ b/llvm-unbreak-static-cross.diff @@ -0,0 +1,44 @@ +diff --git a/pkgs/development/compilers/llvm/12/llvm/default.nix b/pkgs/development/compilers/llvm/12/llvm/default.nix +index 30a1a7a16df..bb5676b9d48 100644 +--- a/pkgs/development/compilers/llvm/12/llvm/default.nix ++++ b/pkgs/development/compilers/llvm/12/llvm/default.nix +@@ -74,7 +74,7 @@ in stdenv.mkDerivation (rec { + --replace 'set(_install_rpath "@loader_path/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' "" + '' + # Patch llvm-config to return correct library path based on --link-{shared,static}. +- + optionalString (enableSharedLibraries) '' ++ + '' + substitute '${./outputs.patch}' ./outputs.patch --subst-var lib + patch -p1 < ./outputs.patch + '' + '' +diff --git a/pkgs/development/compilers/llvm/12/llvm/outputs.patch b/pkgs/development/compilers/llvm/12/llvm/outputs.patch +index 40096fa3497..878460e05b8 100644 +--- a/pkgs/development/compilers/llvm/12/llvm/outputs.patch ++++ b/pkgs/development/compilers/llvm/12/llvm/outputs.patch +@@ -2,23 +2,13 @@ diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.c + index 94d426b..37f7794 100644 + --- a/tools/llvm-config/llvm-config.cpp + +++ b/tools/llvm-config/llvm-config.cpp +-@@ -333,6 +333,21 @@ int main(int argc, char **argv) { ++@@ -333,6 +333,11 @@ int main(int argc, char **argv) { + ActiveIncludeOption = "-I" + ActiveIncludeDir; + } + +-+ /// Nix-specific multiple-output handling: override ActiveLibDir if --link-shared +++ /// Nix-specific multiple-output handling: override ActiveLibDir + + if (!IsInDevelopmentTree) { +-+ bool WantShared = true; +-+ for (int i = 1; i < argc; ++i) { +-+ StringRef Arg = argv[i]; +-+ if (Arg == "--link-shared") +-+ WantShared = true; +-+ else if (Arg == "--link-static") +-+ WantShared = false; // the last one wins +-+ } +-+ +-+ if (WantShared) +-+ ActiveLibDir = std::string("@lib@") + "/lib" + LLVM_LIBDIR_SUFFIX; +++ ActiveLibDir = std::string("@lib@") + "/lib" + LLVM_LIBDIR_SUFFIX; + + } + + + /// We only use `shared library` mode in cases where the static library form From a6275fbb57ed1e3850596c957169f593092cdb4e Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 2 Dec 2021 19:08:20 +0800 Subject: [PATCH 06/11] flake: add libffi on Windows --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index a88b7a84c..8147ae766 100644 --- a/flake.nix +++ b/flake.nix @@ -68,6 +68,7 @@ name = "nac3artiq"; src = self; inherit cargoSha256; + buildInputs = [ pkgs-mingw.libffi ]; configurePhase = '' export PYO3_CONFIG_FILE=${pyo3-mingw-config} From aab43b1c07e98576001f6713fc16a0fe41323dd7 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 2 Dec 2021 20:00:45 +0800 Subject: [PATCH 07/11] flake: unbreak Windows library link (WIP) --- flake.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 8147ae766..a476cdb94 100644 --- a/flake.nix +++ b/flake.nix @@ -68,12 +68,19 @@ name = "nac3artiq"; src = self; inherit cargoSha256; - buildInputs = [ pkgs-mingw.libffi ]; + buildInputs = [ pkgs-mingw.libffi pkgs-mingw.zlib pkgs-mingw.windows.mcfgthreads ]; configurePhase = '' export PYO3_CONFIG_FILE=${pyo3-mingw-config} + mkdir llvm-cfg - ln -s ${pkgs-mingw.llvm_12.dev}/bin/llvm-config-native llvm-cfg/llvm-config + cat << EOF > llvm-cfg/llvm-config + #!${pkgs.bash}/bin/bash + set -e + # gross hack to work around llvm-config asking for the wrong system libraries + exec ${pkgs-mingw.llvm_12.dev}/bin/llvm-config-native \$@ | ${pkgs.gnused}/bin/sed s/-lrt\ -ldl/-lmcfgthread\ -lz/ + EOF + chmod +x llvm-cfg/llvm-config export PATH=$PATH:`pwd`/llvm-cfg ''; cargoBuildFlags = [ "--package" "nac3artiq" ]; From 998f49261d5a7d800d5bfdceae5064d60bf2fbba Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 2 Dec 2021 21:02:48 +0800 Subject: [PATCH 08/11] flake: fix Windows libs further --- flake.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index a476cdb94..f0fdc431c 100644 --- a/flake.nix +++ b/flake.nix @@ -77,8 +77,9 @@ cat << EOF > llvm-cfg/llvm-config #!${pkgs.bash}/bin/bash set -e - # gross hack to work around llvm-config asking for the wrong system libraries - exec ${pkgs-mingw.llvm_12.dev}/bin/llvm-config-native \$@ | ${pkgs.gnused}/bin/sed s/-lrt\ -ldl/-lmcfgthread\ -lz/ + # Gross hack to work around llvm-config asking for the wrong system libraries. + # Also add some other libraries we need here. + exec ${pkgs-mingw.llvm_12.dev}/bin/llvm-config-native \$@ | ${pkgs.gnused}/bin/sed s/-lrt\ -ldl\ -lpthread\ -lm/-lmcfgthread\ -lz\ -luuid\ -lole32/ EOF chmod +x llvm-cfg/llvm-config export PATH=$PATH:`pwd`/llvm-cfg From c0f8d5c6022e8044d439407a20dfa0f7459ef6e0 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 2 Dec 2021 22:01:19 +0800 Subject: [PATCH 09/11] flake: Windows libs working --- flake.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index f0fdc431c..1a6c8d8dd 100644 --- a/flake.nix +++ b/flake.nix @@ -68,7 +68,7 @@ name = "nac3artiq"; src = self; inherit cargoSha256; - buildInputs = [ pkgs-mingw.libffi pkgs-mingw.zlib pkgs-mingw.windows.mcfgthreads ]; + buildInputs = [ pkgs-mingw.libffi pkgs-mingw.zlib ]; configurePhase = '' export PYO3_CONFIG_FILE=${pyo3-mingw-config} @@ -78,20 +78,19 @@ #!${pkgs.bash}/bin/bash set -e # Gross hack to work around llvm-config asking for the wrong system libraries. - # Also add some other libraries we need here. - exec ${pkgs-mingw.llvm_12.dev}/bin/llvm-config-native \$@ | ${pkgs.gnused}/bin/sed s/-lrt\ -ldl\ -lpthread\ -lm/-lmcfgthread\ -lz\ -luuid\ -lole32/ + exec ${pkgs-mingw.llvm_12.dev}/bin/llvm-config-native \$@ | ${pkgs.gnused}/bin/sed s/-lrt\ -ldl\ -lpthread\ -lm// EOF chmod +x llvm-cfg/llvm-config export PATH=$PATH:`pwd`/llvm-cfg + + export CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUSTFLAGS="-C link-arg=-lz -C link-arg=-luuid -C link-arg=-lole32 -C link-arg=-lmcfgthread" ''; cargoBuildFlags = [ "--package" "nac3artiq" ]; doCheck = false; installPhase = '' - TARGET_DIR=$out/${pkgs.python3Packages.python.sitePackages} - mkdir -p $TARGET_DIR - #cp target/x86_64-unknown-linux-gnu/release/libnac3artiq.so $TARGET_DIR/nac3artiq.so - ls target + mkdir -p $out + cp target/x86_64-pc-windows-gnu/release/nac3artiq.dll $out ''; meta.platforms = ["x86_64-windows"]; } From 6315027a8bd6ac899d31dd0789c3b42ae14193ca Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 2 Dec 2021 22:24:23 +0800 Subject: [PATCH 10/11] flake: use *.pyd for Windows Python module --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 1a6c8d8dd..ebbe3437a 100644 --- a/flake.nix +++ b/flake.nix @@ -90,7 +90,7 @@ installPhase = '' mkdir -p $out - cp target/x86_64-pc-windows-gnu/release/nac3artiq.dll $out + cp target/x86_64-pc-windows-gnu/release/nac3artiq.dll $out/nac3artiq.pyd ''; meta.platforms = ["x86_64-windows"]; } From 25fc9db66dbdb62032ec51909f556c8b3aa4d077 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 2 Dec 2021 22:24:33 +0800 Subject: [PATCH 11/11] cargo: specify inkwell LLVM target explicitly Windows LLVM linking otherwise breaks on the non-existing targets. --- nac3artiq/Cargo.toml | 7 ++++++- nac3core/Cargo.toml | 7 ++++++- nac3standalone/Cargo.toml | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/nac3artiq/Cargo.toml b/nac3artiq/Cargo.toml index 96161a9ad..b527b92e9 100644 --- a/nac3artiq/Cargo.toml +++ b/nac3artiq/Cargo.toml @@ -10,8 +10,13 @@ crate-type = ["cdylib"] [dependencies] pyo3 = { version = "0.14", features = ["extension-module"] } -inkwell = { git = "https://github.com/TheDan64/inkwell", branch = "master", features = ["llvm12-0"] } parking_lot = "0.11" tempfile = "3" nac3parser = { path = "../nac3parser" } nac3core = { path = "../nac3core" } + +[dependencies.inkwell] +git = "https://github.com/TheDan64/inkwell" +branch = "master" +default-features = false +features = ["llvm12-0", "target-x86", "target-arm", "target-riscv"] diff --git a/nac3core/Cargo.toml b/nac3core/Cargo.toml index 24d26b915..5aae208f6 100644 --- a/nac3core/Cargo.toml +++ b/nac3core/Cargo.toml @@ -7,13 +7,18 @@ edition = "2018" [dependencies] num-bigint = "0.3" num-traits = "0.2" -inkwell = { git = "https://github.com/TheDan64/inkwell", branch = "master", features = ["llvm12-0"] } itertools = "0.10.1" crossbeam = "0.8.1" parking_lot = "0.11.1" rayon = "1.5.1" nac3parser = { path = "../nac3parser" } +[dependencies.inkwell] +git = "https://github.com/TheDan64/inkwell" +branch = "master" +default-features = false +features = ["llvm12-0", "target-x86", "target-arm", "target-riscv"] + [dev-dependencies] test-case = "1.2.0" indoc = "1.0" diff --git a/nac3standalone/Cargo.toml b/nac3standalone/Cargo.toml index df776f1a9..41f330698 100644 --- a/nac3standalone/Cargo.toml +++ b/nac3standalone/Cargo.toml @@ -5,7 +5,12 @@ authors = ["M-Labs"] edition = "2018" [dependencies] -inkwell = { git = "https://github.com/TheDan64/inkwell", branch = "master", features = ["llvm12-0"] } parking_lot = "0.11.1" nac3parser = { path = "../nac3parser" } nac3core = { path = "../nac3core" } + +[dependencies.inkwell] +git = "https://github.com/TheDan64/inkwell" +branch = "master" +default-features = false +features = ["llvm12-0", "target-x86", "target-arm", "target-riscv"]