diff options
author | Martin Nowack <m.nowack@imperial.ac.uk> | 2019-02-28 11:56:19 +0000 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2019-03-10 20:10:32 +0000 |
commit | cf930214e12b49e89be4674043d9f461d667baae (patch) | |
tree | 90de5ea1c643d0d7ad2c5cf55e862d309e605d48 /scripts/build/p-tcmalloc.inc | |
parent | b4d8fe0301b82e8abff0336bf6d1347dff11a853 (diff) | |
download | klee-cf930214e12b49e89be4674043d9f461d667baae.tar.gz |
Updated dependency build system for KLEE
Provide a single `scripts/build/build.sh` file to build KLEE and its dependencies.
Diffstat (limited to 'scripts/build/p-tcmalloc.inc')
-rw-r--r-- | scripts/build/p-tcmalloc.inc | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/scripts/build/p-tcmalloc.inc b/scripts/build/p-tcmalloc.inc new file mode 100644 index 00000000..00a97626 --- /dev/null +++ b/scripts/build/p-tcmalloc.inc @@ -0,0 +1,49 @@ +setup_build_variables_tcmalloc() { + TCMALLOC_SRC_PATH="${BASE}/gperftools-${TCMALLOC_VERSION}" + TCMALLOC_INSTALL_PATH="${BASE}/tcmalloc-install-${TCMALLOC_VERSION}" + return 0 +} + +download_tcmalloc() { + # Get tcmalloc release + cd "${BASE}" + wget "https://github.com/gperftools/gperftools/releases/download/gperftools-${TCMALLOC_VERSION}/gperftools-${TCMALLOC_VERSION}.tar.gz" + tar xfz "gperftools-${TCMALLOC_VERSION}.tar.gz" +} + +build_tcmalloc() { + cd "${TCMALLOC_SRC_PATH}" + ./configure --disable-dependency-tracking --disable-cpu-profiler \ + --disable-heap-checker --disable-debugalloc --enable-minimal \ + --prefix="${TCMALLOC_INSTALL_PATH}" + make "-j$(nproc)" || make +} + +install_tcmalloc() { + cd "${TCMALLOC_SRC_PATH}" + make install + touch "${TCMALLOC_INSTALL_PATH}"/.is_installed +} + +is_installed_tcmalloc() { + ( + setup_build_variables_tcmalloc + [[ -f "${TCMALLOC_INSTALL_PATH}"/.is_installed ]] + ) || return 1 +} + +setup_artifact_variables_tcmalloc() { + setup_build_variables_tcmalloc +} + + +get_docker_config_id_tcmalloc() { + echo "${TCMALLOC_VERSION}" +} + +get_build_artifacts_tcmalloc() { + ( + setup_build_variables_tcmalloc + echo "${TCMALLOC_INSTALL_PATH}" + ) +} \ No newline at end of file |