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: 12 additions & 1 deletion BreakingChanges.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@

## development HEAD

*None*
- Removed `SpecialSummaries`.
- Removed `Hexastore` and the corresponding database queries.
- Removed `LLVMTypeHierarchy` (and `LLVMTypeHierarchyData`), which is superceeded by `DIBasedTypeHierarchy`.
- Removed `Resolver::preCall()`, `Resolver::postCall()`, and `Resolver::otherInst()`.
- Removed `TypestateDescription::start()`. Instead apply `TypestateDescription::getNextState()` on `TypestateDescription::uninit()`.
- Removed `LLVMProjectIRDB::getParsedIRModuleOrNull()`. Use `LLVMProjectIRDB::getParsedIRModuleOrErr()` instead.
- Removed `DIBasedTypeHierarchy::isVTable()` and `DIBasedTypeHierarchy::removeVTablePrefix()`. Use the corresponding functions from `LLVMVFTableProvider` instead.
- Removed the CMake variable `PHASAR_HAS_SQLITE` as we removed the dependency on sqlite3.
- The CMake Option `BUILD_PHASAR_CLANG` is no longer `ON` by default.
- Removed the dependency to boost:
- Removed the boost-related command-line options in `bootstrap.sh`
- `InstallAptDependencies.sh` no longer installs boost (so, boost is also no longer built into PhASAR's Docker containers)

## v2510

Expand Down
13 changes: 1 addition & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,6 @@ endif()
# Threads
find_package(Threads)

# Boost
find_package(Boost 1.65.1 COMPONENTS graph REQUIRED CONFIG)

# Disable clang-tidy for the external projects
set(CMAKE_CXX_CLANG_TIDY "")

Expand Down Expand Up @@ -294,14 +291,6 @@ else()
set(GTEST_INCLUDE_DIR "${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include")
endif()

# SQL
find_package(SQLite3)
if(SQLite3_FOUND)
set(PHASAR_HAS_SQLITE ON)
else()
set(PHASAR_HAS_SQLITE OFF)
endif()

option(USE_LLVM_FAT_LIB "Link against libLLVM.so instead of the individual LLVM libraries if possible (default is OFF; always on if BUILD_SHARED_LIBS is ON)" OFF)

# LLVM
Expand Down Expand Up @@ -350,7 +339,7 @@ else()
endif()

# Clang
option(BUILD_PHASAR_CLANG "Build the phasar_clang library (default is ON)" ON)
option(BUILD_PHASAR_CLANG "Build the phasar_clang library (default is OFF)" OFF)
if(BUILD_PHASAR_CLANG)
add_clang()
endif()
Expand Down
5 changes: 0 additions & 5 deletions Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,16 @@ include (CMakeFindDependencyMacro)
set(PHASAR_LLVM_VERSION @PHASAR_LLVM_VERSION@)

include("${CMAKE_CURRENT_LIST_DIR}/PhasarDepsExports.cmake")
find_dependency(Boost 1.65.1 COMPONENTS graph REQUIRED CONFIG)
find_dependency(LLVM ${PHASAR_LLVM_VERSION} REQUIRED CONFIG)

set(PHASAR_USE_LLVM_FAT_LIB @USE_LLVM_FAT_LIB@)
set(PHASAR_BUILD_DYNLIB @PHASAR_BUILD_DYNLIB@)
set(PHASAR_USE_Z3 @PHASAR_USE_Z3@)
set(PHASAR_HAS_SQLITE @PHASAR_HAS_SQLITE@)
set(PHASAR_BUILD_MODULES @PHASAR_BUILD_MODULES@)

if (PHASAR_USE_Z3)
find_dependency(Z3 REQUIRED)
endif()
if(PHASAR_HAS_SQLITE)
find_dependency(SQLite3 REQUIRED)
endif()

set(PHASAR_COMPONENTS
utils
Expand Down
70 changes: 1 addition & 69 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ function usage {
echo -e "\t--unittest\t-u\t\t- Build and run PhASARs unit-tests (default is true)"
echo -e "\t--install\t\t\t- Install PhASAR system-wide after building (default is false)"
echo -e "\t--help\t\t-h\t\t- Display this help message"
echo -e "\t-DBOOST_DIR=<path>\t\t- The directory where boost should be installed (optional)"
echo -e "\t-DBOOST_VERSION=<string>\t- The desired boost version to install (optional)"
echo -e "\t-DCMAKE_BUILD_TYPE=<string>\t- The build mode for building PhASAR. One of {Debug, RelWithDebInfo, Release} (default is Release)"
echo -e "\t-DPHASAR_INSTALL_DIR=<path>\t- The folder where to install PhASAR if --install is specified (default is ${PHASAR_INSTALL_DIR})"
echo -e "\t-DLLVM_INSTALL_DIR=<path>\t- The folder where to install LLVM if --install is specified (default is ${LLVM_INSTALL_DIR})"
Expand All @@ -48,24 +46,6 @@ case $key in
DO_UNIT_TEST=true
shift # past argument
;;
-DBOOST_DIR)
DESIRED_BOOST_DIR="$2"
shift # past argument
shift # past value
;;
-DBOOST_DIR=*)
DESIRED_BOOST_DIR="${key#*=}"
shift # past argument=value
;;
-DBOOST_VERSION)
DESIRED_BOOST_VERSION="$2"
shift # past argument
shift # past value
;;
-DBOOST_VERSION=*)
DESIRED_BOOST_VERSION="${key#*=}"
shift # past argument=value
;;
-DCMAKE_BUILD_TYPE=*)
BUILD_TYPE="${key#*=}"
shift # past argument=value
Expand Down Expand Up @@ -113,54 +93,6 @@ else
./utils/InstallAptDependencies.sh
fi

if [ ! -z "${DESIRED_BOOST_DIR}" ]; then
BOOST_PARAMS="-DBOOST_ROOT=${DESIRED_BOOST_DIR}"
else
# New way of installing boost:
# Check whether we have the required boost packages installed
{ BOOST_VERSION=$(echo -e '#include <boost/version.hpp>\nBOOST_LIB_VERSION' | gcc -s -x c++ -E - 2>/dev/null| grep "^[^#;]" | tr -d '\"'); } || true

if [ -z "$BOOST_VERSION" ] ;then
if [ -x "$(command -v pacman)" ]; then
yes | sudo pacman -Syu --needed boost-libs boost
else
if [ -z "$DESIRED_BOOST_VERSION" ] ;then
sudo apt-get install libboost-graph-dev -y
else
# DESIRED_BOOST_VERSION in form d.d, i.e. 1.65 (this is the latest version I found in the apt repo)
sudo apt-get install "libboost${DESIRED_BOOST_VERSION}-graph-dev" -y
fi
#verify installation
BOOST_VERSION=$(echo -e '#include <boost/version.hpp>\nBOOST_LIB_VERSION' | gcc -s -x c++ -E - 2>/dev/null| grep "^[^#;]" | tr -d '\"')
if [ -z "$BOOST_VERSION" ] ;then
echo "Failed installing boost $DESIRED_BOOST_VERSION"
exit 1
else
echo "Successfully installed boost v${BOOST_VERSION//_/.}"
fi
fi
else
echo "Already installed boost version ${BOOST_VERSION//_/.}"
if [ -x "$(command -v apt)" ]; then
DESIRED_BOOST_VERSION=${BOOST_VERSION//_/.}
# install missing packages if necessary
boostlibnames=("libboost-graph")
additional_boost_libs=()
for boost_lib in "${boostlibnames[@]}"; do
dpkg -s "$boost_lib${DESIRED_BOOST_VERSION}" >/dev/null 2>&1 ||
dpkg -s "$boost_lib${DESIRED_BOOST_VERSION}.0" >/dev/null 2>&1 ||
additional_boost_libs+=("$boost_lib${DESIRED_BOOST_VERSION}") ||
additional_boost_libs+=("$boost_lib${DESIRED_BOOST_VERSION}.0")
dpkg -s "${boost_lib}-dev" >/dev/null 2>&1 || additional_boost_libs+=("${boost_lib}-dev")
done
if [ ${#additional_boost_libs[@]} -gt 0 ] ;then
echo "Installing additional ${#additional_boost_libs[@]} boost packages: ${additional_boost_libs[*]}"
sudo apt-get install "${additional_boost_libs[@]}" -y || true
fi
fi
fi
fi

# installing LLVM
tmp_dir=$(mktemp -d "llvm-build.XXXXXXXX" --tmpdir)
./utils/install-llvm.sh "${NUM_THREADS}" "${tmp_dir}" "${LLVM_INSTALL_DIR}" ${LLVM_RELEASE}
Expand All @@ -182,7 +114,7 @@ export CXX=${LLVM_INSTALL_DIR}/bin/clang++

mkdir -p "${PHASAR_DIR}"/build
safe_cd "${PHASAR_DIR}"/build
cmake -G Ninja -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" "${BOOST_PARAMS}" -DPHASAR_BUILD_UNITTESTS="${DO_UNIT_TEST}" "${LLVM_PARAMS}" "${PHASAR_DIR}"
cmake -G Ninja -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" -DPHASAR_BUILD_UNITTESTS="${DO_UNIT_TEST}" "${LLVM_PARAMS}" "${PHASAR_DIR}"
cmake --build . -j "${NUM_THREADS}"

echo "phasar successfully built"
Expand Down
2 changes: 1 addition & 1 deletion cmake/add_llvm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ macro(add_clang)
if (USE_LLVM_FAT_LIB)
find_library(CLANG_LIBRARY NAMES clang-cpp libclang-cpp HINTS ${LLVM_LIBRARY_DIRS})
else()
find_library(CLANG_LIBRARY NAMES clangCodeGen clangTooling HINTS ${LLVM_LIBRARY_DIRS})
find_library(CLANG_LIBRARY NAMES clangTooling clangCodeGen HINTS ${LLVM_LIBRARY_DIRS})
endif()
if(${CLANG_LIBRARY} STREQUAL "CLANG_LIBRARY-NOTFOUND")
set(NEED_LIBCLANG_COMPONENT_LIBS ON)
Expand Down
9 changes: 3 additions & 6 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def node_labels(dot):
"nlohmann_json_schema_validator": "json-schema-validator::json-schema-validator",
"clangCodeGen": "clang::clangCodeGen",
"clangTooling": "clang::clangTooling",
"SQLite::SQLite3": "sqlite3::sqlite3",
}
for row in dot:
# e.g. "node0" [ label = "phasar\n(phasar::phasar)", shape = octagon ];
Expand All @@ -41,8 +40,6 @@ def node_labels(dot):
if label.startswith("LLVM"):
yield node, f"llvm-core::{label}"
# XXX find_library adds direct filepath -> imho a flaw in current cmake files
elif label.endswith("libsqlite3.a"):
yield node, "sqlite3::sqlite3"
elif label.endswith("libclang-cpp.so"):
yield node, "clang::clang"
elif label.endswith("libclangCodeGen.a"):
Expand Down Expand Up @@ -167,7 +164,9 @@ def export_sources(self):
"utils",
"img",
"githooks",
"external"
"external",
"build",
"cmake-build"
])

for tlf in os.listdir("."):
Expand Down Expand Up @@ -228,8 +227,6 @@ def config_options(self):
self.options.rm_safe("fPIC")

def requirements(self):
self.requires("boost/[>1.72.0 <=1.86.0]")
self.requires("sqlite3/[>=3 <4]")
self.requires(f"clang/{self.options.llvm_version}@secure-software-engineering", transitive_libs=True, transitive_headers=True)
self.requires("nlohmann_json/3.11.3", transitive_headers=True)
self.requires("json-schema-validator/2.3.0", transitive_libs=True, transitive_headers=True)
Expand Down
5 changes: 0 additions & 5 deletions include/phasar/DB.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,4 @@
#include "phasar/Config/phasar-config.h"
#include "phasar/DB/ProjectIRDBBase.h"

#ifdef PHASAR_HAS_SQLITE
#include "phasar/DB/Hexastore.h"
#include "phasar/DB/Queries.h"
#endif

#endif // PHASAR_DB_H
136 changes: 0 additions & 136 deletions include/phasar/DB/Hexastore.h

This file was deleted.

Loading
Loading