From d0e6b8b6e3d20b8d58af708673d382a1e371087d Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Mon, 5 Jun 2023 02:15:20 +0000 Subject: [PATCH] Fix inlining demo after Fuchsia toolchain updates Fuchsia recently updated their toolchain to include llvm-debuginfod which needs an additional dependency, cpp-httplib in order to build LLVM properly. This patch adds instructions on how to build this dependency so that the demo still works. --- docs/inlining-demo/demo.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/inlining-demo/demo.md b/docs/inlining-demo/demo.md index 8f599dec..3ba1b76c 100644 --- a/docs/inlining-demo/demo.md +++ b/docs/inlining-demo/demo.md @@ -49,6 +49,30 @@ export LLVM_SRCDIR=~/llvm-project export LLVM_INSTALLDIR=~/llvm-install ``` +### LLVM Dependencies + +The LLVM toolchain that Fuchsia uses has a couple additionaly dependencies, +namely [cpp-httplib](https://github.com/yhirose/cpp-httplib). First off, +set a directory where the cpp-httplib install will go: + +```shell +export CPPHTTPLIB_SRC_DIR=~/cpphttplib +export CPPHTTPLIB_INSTALL_DIR=~/cpp-httplib-install +``` + +Then clone the repository and build: + +```shell +git clone https://github.com/yhirose/cpp-httplib $CPPHTTPLIB_SRC_DIR +mkdir $CPPHTTPLIB_SRC_DIR/build +cd $CPPHTTPLIB_SRC_DIR/build +cmake -GNinja \ + -DHTTPLIB_NO_EXCEPTIONS=ON \ + -DCMAKE_INSTALL_PREFIX=$CPPHTTPLIB_INSTALL_DIR \ + ../ +ninja install +``` + ### Fuchsia See instructions at https://fuchsia.dev/fuchsia-src/get-started/get_fuchsia_source. Make sure `PATH` is set up appropriately. @@ -144,6 +168,7 @@ cmake -G Ninja \ -DFUCHSIA_SDK=${IDK_DIR} \ -DCMAKE_INSTALL_PREFIX= \ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=On \ + -Dhttplib_ROOT=$CPPHTTPLIB_INSTALL_DIR \ -C ${LLVM_SRCDIR}/clang/cmake/caches/Fuchsia-stage2.cmake \ -C ${TFLITE_PATH}/tflite.cmake \ ${LLVM_SRCDIR}/llvm