Skip to content
Open
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
18 changes: 9 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
- name: Install dependencies
run: |
brew install just ninja
rustup install 1.75
rustup toolchain install 1.75
rustup default 1.75-aarch64-apple-darwin
rustup install 1.79
rustup toolchain install 1.79
rustup default 1.79-aarch64-apple-darwin
- name: Clone
run: just clone
- name: Prepare
Expand Down Expand Up @@ -45,9 +45,9 @@ jobs:
- name: Install dependencies
run: |
brew install just ninja
rustup install 1.75
rustup toolchain install 1.75
rustup default 1.75-x86_64-apple-darwin
rustup install 1.79
rustup toolchain install 1.79
rustup default 1.79-x86_64-apple-darwin
- name: Clone
run: just clone
- name: Prepare
Expand Down Expand Up @@ -77,9 +77,9 @@ jobs:
- name: Install dependencies
run: |
sudo apt update; sudo apt install ninja-build
rustup install 1.75
rustup toolchain install 1.75
rustup default 1.75-x86_64-unknown-linux-gnu
rustup install 1.79
rustup toolchain install 1.79
rustup default 1.79-x86_64-unknown-linux-gnu
- name: Clone
run: just clone
- name: Prepare
Expand Down
7 changes: 3 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ configure:
./scripts/prepare.sh

patch:
cd {{ out_dir }}/rust && git apply {{justfile_directory()}}/patches/01-rust-novector.patch
cd {{ out_dir }}/rust/src/llvm-project && git apply {{justfile_directory()}}/patches/02-llvm-sroa-novector.patch


Expand All @@ -30,11 +29,11 @@ build-cargo:
# AG: this fails for me with macport and libiconv
# AG: I have to disable libiconv, run this manually
# AG: and then re-enable it
cd {{ out_dir }}/cargo && env OPENSSL_STATIC=1 cargo +1.75 build --release
cd {{ out_dir }}/cargo && env OPENSSL_STATIC=1 cargo +1.79 build --release

[linux]
build-cargo:
cd {{ out_dir }}/cargo && env OPENSSL_STATIC=1 OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu OPENSSL_INCLUDE_DIR=/usr/include/openssl cargo +1.75 build --release
cd {{ out_dir }}/cargo && env OPENSSL_STATIC=1 OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu OPENSSL_INCLUDE_DIR=/usr/include/openssl cargo +1.79 build --release


[linux,macos]
Expand All @@ -48,7 +47,7 @@ build-newlib:
build-newlib:
@echo "No need to build newlib on Windows"

deploy_dir := env('HOME') / '.cache/solana/v1.41/platform-tools'
deploy_dir := env('HOME') / '.cache/solana/v1.43/platform-tools'
artifact_tar := out_dir / artifact

package:
Expand Down
15 changes: 0 additions & 15 deletions patches/01-rust-novector.patch

This file was deleted.

26 changes: 8 additions & 18 deletions patches/02-llvm-sroa-novector.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 235f0da86..13461ffd0 100644
index 5038f8a1f..fe9d45a82 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -142,6 +142,12 @@ static cl::opt<bool> EnableVectorFCopySignExtendRound(
@@ -146,6 +146,12 @@ static cl::opt<bool> EnableVectorFCopySignExtendRound(
cl::desc(
"Enable merging extends and rounds into FCOPYSIGN on vector types"));

Expand All @@ -15,7 +15,7 @@ index 235f0da86..13461ffd0 100644
namespace {

class DAGCombiner {
@@ -8696,6 +8702,9 @@ static SDValue stripTruncAndExt(SDValue Value) {
@@ -8874,6 +8880,9 @@ static SDValue stripTruncAndExt(SDValue Value) {
/// =>
/// *((i32)p) = BSWAP(val);
SDValue DAGCombiner::mergeTruncStores(StoreSDNode *N) {
Expand All @@ -25,7 +25,7 @@ index 235f0da86..13461ffd0 100644
// The matching looks for "store (trunc x)" patterns that appear early but are
// likely to be replaced by truncating store nodes during combining.
// TODO: If there is evidence that running this later would help, this
@@ -8914,6 +8923,9 @@ SDValue DAGCombiner::MatchLoadCombine(SDNode *N) {
@@ -9092,6 +9101,9 @@ SDValue DAGCombiner::MatchLoadCombine(SDNode *N) {
assert(N->getOpcode() == ISD::OR &&
"Can only match load combining against OR nodes");

Expand All @@ -36,10 +36,10 @@ index 235f0da86..13461ffd0 100644
EVT VT = N->getValueType(0);
if (VT != MVT::i16 && VT != MVT::i32 && VT != MVT::i64)
diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp
index 983a75e1d..0e5cff400 100644
index 17a94f938..623a22913 100644
--- a/llvm/lib/Transforms/Scalar/SROA.cpp
+++ b/llvm/lib/Transforms/Scalar/SROA.cpp
@@ -121,6 +121,10 @@ static cl::opt<bool> SROAStrictInbounds("sroa-strict-inbounds", cl::init(false),
@@ -123,6 +123,10 @@ static cl::opt<bool> SROAStrictInbounds("sroa-strict-inbounds", cl::init(false),
/// Disable running mem2reg during SROA in order to test or debug SROA.
static cl::opt<bool> SROASkipMem2Reg("sroa-skip-mem2reg", cl::init(false),
cl::Hidden);
Expand All @@ -49,8 +49,8 @@ index 983a75e1d..0e5cff400 100644
+ cl::init(std::numeric_limits<uint64_t>::max()));
namespace {

/// Calculate the fragment of a variable to use when slicing a store
@@ -1066,6 +1070,11 @@ private:
class AllocaSliceRewriter;
@@ -1232,6 +1236,11 @@ private:
if (!IsOffsetKnown)
return PI.setAborted(&II);

Expand All @@ -62,13 +62,3 @@ index 983a75e1d..0e5cff400 100644
// This side of the transfer is completely out-of-bounds, and so we can
// nuke the entire transfer. However, we also need to nuke the other side
// if already added to our partitions.
@@ -2039,6 +2048,9 @@ static VectorType *isVectorPromotionViable(Partition &P, const DataLayout &DL) {
};
// Put load and store types into a set for de-duplication.
for (const Slice &S : P) {
+ /* AG: skip this */
+ continue;
+
Type *Ty;
if (auto *LI = dyn_cast<LoadInst>(S.getUse()->getUser()))
Ty = LI->getType();
6 changes: 3 additions & 3 deletions scripts/git-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ esac
OUT_DIR=$(realpath "${1:-out}")

pushd "${OUT_DIR}"
git clone --single-branch --branch solana-tools-v1.41 --recurse-submodules --shallow-submodules https://github.com/anza-xyz/rust.git
git clone --single-branch --branch solana-tools-v1.41 https://github.com/anza-xyz/cargo.git
git clone --single-branch --branch solana-tools-v1.41 https://github.com/anza-xyz/newlib.git
git clone --single-branch --branch solana-tools-v1.44 --recurse-submodules --shallow-submodules https://github.com/anza-xyz/rust.git
git clone --single-branch --branch solana-tools-v1.44 https://github.com/anza-xyz/cargo.git
git clone --single-branch --branch solana-tools-v1.44 https://github.com/anza-xyz/newlib.git

popd
16 changes: 12 additions & 4 deletions scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ case "${unameOut}" in
fi
esac

OUT_DIR=$(realpath "${1:-out}")
OUT_DIR="$(realpath ./)/${1:-out}"

pushd "${OUT_DIR}"

Expand All @@ -40,6 +40,10 @@ cp -R "cargo/target/release/cargo${EXE_SUFFIX}" deploy/rust/bin/
mkdir -p deploy/rust/lib/rustlib/
cp -R "rust/build/${HOST_TRIPLE}/stage1/lib/rustlib/${HOST_TRIPLE}" deploy/rust/lib/rustlib/
cp -R "rust/build/${HOST_TRIPLE}/stage1/lib/rustlib/sbf-solana-solana" deploy/rust/lib/rustlib/
cp -R "rust/build/${HOST_TRIPLE}/stage1/lib/rustlib/sbpf-solana-solana" deploy/rust/lib/rustlib/
cp -R "rust/build/${HOST_TRIPLE}/stage1/lib/rustlib/sbpfv1-solana-solana" deploy/rust/lib/rustlib/
cp -R "rust/build/${HOST_TRIPLE}/stage1/lib/rustlib/sbpfv2-solana-solana" deploy/rust/lib/rustlib/
cp -R "rust/build/${HOST_TRIPLE}/stage1/lib/rustlib/sbpfv3-solana-solana" deploy/rust/lib/rustlib/
find . -maxdepth 6 -type f -path "./rust/build/${HOST_TRIPLE}/stage1/lib/*" -exec cp {} deploy/rust/lib \;
mkdir -p deploy/rust/lib/rustlib/src/rust
cp "rust/build/${HOST_TRIPLE}/stage1/lib/rustlib/src/rust/Cargo.lock" deploy/rust/lib/rustlib/src/rust
Expand All @@ -58,7 +62,7 @@ clang
clang++
clang-cl
clang-cpp
clang-17
clang-18
ld.lld
ld64.lld
llc
Expand All @@ -82,7 +86,11 @@ if [[ "${HOST_TRIPLE}" != "x86_64-pc-windows-msvc" ]] ; then
cp -R newlib_install/sbf-solana/include deploy/llvm/
cp -R rust/src/llvm-project/lldb/scripts/solana/* deploy/llvm/bin/
cp -R rust/build/${HOST_TRIPLE}/llvm/lib/liblldb.* deploy/llvm/lib/
#cp -R rust/build/${HOST_TRIPLE}/llvm/lib/python* deploy/llvm/lib/
# if [[ "${HOST_TRIPLE}" == "x86_64-unknown-linux-gnu" || "${HOST_TRIPLE}" == "aarch64-unknown-linux-gnu" ]]; then
# cp -r rust/build/${HOST_TRIPLE}/llvm/local/lib/python* deploy/llvm/lib
# else
# cp -R rust/build/${HOST_TRIPLE}/llvm/lib/python* deploy/llvm/lib/
# fi
fi

# Sign macOS binaries - Disabled
Expand All @@ -104,7 +112,7 @@ fi
# llvm-readobj
# opt
# llvm-objcopy
# clang-17
# clang-18
# solana-lldb
# lldb-vscode
# liblldb.17.0.6-rust-dev.dylib
Expand Down
Loading