Skip to content

Commit c9bc0dd

Browse files
committed
GLOG depends on libunwind. Sometimes libunwind symbols were missing.
This commit adds libunwind explicitly to the linking command.
1 parent ec4fa53 commit c9bc0dd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,12 @@ list(APPEND GRAPPA_ENV
202202
GLOG_v=1
203203
)
204204

205+
# libunwind must go after GLOG library in the linking list to resolve its references.
206+
# We force find_library to use static library because we are putting all dynamics before statics
207+
find_library(UNWIND_FOUND NAMES libunwind.a REQUIRED)
208+
message("UNWIND_FOUND: ${UNWIND_FOUND}")
209+
list(APPEND GRAPPA_STATIC_LIBS ${UNWIND_FOUND})
210+
205211
######################################################################
206212
# Google flags
207213
# in theory, it may come from third-party or from system directories,

0 commit comments

Comments
 (0)