Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: CMake by default erases the rpath when installing a target. In general this is fine because we set the `BUILD_WITH_INSTALL_RPATH` variable for each target in the `hermes_link_icu` function (which prevents this default behaviour). However, until now `hdb` did not explicitly link against ICU, which meant that the rpath would get erased on install. For example: ``` [538/539] Install the project... -- Install configuration: "Debug" -- Installing: /home/neildhar/build/./destroot/bin/hermes -- Installing: /home/neildhar/build/./destroot/bin/hermesc -- Installing: /home/neildhar/build/./destroot/bin/hdb -- Set runtime path of "./destroot/bin/hdb" to "" -- Installing: /home/neildhar/build/./destroot/bin/hbcdump -- Installing: /home/neildhar/build/./destroot/bin/hvm -- Up-to-date: /home/neildhar/build/./destroot/include/hermes/Public -- Up-to-date: /home/neildhar/build/./destroot/include/hermes/Public/Buffer.h -- Up-to-date: /home/neildhar/build/./destroot/include/hermes/Public/CrashManager.h -- Up-to-date: /home/neildhar/build/./destroot/include/hermes/Public/CtorConfig.h -- Up-to-date: /home/neildhar/build/./destroot/include/hermes/Public/DebuggerTypes.h -- Up-to-date: /home/neildhar/build/./destroot/include/hermes/Public/GCConfig.h -- Up-to-date: /home/neildhar/build/./destroot/include/hermes/Public/GCTripwireContext.h -- Up-to-date: /home/neildhar/build/./destroot/include/hermes/Public/RuntimeConfig.h -- Installing: /home/neildhar/build/./destroot/lib/libhermes.so -- Up-to-date: /home/neildhar/build/./destroot/include/hermes -- Up-to-date: /home/neildhar/build/./destroot/include/hermes/SynthTrace.h -- Up-to-date: /home/neildhar/build/./destroot/include/hermes/TracingRuntime.h -- Up-to-date: /home/neildhar/build/./destroot/include/hermes/hermes_tracing.h -- Up-to-date: /home/neildhar/build/./destroot/include/hermes/DebuggerAPI.h -- Up-to-date: /home/neildhar/build/./destroot/include/hermes/CompileJS.h -- Up-to-date: /home/neildhar/build/./destroot/include/hermes/TraceInterpreter.h -- Up-to-date: /home/neildhar/build/./destroot/include/hermes/SynthTraceParser.h -- Up-to-date: /home/neildhar/build/./destroot/include/hermes/hermes.h neildhar@devvm2076 ~/build> ./destroot/bin/hdb ./destroot/bin/hdb: error while loading shared libraries: libicuuc.so.53: cannot open shared object file: No such file or directory ``` To fix this, this diff explicitly calls `hermes_link_icu` for the `hdb` target so that we can safely add an install target. Reviewed By: tmikov Differential Revision: D22084012 fbshipit-source-id: 1e59e601007cf62186724ba23c65f9e9c9f5bc7e
- Loading branch information