7 echo "Usage: ${0} <commit_id>"
11 target="x86_64-fortanix-unknown-sgx"
12 url="https://github.com/fortanix/llvm-project/archive/${1}.tar.gz"
13 repo_name="llvm-project"
17 apt-get install -y --no-install-recommends \
26 dir_name="${target}_temp"
31 # Clone Fortanix's fork of llvm-project which has a port of libunwind
32 fetch_github_commit_archive "$repo_name" "$url"
33 cd "${repo_name}/libunwind"
38 cmake -DCMAKE_BUILD_TYPE="RELEASE" -DRUST_SGX=1 -G "Unix Makefiles" \
39 -DLLVM_ENABLE_WARNINGS=1 -DLIBUNWIND_ENABLE_WERROR=1 -DLIBUNWIND_ENABLE_PEDANTIC=0 \
40 -DLLVM_PATH=../../llvm/ ../
42 install -D "lib/libunwind.a" "/${target}/lib/libunwind.a"
47 { set +x; } 2>/dev/null
51 hide_output install_prereq