-
Notifications
You must be signed in to change notification settings - Fork 1.4k
rustup: new, 1.28.1 #20989
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
Merged
Merged
rustup: new, 1.28.1 #20989
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1070d19
rustup: new package, 1.28.1
500-internal-server-error e49a077
rustup: move profile script to environment /etc
500-internal-server-error 88b80c0
rustup: change copies to hardlinks
500-internal-server-error f5a7477
rustup: simplify ln call
500-internal-server-error c948530
rustup: remove clangarm64 support
500-internal-server-error 5bc7d1d
rustup: cleanup comments
500-internal-server-error File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| _realname=rustup | ||
| pkgbase=mingw-w64-${_realname} | ||
| pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") | ||
| pkgver=1.28.1 | ||
| pkgrel=1 | ||
| pkgdesc="The Rust toolchain installer (mingw-w64)" | ||
| arch=('x86_64') | ||
| mingw_arch=('mingw64' 'ucrt64' 'clang64') | ||
| url="https://github.com/rust-lang/rustup" | ||
| license=('spdx:Apache-2.0 AND MIT') | ||
| msys2_references=( | ||
| 'archlinux: rustup' | ||
| ) | ||
| depends=( | ||
| "${MINGW_PACKAGE_PREFIX}-curl" | ||
| "${MINGW_PACKAGE_PREFIX}-xz" | ||
| "${MINGW_PACKAGE_PREFIX}-zstd" | ||
| ) | ||
| makedepends=( | ||
| "git" | ||
| "${MINGW_PACKAGE_PREFIX}-rust" | ||
| "${MINGW_PACKAGE_PREFIX}-rust-bindgen" | ||
| "${MINGW_PACKAGE_PREFIX}-cmake" | ||
| "${MINGW_PACKAGE_PREFIX}-nasm" | ||
| ) | ||
| optdepends=( | ||
| "${MINGW_PACKAGE_PREFIX}-gdb: rust-gdb script" | ||
| "${MINGW_PACKAGE_PREFIX}-lldb: rust-lldb script" | ||
| ) | ||
| provides=("${MINGW_PACKAGE_PREFIX}-rust") | ||
| conflicts=("${MINGW_PACKAGE_PREFIX}-rust") | ||
| install='post.install' | ||
| options=("!lto") | ||
| source=( | ||
| "rustup-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz" | ||
| "git+https://github.com/aws/aws-lc-rs#tag=aws-lc-sys/v0.27.1" | ||
| "git+https://github.com/aws/aws-lc.git" | ||
| "aws-lc-clang-build.patch" # taken from https://github.com/msys2/MINGW-packages/blob/911c06155de002672b27b3c8bbe893615250b6bf/mingw-w64-zed/aws-lc-clang-build.patch | ||
| "rustup-profile.sh" | ||
| ) | ||
| sha256sums=('2def2f9a0a4a21c80f862c0797c2d76e765e0e7237e1e41f28324722ab912bac' | ||
| '5f564de6fb744db858d50ca3a1f0ce737f3d505fea7023c12d3cea3f61eaa20b' | ||
| 'SKIP' | ||
| '2e3d7ef6fdb3ef8a2ec11207e8120ea34553888116ea8a032cb425a8a6261c39' | ||
| 'dec8fd8b2838e7e5866a0bfbae2be89647c7c70a46c0ada1406accf4017322e9') | ||
| _binlinks=('cargo' 'rustc' 'rustdoc' 'rust-gdb' 'rust-lldb' 'rustfmt' 'cargo-fmt' 'cargo-clippy' 'clippy-driver' 'cargo-miri') | ||
|
|
||
| prepare() { | ||
| (cd aws-lc-rs | ||
| git config submodule."aws-lc-sys/aws-lc".url "${srcdir}/aws-lc" | ||
| git config submodule."aws-lc-fips-sys/aws-lc".url "${srcdir}/aws-lc" | ||
| git -c protocol.file.allow=always submodule update --init --recursive) | ||
|
|
||
| if [[ "${CC}" == 'clang' ]]; then | ||
| patch -d "${srcdir}/aws-lc-rs/aws-lc-sys/aws-lc" -Np1 -i "${srcdir}/aws-lc-clang-build.patch" | ||
| fi | ||
|
|
||
| cd "${_realname}-${pkgver}" | ||
|
|
||
| cat >> Cargo.toml <<END | ||
|
|
||
| [patch.crates-io] | ||
| aws-lc-sys = { path = "../aws-lc-rs/aws-lc-sys" } | ||
| END | ||
|
|
||
| cargo update -p aws-lc-rs --precise 1.12.6 | ||
| cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" | ||
| } | ||
|
|
||
| build() { | ||
| cd "${_realname}-${pkgver}" | ||
| cargo build --release --frozen --features no-self-update --bin rustup-init | ||
| } | ||
|
|
||
| package() { | ||
| cd "${_realname}-${pkgver}" | ||
| install -d "${pkgdir}/${MINGW_PREFIX}/lib/${_realname}/bin" | ||
| install -Dm755 "target/release/rustup-init" "${pkgdir}/${MINGW_PREFIX}/bin/rustup.exe" | ||
| for link in "${_binlinks[@]}"; do | ||
| ln "${pkgdir}/${MINGW_PREFIX}/bin/rustup.exe" "${pkgdir}/${MINGW_PREFIX}/bin/${link}.exe" | ||
| done | ||
|
|
||
| # Special treatment to allow for rust-analyzer to still allow the separate package version to be used. | ||
| ln "${pkgdir}/${MINGW_PREFIX}/bin/rustup.exe" "${pkgdir}/${MINGW_PREFIX}/lib/${_realname}/bin/rust-analyzer.exe" | ||
|
|
||
| install -Dm644 "${srcdir}/rustup-profile.sh" "${pkgdir}/${MINGW_PREFIX}/etc/profile.d/rustup.sh" | ||
|
|
||
| # Generate completion files. | ||
| mkdir -p "${pkgdir}/${MINGW_PREFIX}/share/bash-completion/completions" | ||
| "${pkgdir}/${MINGW_PREFIX}/bin/rustup" completions bash > "${pkgdir}/${MINGW_PREFIX}/share/bash-completion/completions/rustup" | ||
| "${pkgdir}/${MINGW_PREFIX}/bin/rustup" completions bash cargo > "${pkgdir}/${MINGW_PREFIX}/share/bash-completion/completions/cargo" | ||
| mkdir -p "${pkgdir}/${MINGW_PREFIX}/share/fish/vendor_completions.d" | ||
| "${pkgdir}/${MINGW_PREFIX}/bin/rustup" completions fish > "${pkgdir}/${MINGW_PREFIX}/share/fish/vendor_completions.d/rustup.fish" | ||
| mkdir -p "${pkgdir}/${MINGW_PREFIX}/share/zsh/site-functions" | ||
| "${pkgdir}/${MINGW_PREFIX}/bin/rustup" completions zsh > "${pkgdir}/${MINGW_PREFIX}/share/zsh/site-functions/_rustup" | ||
| "${pkgdir}/${MINGW_PREFIX}/bin/rustup" completions zsh cargo > "${pkgdir}/${MINGW_PREFIX}/share/zsh/site-functions/_cargo" | ||
|
|
||
| install -Dm644 LICENSE-MIT "${pkgdir}/${MINGW_PREFIX}/share/licenses/${pkgname}/LICENSE-MIT" | ||
| install -Dm644 LICENSE-APACHE "${pkgdir}/${MINGW_PREFIX}/share/licenses/${pkgname}/LICENSE-APACHE" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index fcb8c928e..d283a6ed4 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -399,7 +399,7 @@ if(GCC OR CLANG) | ||
| set(C_CXX_FLAGS "${C_CXX_FLAGS} -Wno-deprecated-declarations") | ||
| else() | ||
| set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra") | ||
| - set(C_CXX_FLAGS "${C_CXX_FLAGS} -Wall -fvisibility=hidden -fno-common") | ||
| + set(C_CXX_FLAGS "${C_CXX_FLAGS} -Wall -fvisibility=hidden -fno-common -fms-extensions") | ||
| set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wno-newline-eof") | ||
| endif() | ||
| set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow") | ||
| diff --git a/crypto/internal.h b/crypto/internal.h | ||
| index 4e42bb5b5..cb74fac23 100644 | ||
| --- a/crypto/internal.h | ||
| +++ b/crypto/internal.h | ||
| @@ -141,7 +141,7 @@ | ||
| #endif | ||
|
|
||
| #if defined(OPENSSL_THREADS) && \ | ||
| - (!defined(OPENSSL_WINDOWS) || defined(__MINGW32__)) | ||
| + (!defined(OPENSSL_WINDOWS) || defined(__MINGW32__) && !defined(__clang__)) | ||
| #include <pthread.h> | ||
| #define OPENSSL_PTHREADS | ||
| #endif | ||
| diff --git a/crypto/thread_win.c b/crypto/thread_win.c | ||
| index 9a1f8045e..0606e6db0 100644 | ||
| --- a/crypto/thread_win.c | ||
| +++ b/crypto/thread_win.c | ||
| @@ -146,6 +146,7 @@ static void NTAPI thread_local_destructor(PVOID module, DWORD reason, | ||
| // optimization from discarding the variable. | ||
| // | ||
| // Note, in the prefixed build, |p_thread_callback_boringssl| may be a macro. | ||
| +#ifdef _MSC_VER | ||
| #define STRINGIFY(x) #x | ||
| #define EXPAND_AND_STRINGIFY(x) STRINGIFY(x) | ||
| #ifdef _WIN64 | ||
| @@ -157,6 +158,7 @@ __pragma(comment(linker, "/INCLUDE:__tls_used")) | ||
| __pragma(comment( | ||
| linker, "/INCLUDE:_" EXPAND_AND_STRINGIFY(p_thread_callback_boringssl))) | ||
| #endif | ||
| +#endif | ||
|
|
||
| // .CRT$XLA to .CRT$XLZ is an array of PIMAGE_TLS_CALLBACK pointers that are | ||
| // called automatically by the OS loader code (not the CRT) when the module is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| post_install() { | ||
| echo "You may need to run 'rustup update stable'" | ||
| echo "and possibly also 'rustup self upgrade-data'" | ||
| } | ||
|
|
||
| post_upgrade() { | ||
| echo "You may need to run 'rustup self upgrade-data'" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| case ":$PATH" in | ||
| *:"${MINGW_PREFIX}/lib/rustup/bin":*) | ||
| ;; | ||
| *) | ||
| PATH="${PATH:+$PATH:}${MINGW_PREFIX}/lib/rustup/bin" | ||
| esac | ||
| export PATH |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.