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
13 changes: 5 additions & 8 deletions build-clang-with-args.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ if [ ! -d "$llvm_dir" ]; then
fi
cd "${llvm_dir}"
git fetch origin
git checkout --force "${LLVM_VERSION}"
git checkout --force "${LLVM_COMMIT}"

# Clang Symlinks
clang_links_to_create="clang++"
Expand Down Expand Up @@ -135,13 +135,15 @@ llvm_distribution_components+=";${llvm_tools}"

cmake "${llvm_dir}/llvm" \
-Wno-dev \
-GNinja \
-DCMAKE_BUILD_TYPE="${build_type}" \
-DCMAKE_INSTALL_PREFIX="${dist_dir}" \
-DLLVM_TARGETS_TO_BUILD="RISCV" \
-DLLVM_ENABLE_PROJECTS="clang;lld;clang-tools-extra" \
-DLLVM_ENABLE_BACKTRACES=Off \
-DLLVM_DEFAULT_TARGET_TRIPLE="${toolchain_target}" \
-DLLVM_STATIC_LINK_CXX_STDLIB=On \
-DLLVM_USE_LINKER="lld" \
-DCLANG_VENDOR="lowRISC" \
-DBUG_REPORT_URL="toolchains@lowrisc.org" \
-DLLVM_INCLUDE_EXAMPLES=Off \
Expand All @@ -167,7 +169,6 @@ ls -l "${dist_dir}"

# Write out build info
set +o pipefail # head causes pipe failures, so we have to switch off pipefail while we use it.
ct_ng_version_string="$( (set +o pipefail; ct-ng version | head -n1) )"
clang_version_string="$("${dist_dir}/bin/clang" --version | head -n1)"
build_date="$(date -u)"
set -o pipefail
Expand All @@ -180,11 +181,7 @@ lowRISC toolchain version: ${tag_name}

Clang version:
${clang_version_string}
(git: ${LLVM_URL} ${LLVM_VERSION})

Crosstool-ng version:
${ct_ng_version_string}
(git: ${CROSSTOOL_NG_URL} ${CROSSTOOL_NG_VERSION})
(git: ${LLVM_URL} ${LLVM_COMMIT})

C Flags:
-march=${march} -mabi=${mabi} -mcmodel=${mcmodel}
Expand All @@ -199,7 +196,7 @@ tee "${dist_dir}/buildinfo.json" <<BUILDINFO_JSON
"version": "${tag_name}",
"clang_version": "${clang_version_string}",
"clang_url": "${LLVM_URL}",
"clang_git": "${LLVM_VERSION}",
"clang_git": "${LLVM_COMMIT}",
"build_date": "${build_date}",
"build_host": "$(hostname)"
}
Expand Down
13 changes: 12 additions & 1 deletion prepare-host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,15 @@ dnf install -y \
zlib-devel \
zlib-static \
libffi-devel \
expat-static
expat-static \
lld

# the version of ninja in almalinux-8 is too old -
# we need at least version v1.10, so just build it ourselves
TMP_DIR="$(mktemp -d)"
git clone https://github.com/ninja-build/ninja.git \
--branch v1.12.0 --depth 1 "${TMP_DIR}"
cd "${TMP_DIR}"
./configure.py --bootstrap
install ninja /bin
rm -rf "{$TMP_DIR}"
2 changes: 1 addition & 1 deletion sw-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# - single-byte code coverage
export LLVM_URL=https://github.com/lowRISC/llvm-project.git
export LLVM_BRANCH=ot-llvm-16-hardening
export LLVM_VERSION=dec908d48facb6041c12b95b8ade64719a894917
export LLVM_COMMIT=dec908d48facb6041c12b95b8ade64719a894917

# RISC-V fork of Binutils 2.35 with bitmanip instruction support
export BINUTILS_URL=https://github.com/riscv-collab/riscv-binutils-gdb.git
Expand Down