From f4752f04c8213abc02e56ff081f08342da04f14f Mon Sep 17 00:00:00 2001 From: ascjones Date: Fri, 12 Aug 2022 16:18:21 +0100 Subject: [PATCH] Build dylint driver through rustup to fix windows build --- build.rs | 5 ++++- ink_linting/rust-toolchain.toml | 6 ------ 2 files changed, 4 insertions(+), 7 deletions(-) delete mode 100644 ink_linting/rust-toolchain.toml diff --git a/build.rs b/build.rs index 5a2b45334..109150998 100644 --- a/build.rs +++ b/build.rs @@ -165,7 +165,7 @@ fn build_and_zip_dylint_driver( out_dir: PathBuf, dylint_driver_dst_file: PathBuf, ) -> Result<()> { - let mut cmd = Command::new("cargo"); + let mut cmd = Command::new("rustup"); let manifest_arg = format!( "--manifest-path={}", @@ -173,6 +173,9 @@ fn build_and_zip_dylint_driver( ); let target_dir = format!("--target-dir={}", out_dir.display()); cmd.args(vec![ + "run", + "nightly-2022-06-30", + "cargo", "build", "--release", "--locked", diff --git a/ink_linting/rust-toolchain.toml b/ink_linting/rust-toolchain.toml deleted file mode 100644 index 6bcb1e0b7..000000000 --- a/ink_linting/rust-toolchain.toml +++ /dev/null @@ -1,6 +0,0 @@ -# This file corresponds to the `rust-toolchain` file used for the `dylint` examples here: -# https://github.com/trailofbits/dylint/tree/master/examples. - -[toolchain] -channel = "nightly-2022-06-30" -components = ["llvm-tools-preview", "rustc-dev"] \ No newline at end of file