Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update rust to 1.69.0 #595

Merged
merged 5 commits into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/komodo_mac_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ jobs:
steps:
- uses: actions/checkout@v2

# Workaround for https://github.com/actions/setup-python/issues/577
- name: Clean up binaries and links (macOS)
run: |
rm -f /usr/local/bin/2to3-3.*
rm -f /usr/local/bin/idle3.*
rm -f /usr/local/bin/pydoc3.*
rm -f /usr/local/bin/python3.*
rm -f /usr/local/bin/2to3
rm -f /usr/local/bin/idle3
rm -f /usr/local/bin/pydoc3
rm -f /usr/local/bin/python3
rm -f /usr/local/bin/python3-config

- name: Install deps (macOS)
run: |
brew update
Expand Down
38 changes: 38 additions & 0 deletions contrib/devtools/update-rust-hashes.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please provide a comment on the purpose and usage of this script

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env bash

export LC_ALL=C

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
RUST_PACKAGE="$SCRIPT_DIR/../../depends/packages/rust.mk"

RUST_VERSION=$( grep -oP "_version=\K.*" $RUST_PACKAGE )

update_hash() {
url="https://static.rust-lang.org/dist/$1-$RUST_VERSION-$2.tar.gz"
echo "Fetching $url"
hash=$( curl $url | sha256sum | awk '{print $1}' )
sed -i "/\$(package)_$3_$4=/c\\\$(package)_$3_$4=$hash" $RUST_PACKAGE
}

update_rust_hash() {
update_hash rust $1 sha256_hash $2
}

update_stdlib_hash() {
update_hash rust-std $1 rust_std_sha256_hash $1
}

# For native targets
# update_rust_hash RUST_TARGET MAKEFILE_PACKAGE_IDENTIFIER
update_rust_hash aarch64-unknown-linux-gnu aarch64_linux
update_rust_hash x86_64-apple-darwin darwin
update_rust_hash x86_64-unknown-linux-gnu linux
update_rust_hash x86_64-unknown-freebsd freebsd
update_rust_hash x86_64-pc-windows-gnu mingw32

# For cross-compilation targets
# update_stdlib_hash RUST_TARGET
# update_stdlib_hash aarch64-unknown-linux-gnu
# update_stdlib_hash x86_64-apple-darwin
# update_stdlib_hash x86_64-pc-windows-gnu
# update_stdlib_hash x86_64-unknown-freebsd
2 changes: 1 addition & 1 deletion depends/packages/librustzcash.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $(package)_dependencies=rust $(rust_crates)
$(package)_patches=cargo.config 0001-Start-using-cargo-clippy-for-CI.patch remove-dev-dependencies.diff

ifeq ($(host_os),mingw32)
$(package)_library_file=target/x86_64-pc-windows-gnu/release/rustzcash.lib
$(package)_library_file=target/x86_64-pc-windows-gnu/release/librustzcash.a
else
$(package)_library_file=target/release/librustzcash.a
endif
Expand Down
17 changes: 11 additions & 6 deletions depends/packages/rust.mk
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
package=rust
$(package)_version=1.32.0
$(package)_version=1.69.0
$(package)_download_path=https://static.rust-lang.org/dist

$(package)_file_name_linux=rust-$($(package)_version)-x86_64-unknown-linux-gnu.tar.gz
$(package)_sha256_hash_linux=e024698320d76b74daf0e6e71be3681a1e7923122e3ebd03673fcac3ecc23810
$(package)_sha256_hash_linux=2ca4a306047c0b8b4029c382910fcbc895badc29680e0332c9df990fd1c70d4f
$(package)_file_name_darwin=rust-$($(package)_version)-x86_64-apple-darwin.tar.gz
$(package)_sha256_hash_darwin=f0dfba507192f9b5c330b5984ba71d57d434475f3d62bd44a39201e36fa76304
$(package)_sha256_hash_darwin=9818dab2c3726d63dfbfde12c9273e62e484ef6d6f6e05a6431a3e089c335454
$(package)_file_name_mingw32=rust-$($(package)_version)-x86_64-pc-windows-gnu.tar.gz
$(package)_sha256_hash_mingw32=358e1435347c67dbf33aa9cad6fe501a833d6633ed5d5aa1863d5dffa0349be9
$(package)_sha256_hash_mingw32=9a2a887defb9d0e0aa48fd54237b583a693a2565420b4d90efd0740c0fe69b0d

define $(package)_set_vars
$(package)_stage_opts=--disable-ldconfig
$(package)_stage_build_opts=--without=rust-docs-json-preview,rust-docs
endef

ifeq ($(build_os),darwin)
$(package)_file_name=$($(package)_file_name_darwin)
Expand Down Expand Up @@ -41,12 +46,12 @@ define $(package)_extract_cmds
endef

define $(package)_stage_cmds
./install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig --without=rust-docs && \
./install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native $($(package)_stage_opts) $($(package)_stage_build_opts) && \
cp -r ../mingw32/rust-std-x86_64-pc-windows-gnu/lib/rustlib/x86_64-pc-windows-gnu $($(package)_staging_dir)$(host_prefix)/native/lib/rustlib
endef
else

define $(package)_stage_cmds
./install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native --disable-ldconfig --without=rust-docs
./install.sh --destdir=$($(package)_staging_dir) --prefix=$(host_prefix)/native $($(package)_stage_opts) $($(package)_stage_build_opts)
endef
endif
2 changes: 1 addition & 1 deletion zcutil/build-mac-dtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ make "$@" -C ./depends/ V=1 NO_QT=1 NO_PROTON=1
./autogen.sh

CPPFLAGS="-I$PREFIX/include -arch x86_64 -DTESTMODE" LDFLAGS="-L$PREFIX/lib -arch x86_64 -Wl,-no_pie" \
CXXFLAGS="-arch x86_64 -I/usr/local/Cellar/gcc\@8/8.3.0/include/c++/8.3.0/ -I$PREFIX/include -fwrapv -fno-strict-aliasing -Wno-builtin-declaration-mismatch -Werror -Wno-error=attributes -g -Wl,-undefined -Wl,dynamic_lookup" \
CXXFLAGS="-arch x86_64 -I/usr/local/Cellar/gcc\@8/8.3.0/include/c++/8.3.0/ -I$PREFIX/include -fwrapv -fno-strict-aliasing -Wno-deprecated-declarations -Wno-builtin-declaration-mismatch -Werror -Wno-error=attributes -g -Wl,-undefined -Wl,dynamic_lookup" \
./configure --prefix="${PREFIX}" --with-gui=no "$HARDENING_ARG" "$LCOV_ARG" "$DEBUGGING_ARG"

make "$@" NO_GTEST=1 STATIC=1
2 changes: 1 addition & 1 deletion zcutil/build-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ make "$@" -C ./depends/ V=1 NO_QT=1 NO_PROTON=1
./autogen.sh

CPPFLAGS="-I$PREFIX/include -arch x86_64" LDFLAGS="-L$PREFIX/lib -arch x86_64 -Wl,-no_pie" \
CXXFLAGS="-arch x86_64 -I/usr/local/Cellar/gcc\@8/8.3.0/include/c++/8.3.0/ -I$PREFIX/include -fwrapv -fno-strict-aliasing -Wno-builtin-declaration-mismatch -Werror -Wno-error=attributes -g -Wl,-undefined -Wl,dynamic_lookup" \
CXXFLAGS="-arch x86_64 -I/usr/local/Cellar/gcc\@8/8.3.0/include/c++/8.3.0/ -I$PREFIX/include -fwrapv -fno-strict-aliasing -Wno-deprecated-declarations -Wno-builtin-declaration-mismatch -Werror -Wno-error=attributes -g -Wl,-undefined -Wl,dynamic_lookup" \
./configure --prefix="${PREFIX}" --with-gui=no "$HARDENING_ARG" "$LCOV_ARG" "$DEBUGGING_ARG"

make "$@" NO_GTEST=1 STATIC=1
Loading