From 2a16b469dc1a5fea3cf2a0d52bcbaf7328d648d3 Mon Sep 17 00:00:00 2001 From: v-fox Date: Tue, 24 Oct 2017 07:08:29 +0500 Subject: [PATCH] unbreak build by removing dependency on non-existing static libraries and linking with shared ones, as everyone should --- CMakeLists.txt | 2 ++ rpcs3/CMakeLists.txt | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 89bc070..273e85a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.0.2) option(WITH_GDB "WITH_GDB" OFF) option(WITHOUT_LLVM "WITHOUT_LLVM" OFF) +option(USE_SHARED_LLVM_LIBS "Link against shared LLVM libs, instead of statically. +Only recommended on Gentoo. May interfere with mesa driver and make RPCS3 non-functional." OFF) if (WITH_GDB) add_definitions(-DWITH_GDB_DEBUGGER) diff --git a/rpcs3/CMakeLists.txt b/rpcs3/CMakeLists.txt index 641be7d..976c320 100644 --- a/rpcs3/CMakeLists.txt +++ b/rpcs3/CMakeLists.txt @@ -296,10 +296,16 @@ if(NOT LLVM_FOUND) else() add_definitions(${LLVM_DEFINITIONS}) add_definitions(-DLLVM_AVAILABLE) - if (CMAKE_BUILD_TYPE STREQUAL "Release") - llvm_map_components_to_libnames(LLVM_LIBS core support executionengine object runtimedyld x86desc x86info scalaropts mcjit vectorize ipo x86codegen x86disassembler) + + if (USE_SHARED_LLVM_LIBS) + Message("WARNING! Linking against shared LLVM libs may conflict with your system's mesa, rendering RPCS3 non-functional!") + set(LLVM_LIBS LLVM) else() - llvm_map_components_to_libnames(LLVM_LIBS core support executionengine object runtimedyld x86desc x86info scalaropts mcjit vectorize ipo x86codegen x86disassembler mcdisassembler) + if (CMAKE_BUILD_TYPE STREQUAL "Release") + llvm_map_components_to_libnames(LLVM_LIBS core support executionengine object runtimedyld x86desc x86info scalaropts mcjit vectorize ipo x86codegen x86disassembler) + else() + llvm_map_components_to_libnames(LLVM_LIBS core support executionengine object runtimedyld x86desc x86info scalaropts mcjit vectorize ipo x86codegen x86disassembler mcdisassembler) + endif() endif() if (NOT MSVC) -- 2.14.2