From c80a5c2022d075c5ecf212d30147c0bc0df99c09 Mon Sep 17 00:00:00 2001 From: sulincix Date: Sat, 7 Dec 2024 11:59:28 +0000 Subject: [PATCH] rust update and lld package --- dev/lang/rust/config.toml | 23 ++++++++++---- dev/lang/rust/ympbuild | 8 ++--- sys/devel/lld/ympbuild | 66 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 10 deletions(-) create mode 100644 sys/devel/lld/ympbuild diff --git a/dev/lang/rust/config.toml b/dev/lang/rust/config.toml index b451bdc7..8f5547cb 100644 --- a/dev/lang/rust/config.toml +++ b/dev/lang/rust/config.toml @@ -1,9 +1,7 @@ -# see config.toml.example for more possible options -# See the 8.4 book for an old example using shipped LLVM -# e.g. if not installing clang, or using a version before 13.0 +profile = "dist" -# tell x.py to not keep printing an annoying warning -changelog-seen = 2 +# see src/bootstrap/src/utils/change_tracker.rs +change-id = 131075 [llvm] # by default, rust will build for a myriad of architectures @@ -35,14 +33,26 @@ prefix = "/usr" docdir = "share/doc/rustc-@version@" [rust] +codegen-units-std = 1 +debuginfo-level = 1 +debuginfo-level-std = 2 channel = "stable" description = "" +rpath = false +frame-pointers = true +lld = false +use-lld = "external" +llvm-bitcode-linker = false +deny-warnings = false +backtrace-on-ice = true +remap-debuginfo = false +jemalloc = true # BLFS used to not install the FileCheck executable from llvm, # so disabled codegen tests. The assembly tests rely on FileCheck # and cannot easily be disabled, so those will anyway fail if # FileCheck has not been installed. -#codegen-tests = false +codegen-tests = false [target.x86_64-unknown-linux-gnu] # NB the output of llvm-config (i.e. help options) may be @@ -53,3 +63,4 @@ llvm-config = "/usr/bin/llvm-config" # NB the output of llvm-config (i.e. help options) may be # dumped to the screen when config.toml is parsed. llvm-config = "/usr/bin/llvm-config" + diff --git a/dev/lang/rust/ympbuild b/dev/lang/rust/ympbuild index 011069b5..29c7367e 100644 --- a/dev/lang/rust/ympbuild +++ b/dev/lang/rust/ympbuild @@ -1,7 +1,7 @@ #!/usr/bin/env bash name='rust' -release='5' -version='1.77.0' +release='6' +version='1.83.0' url='https://www.rust-lang.org' description='Systems programming language from Mozilla' email='aliriza.keskin@pardus.org.tr' @@ -10,8 +10,8 @@ license=('GPLv3') source=("https://static.rust-lang.org/dist/rustc-$version-src.tar.gz" 'config.toml') depends=(curl gcc libssh llvm) -makedepends=(cmake ninja perl python) -md5sums=('a16716f770639b428801e8280ba26453' +makedepends=(cmake ninja perl python lld) +sha256sums=('722d773bd4eab2d828d7dd35b59f0b017ddf9a97ee2b46c1b7f7fac5c8841c6e' 'SKIP') group=(dev.lang) uses=() diff --git a/sys/devel/lld/ympbuild b/sys/devel/lld/ympbuild new file mode 100644 index 00000000..278d442f --- /dev/null +++ b/sys/devel/lld/ympbuild @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +name='lld' +release='3' +version='18.1.1' +url='https://github.com/llvm/llvm-project' +description='The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.' +email='aliriza.keskin@pardus.org.tr' +maintainer='aliriza' +license=('GPLv3') +source=( + "https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/lld-$version.src.tar.xz" + "https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/cmake-$version.src.tar.xz" + "https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/libunwind-$version.src.tar.xz" + "https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/llvm-$version.src.tar.xz" +) + +depends=(llvm) +makedepends=() +sha256sums=( + '8456e8be08767f1f257733c5b56d0671d5b1a43fd78ffa53f024f307641f4612' + '5308023d1c1e9feb264c14f58db35c53061123300a7eb940364f46d574c8b2d6' + '999182a47a85dc27c426e301e100e6240082d602219a650137ea9a691c63dc53' + 'ab0508d02b2d126ceb98035c28638a9d7b1e7fa5ef719396236e72f59a02e1ac' +) + +group=(sys.devel) +uses=() +arch=('x86_64') + +cd $name-$version.src + +prepare(){ + mv ../cmake{-$version.src,} + mv ../libunwind{-$version.src,} +} + +local cmake_args=( + -G Ninja + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_INSTALL_PREFIX=/usr + -DCMAKE_INSTALL_DOCDIR=share/doc + -DCMAKE_SKIP_RPATH=ON + -DBUILD_SHARED_LIBS=ON + -DLLVM_BUILD_DOCS=OFF + -DLLVM_ENABLE_SPHINX=OFF + -DLLVM_EXTERNAL_LIT=/usr/bin/lit + -DLLVM_INCLUDE_TESTS=ON + -DLLVM_LINK_LLVM_DYLIB=ON + -DLLVM_INCLUDE_TESTS=OFF + -DLLVM_MAIN_SRC_DIR="$(realpath ../llvm-$version.src)" + -DSPHINX_WARNINGS_AS_ERRORS=OFF +) + +setup(){ + mkdir build && cd build + cmake .. ${cmake_args[@]} +} + +build(){ + ninja -C build +} + +package(){ + ninja -C build install +} +