Skip to content
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
llvm: Add llvm-strip
And call Ninja directly, add variables to control parallel build jobs
  • Loading branch information
jhuntwork committed Jan 25, 2023
commit 14d0cd3c4a9f88980d4a8fa245eb12db4b91eb50
7 changes: 6 additions & 1 deletion buildpkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,20 @@ case "$cmd" in
find . | cpio -dump "$tmpdir" 2>/dev/null
cd - >/dev/null
trap 'printf "\nBuild directory was: %s\n" $tmpdir' EXIT
nproc=$(nproc)
nodes=${CIRCLE_NODE_TOTAL:-1}
[ -f ./.build-env ] || touch ./.build-env
docker run -it --rm \
-e nproc="$nproc" \
-e nodes="$nodes" \
-w "$tmpdir" \
-v "$tmpdir":"$tmpdir" \
-v "$MEREDIR":/mere \
-v "$(pwd)"/mere.key:/tmp/mere.key \
-v "$(pwd)"/dev-scripts/build-in-docker:/usr/local/bin/build-in-docker \
-v "$(pwd)"/dev-scripts/aa-distcc.sh:/usr/share/makepkg/tidy/aa-distcc.sh \
-v "$(pwd)"/packages/pacman/pacman-dev.conf:/etc/pacman.conf \
--env-file ./.env \
--env-file ./.build-env \
mere/dev:latest "$cmd"
printf '\nNew package(s) added to %s\n' "${MEREDIR}/pkgs"
printf 'Build logs are located at %s\n' "${MEREDIR}/logs"
Expand Down
2 changes: 1 addition & 1 deletion ci-scripts/ci-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if [ "$bn" != 'main' ] ; then
DISTCC_HOSTS="${DISTCC_HOSTS} ${peerip}:${DISTCC_PORT}"
step=$((step + 1))
done
cat >.env <<-EOF
cat >.build-env <<-EOF
DISTCC_HOSTS=$DISTCC_HOSTS
CC=/usr/lib/distcc/cc
CXX=/usr/lib/distcc/c++
Expand Down
5 changes: 5 additions & 0 deletions packages/llvm/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
15.0.6-3 (2023-01-25)

Add llvm-strip
Call ninja directly in build and use variables to control parallel jobs

15.0.6-2 (2022-12-24)

Add libclang as a separate package
Expand Down
7 changes: 5 additions & 2 deletions packages/llvm/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

pkgname=(llvm llvm-dev libLLVM libclang libcxx libunwind)
pkgver=15.0.6
pkgrel=2
pkgrel=3
pkgdesc='A collection of modular and reusable compiler and toolchain technologies.'
arch=('x86_64')
url='htps://llvm.org'
Expand Down Expand Up @@ -49,6 +49,7 @@ _binfiles=(
usr/bin/llvm-readobj
usr/bin/llvm-size
usr/bin/llvm-strings
usr/bin/llvm-strip
usr/bin/llvm-symbolizer
usr/bin/nm
usr/bin/objcopy
Expand All @@ -75,6 +76,8 @@ build() {
install -d build
cd build || return 1
unset CFLAGS CXXFLAGS LDFLAGS
CFLAGS='-Wno-gnu-line-marker' \
CXXFLAGS='-Wno-gnu-line-marker' \
cmake -G Ninja -Wno-dev \
-DCMAKE_BUILD_TYPE=Release \
-DCLANG_BUILD_EXAMPLES=OFF \
Expand Down Expand Up @@ -103,7 +106,7 @@ build() {
-DLLVM_HOST_TRIPLE="$CHOST" \
-DLLVM_INSTALL_BINUTILS_SYMLINKS=ON \
../llvm
cmake --build .
ninja -j "$((nproc * nodes * 2))"
}

package_llvm() {
Expand Down