Skip to content

Commit 7caee3b

Browse files
neildharfacebook-github-bot
authored andcommitted
Link hdb with ICU
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
1 parent 05c853b commit 7caee3b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tools/hdb/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ target_link_libraries(hdb
2121
hermesapi
2222
)
2323

24+
hermes_link_icu(hdb)
25+
2426
hermes_strip_apple_debug_symbols(hdb)
2527

2628
install(TARGETS hdb

0 commit comments

Comments
 (0)