diff --git a/Formula/rust.rb b/Formula/rust.rb index ac00e803030aa..a97f3fdf74d3b 100644 --- a/Formula/rust.rb +++ b/Formula/rust.rb @@ -4,13 +4,13 @@ class Rust < Formula license any_of: ["Apache-2.0", "MIT"] stable do - url "https://static.rust-lang.org/dist/rustc-1.51.0-src.tar.gz" - sha256 "7a6b9bafc8b3d81bbc566e7c0d1f17c9f499fd22b95142f7ea3a8e4d1f9eb847" + url "https://static.rust-lang.org/dist/rustc-1.52.1-src.tar.gz" + sha256 "3a6f23a26d0e8f87abbfbf32c5cd7daa0c0b71d0986abefc56b9a5fbfbd0bf98" resource "cargo" do url "https://github.com/rust-lang/cargo.git", - tag: "0.52.0", - revision: "43b129a20fbf1ede0df411396ccf0c024bf34134" + tag: "0.53.0", + revision: "69767412acbf7f64773427b1fb53e45296712c3c" end end @@ -43,18 +43,18 @@ class Rust < Formula on_macos do # From https://github.com/rust-lang/rust/blob/#{version}/src/stage0.txt if Hardware::CPU.arm? - url "https://static.rust-lang.org/dist/2021-02-11/cargo-1.50.0-aarch64-apple-darwin.tar.gz" - sha256 "19d526ef3518fb0322f809deddbd4208a27d08efa41d2188348f1be8d3bcfe5e" + url "https://static.rust-lang.org/dist/2021-03-25/cargo-1.51.0-aarch64-apple-darwin.tar.gz" + sha256 "3eb0eb6192635c4b844deb97004a7e38a631bb4507b1284c055df8533c00e77a" else - url "https://static.rust-lang.org/dist/2021-02-11/cargo-1.50.0-x86_64-apple-darwin.tar.gz" - sha256 "45640bb1cef40f25ecb4bd2a3bb34fdf884c418e625d4f9c9595d2aca84fad78" + url "https://static.rust-lang.org/dist/2021-03-25/cargo-1.51.0-x86_64-apple-darwin.tar.gz" + sha256 "37eb709e5ed8fe02d2c8d89bc0be3dc1d642cff223c25df311ff5a82eab53d4b" end end on_linux do # From: https://github.com/rust-lang/rust/blob/#{version}/src/stage0.txt - url "https://static.rust-lang.org/dist/2021-02-11/cargo-1.50.0-x86_64-unknown-linux-gnu.tar.gz" - sha256 "3456cfd9be761907a4d3aae475bd79d93662b7aee4541f28df3d1f7c7d71a034" + url "https://static.rust-lang.org/dist/2021-03-25/cargo-1.51.0-x86_64-unknown-linux-gnu.tar.gz" + sha256 "fe8abe2c2b467ac5f5021ff8020eda70de9e9f8f45b4a2e834afbd3b78323a31" end end @@ -63,19 +63,12 @@ def install # Fix build failure for compiler_builtins "error: invalid deployment target # for -stdlib=libc++ (requires OS X 10.7 or later)" - ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version + on_macos { ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version } # Ensure that the `openssl` crate picks up the intended library. # https://crates.io/crates/openssl#manual-configuration ENV["OPENSSL_DIR"] = Formula["openssl@1.1"].opt_prefix - # Fix build failure for cmake v0.1.24 "error: internal compiler error: - # src/librustc/ty/subst.rs:127: impossible case reached" on 10.11, and for - # libgit2-sys-0.6.12 "fatal error: 'os/availability.h' file not found - # #include " on 10.11 and "SecTrust.h:170:67: error: - # expected ';' after top level declarator" among other errors on 10.12 - ENV["SDKROOT"] = MacOS.sdk_path - args = ["--prefix=#{prefix}"] if build.head? args << "--disable-rpath"