svf-tools 1.0.497 → 1.0.498
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build.sh +27 -26
- package/package.json +1 -1
package/build.sh
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
# if the LLVM_DIR variable is not set, LLVM will be downloaded.
|
|
5
5
|
#
|
|
6
6
|
# Dependencies include: build-essential libncurses5 libncurses-dev cmake zlib1g-dev
|
|
7
|
+
set -e # exit on first error
|
|
7
8
|
|
|
8
9
|
jobs=4
|
|
9
10
|
|
|
@@ -18,9 +19,9 @@ UbuntuLLVM="https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.
|
|
|
18
19
|
UbuntuArmLLVM="https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang+llvm-13.0.0-aarch64-linux-gnu.tar.xz"
|
|
19
20
|
SourceLLVM="https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-13.0.0.zip"
|
|
20
21
|
MacZ3="https://github.com/Z3Prover/z3/releases/download/z3-4.8.8/z3-4.8.8-x64-osx-10.14.6.zip"
|
|
22
|
+
MacArmZ3="https://github.com/Z3Prover/z3/releases/download/z3-4.9.1/z3-4.9.1-arm64-osx-11.0.zip"
|
|
21
23
|
UbuntuZ3="https://github.com/Z3Prover/z3/releases/download/z3-4.8.8/z3-4.8.8-x64-ubuntu-16.04.zip"
|
|
22
24
|
SourceZ3="https://github.com/Z3Prover/z3/archive/refs/tags/z3-4.8.8.zip"
|
|
23
|
-
Z3Git="--branch z3-4.8.14 https://github.com/Z3Prover/z3.git"
|
|
24
25
|
|
|
25
26
|
# Keep LLVM version suffix for version checking and better debugging
|
|
26
27
|
# keep the version consistent with LLVM_DIR in setup.sh and llvm_version in Dockerfile
|
|
@@ -28,21 +29,6 @@ LLVMHome="llvm-13.0.0.obj"
|
|
|
28
29
|
Z3Home="z3.obj"
|
|
29
30
|
|
|
30
31
|
|
|
31
|
-
function build_z3_from_source {
|
|
32
|
-
readonly GIT_SRC="${1}"
|
|
33
|
-
readonly INSTALL_DIR="${2}"
|
|
34
|
-
|
|
35
|
-
mkdir -p z3-src
|
|
36
|
-
pushd z3-src
|
|
37
|
-
git clone ${GIT_SRC} .
|
|
38
|
-
mkdir -p build && cd build
|
|
39
|
-
# We need a static library, so set the build option
|
|
40
|
-
cmake -DZ3_BUILD_LIBZ3_SHARED=FALSE ..
|
|
41
|
-
make -j ${jobs} && cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P cmake_install.cmake
|
|
42
|
-
echo "Z3 installed to ${INSTALL_DIR}. Temporary build dir `pwd` can be removed."
|
|
43
|
-
popd
|
|
44
|
-
}
|
|
45
|
-
|
|
46
32
|
# Downloads $1 (URL) to $2 (target destination) using wget or curl,
|
|
47
33
|
# depending on OS.
|
|
48
34
|
# E.g. generic_download_file www.url.com/my.zip loc/my.zip
|
|
@@ -144,17 +130,32 @@ OSDisplayName=""
|
|
|
144
130
|
|
|
145
131
|
########
|
|
146
132
|
# Set OS-specific values, mainly URLs to download binaries from.
|
|
133
|
+
# M1 Macs give back arm64, some Linuxes can give aarch64 for arm architecture
|
|
147
134
|
#######
|
|
148
135
|
if [[ $sysOS == "Darwin" ]]
|
|
149
136
|
then
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
137
|
+
if [[ "$arch" == "arm64" ]]
|
|
138
|
+
then
|
|
139
|
+
urlZ3="$MacArmZ3"
|
|
140
|
+
urlLLVM="llvm does not have osx arm pre-built libs"
|
|
141
|
+
OSDisplayName="macOS arm64"
|
|
142
|
+
else
|
|
143
|
+
urlZ3="$MacZ3"
|
|
144
|
+
urlLLVM="$MacLLVM"
|
|
145
|
+
OSDisplayName="macOS x86"
|
|
146
|
+
fi
|
|
153
147
|
elif [[ $sysOS == "Linux" ]]
|
|
154
148
|
then
|
|
155
|
-
[[ "$arch" == "aarch64" ]]
|
|
156
|
-
|
|
157
|
-
|
|
149
|
+
if [[ "$arch" == "aarch64" ]]
|
|
150
|
+
then
|
|
151
|
+
urlLLVM="$UbuntuArmLLVM"
|
|
152
|
+
urlZ3="z3 does not have x86 arm pre-built libs"
|
|
153
|
+
OSDisplayName="Ubuntu arm64"
|
|
154
|
+
else
|
|
155
|
+
urlLLVM="$UbuntuLLVM"
|
|
156
|
+
urlZ3="$UbuntuZ3"
|
|
157
|
+
OSDisplayName="Ubuntu x86"
|
|
158
|
+
fi
|
|
158
159
|
else
|
|
159
160
|
echo "Builds outside Ubuntu and macOS are not supported."
|
|
160
161
|
fi
|
|
@@ -166,10 +167,10 @@ if [ ! -d "$LLVM_DIR" ]
|
|
|
166
167
|
then
|
|
167
168
|
if [ ! -d "$LLVMHome" ]
|
|
168
169
|
then
|
|
169
|
-
if [ "$sysOS" = "Darwin" ] && [ "$arch" = "arm64" ]
|
|
170
|
+
if [ "$sysOS" = "Darwin" ] && [ "$arch" = "arm64" ] # only mac arm build from source
|
|
170
171
|
then
|
|
171
172
|
build_llvm_from_source
|
|
172
|
-
else
|
|
173
|
+
else # everything else downloads pre-built lib includ osx "arm64"
|
|
173
174
|
echo "Downloading LLVM binary for $OSDisplayName"
|
|
174
175
|
generic_download_file "$urlLLVM" llvm.tar.xz
|
|
175
176
|
check_xz
|
|
@@ -190,10 +191,10 @@ then
|
|
|
190
191
|
if [ ! -d "$Z3Home" ]
|
|
191
192
|
then
|
|
192
193
|
# M1 Macs give back arm64, some Linuxes can give aarch64.
|
|
193
|
-
if [ "$
|
|
194
|
+
if [ "$sysOS" = "Linux" ] && [ "$arch" = "aarch64" ] # only linux arm build from source
|
|
194
195
|
then
|
|
195
196
|
build_z3_from_source
|
|
196
|
-
else
|
|
197
|
+
else # everything else downloads pre-built lib includ osx "arm64"
|
|
197
198
|
echo "Downloading Z3 binary for $OSDisplayName"
|
|
198
199
|
generic_download_file "$urlZ3" z3.zip
|
|
199
200
|
check_unzip
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.498",
|
|
4
4
|
"description": "* <b>[TypeClone](https://github.com/SVF-tools/SVF/wiki/TypeClone) published in our [ECOOP paper](https://yuleisui.github.io/publications/ecoop20.pdf) is now available in SVF </b> * <b>SVF now uses a single script for its build. Just type [`source ./build.sh`](https://github.com/SVF-tools/SVF/blob/master/build.sh) in your terminal, that's it!</b> * <b>SVF now supports LLVM-10.0.0! </b> * <b>We thank [bsauce](https://github.com/bsauce) for writing a user manual of SVF ([link1](https://www.jianshu.com/p/068a08ec749c) and [link2](https://www.jianshu.com/p/777c30d4240e)) in Chinese </b> * <b>SVF now supports LLVM-9.0.0 (Thank [Byoungyoung Lee](https://github.com/SVF-tools/SVF/issues/142) for his help!). </b> * <b>SVF now supports a set of [field-sensitive pointer analyses](https://yuleisui.github.io/publications/sas2019a.pdf). </b> * <b>[Use SVF as an external lib](https://github.com/SVF-tools/SVF/wiki/Using-SVF-as-a-lib-in-your-own-tool) for your own project (Contributed by [Hongxu Chen](https://github.com/HongxuChen)). </b> * <b>SVF now supports LLVM-7.0.0. </b> * <b>SVF now supports Docker. [Try SVF in Docker](https://github.com/SVF-tools/SVF/wiki/Try-SVF-in-Docker)! </b> * <b>SVF now supports [LLVM-6.0.0](https://github.com/svf-tools/SVF/pull/38) (Contributed by [Jack Anthony](https://github.com/jackanth)). </b> * <b>SVF now supports [LLVM-4.0.0](https://github.com/svf-tools/SVF/pull/23) (Contributed by Jared Carlson. Thank [Jared](https://github.com/jcarlson23) and [Will](https://github.com/dtzWill) for their in-depth [discussions](https://github.com/svf-tools/SVF/pull/18) about updating SVF!) </b> * <b>SVF now supports analysis for C++ programs.</b> <br />",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|