Skip to content

Commit 7551787

Browse files
committed
Add -lpthread for powerpc64le build
1 parent fa52a54 commit 7551787

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llvm/cmake/modules/HandleLLVMOptions.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,6 +1320,13 @@ if(LLVM_LINK_LLVM_DYLIB AND LLVM_EXPORT_SYMBOLS_FOR_PLUGINS)
13201320
message(FATAL_ERROR "LLVM_LINK_LLVM_DYLIB not compatible with LLVM_EXPORT_SYMBOLS_FOR_PLUGINS")
13211321
endif()
13221322

1323+
#The shared libs build for Linux on PowerPC requires -lpthread
1324+
if(BUILD_SHARED_LIBS AND ${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND LLVM_HOST_TRIPLE MATCHES "powerpc*")
1325+
append("-lpthread"
1326+
CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
1327+
endif()
1328+
1329+
13231330
# By default we should enable LLVM_ENABLE_IDE only for multi-configuration
13241331
# generators. This option disables optional build system features that make IDEs
13251332
# less usable.

0 commit comments

Comments
 (0)