Skip to content
Draft
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
6 changes: 6 additions & 0 deletions .final_builds/packages/rust-1-linux/index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
builds:
cfd45a16afc4a9ee132855bbba23a780834af13ff3092277b4a086ae6d603b75:
version: cfd45a16afc4a9ee132855bbba23a780834af13ff3092277b4a086ae6d603b75
blobstore_id: cd7a6392-c3b6-4e9e-5aa7-5225ce5662ca
sha1: sha256:818a3bdbd9f67ba62af3e1f35add4fae9b71a15aa8d3551857b407f19e8274cb
format-version: "2"
3 changes: 3 additions & 0 deletions config/blobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ rubygems-4.0.11.tgz:
size: 971240
object_id: 1fdb3c0c-dfc9-4a86-6b80-1e968e996fb4
sha: sha256:95fe9d9d5293d022ceb29afac56eee4e2d46f901de309ab46915ff84d5ec68e8
rust-1-linux/rust-1.95.0.x86_64-unknown-linux-gnu.tar.gz:
size: 376272008
sha: sha256:a47ac940abd12399d59ad15c877e7113fa35f2b9ec7e6a8a045d4fd8b9741dea
yaml-0.2.5.tar.gz:
size: 609454
object_id: b5eeae2b-1496-4bc2-556f-efac50c8bcfa
Expand Down
1 change: 1 addition & 0 deletions jobs/ruby-4.0-test/spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ templates:
packages:
- ruby-4.0
- ruby-4.0-test
- rust-1-linux

properties: {}
33 changes: 22 additions & 11 deletions packages/ruby-4.0/packaging
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,25 @@ if [ $(uname -s) == "Darwin" ]; then
PATH="${brew_prefix_openssl}/bin:$PATH"
with_openssl_dir="--with-openssl-dir=$brew_prefix_openssl"
fi
fi

# Use Clang if available; the resulting Ruby is faster
Comment thread
aramprice marked this conversation as resolved.
if command -v clang &> /dev/null
then
export CC="$(command -v clang)"
fi

if command -v clang++ &> /dev/null
then
export CXX="$(command -v clang++)"
else

# Set up GCC environment
export CC="gcc"
export CXX="g++"

echo "GCC toolchain setup complete"
$CC --version
$CXX --version

# Now source Rust environment
source "${BOSH_PACKAGES_DIR:-/var/vcap/packages}/rust-1-linux/bosh/runtime.env"

# Let Rust use its internal LLVM - clear any conflicting flags
unset RUSTFLAGS

# Check Rust version
echo "Verifying Rust version (will use internal LLVM)..."
rustc --version --verbose
fi

openssl_version=$(openssl version)
Expand Down Expand Up @@ -58,6 +66,9 @@ tar xzf "ruby-${RUBY_VERSION}.tar.gz"
cp "${BOSH_COMPILE_TARGET}"/config/config.{guess,sub} ./tool
fi

# Disable LTO for better compatibility
sed -i 's/-C lto=thin/-C lto=no/' common.mk

LDFLAGS="-Wl,-rpath -Wl,${BOSH_INSTALL_TARGET}" ./configure --prefix="${BOSH_INSTALL_TARGET}" --disable-install-doc --with-opt-dir="${BOSH_INSTALL_TARGET}" --without-gmp $with_openssl_dir
make
make install
Expand Down
2 changes: 2 additions & 0 deletions packages/ruby-4.0/spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
name: ruby-4.0
dependencies:
- rust-1-linux

files:
- compile-4.0.env
Expand Down
2 changes: 2 additions & 0 deletions packages/rust-1-linux/spec.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
name: rust-1-linux
Comment thread
aramprice marked this conversation as resolved.
fingerprint: cfd45a16afc4a9ee132855bbba23a780834af13ff3092277b4a086ae6d603b75