From 68efdf5cefcbad4588b59a143f6746ec54b18341 Mon Sep 17 00:00:00 2001 From: raa-eruanna Date: Tue, 18 Oct 2016 18:21:22 -0400 Subject: [PATCH] - Fixed: Added linker flags for Linux to prevent crashes using LLVM. Using fix found by dpJudas. --- src/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9a5aec83b3..8ce02cdd23 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -610,6 +610,11 @@ if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE ) set( CMAKE_EXE_LINKER_FLAGS "-stdlib=libc++ ${CMAKE_EXE_LINKER_FLAGS}" ) endif () + # Linux - add these flags for LLVM compatibility to prevent crashing + if ( UNIX AND NOT APPLE ) + set( CMAKE_EXE_LINKER_FLAGS "-Wl,--exclude-libs,ALL ${CMAKE_EXE_LINKER_FLAGS}" ) + endif() + # Remove extra warnings when using the official DirectX headers. # Also, TDM-GCC 4.4.0 no longer accepts glibc-style printf formats as valid, # which is a royal pain. The previous version I had been using was fine with them.