summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2011-01-09 14:34:39 +0000
committerOscar Fuentes <ofv@wanadoo.es>2011-01-09 14:34:39 +0000
commit2c5e0b8b981dc9d1ea575037b9befa8c3b6102b8 (patch)
treeaca074fdeb18bdbfaa21e6ea0ac9795b18a6d5aa /cmake
parente7d7865bfdc26c0e9732c6a98a36289b64fdc84a (diff)
downloadllvm-2c5e0b8b981dc9d1ea575037b9befa8c3b6102b8.tar.gz
llvm-2c5e0b8b981dc9d1ea575037b9befa8c3b6102b8.tar.bz2
llvm-2c5e0b8b981dc9d1ea575037b9befa8c3b6102b8.tar.xz
Rewrite handling of LLVM_ENABLE_PIC. It was being processed after
config.h was generated, so it had no effect on it. Thanks to arrowdodger for pointing out this and a tentative patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123119 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rwxr-xr-xcmake/config-ix.cmake7
1 files changed, 2 insertions, 5 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 27f2964038..f0e11767e3 100755
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -162,12 +162,9 @@ llvm_find_program(dotty)
# Define LLVM_MULTITHREADED if gcc atomic builtins exists.
include(CheckAtomic)
+set(ENABLE_PIC ${LLVM_ENABLE_PIC})
+
include(CheckCXXCompilerFlag)
-# On windows all code is position-independent and mingw warns if -fPIC
-# is in the command-line.
-if( NOT WIN32 )
- check_cxx_compiler_flag("-fPIC" SUPPORTS_FPIC_FLAG)
-endif()
check_cxx_compiler_flag("-Wno-variadic-macros" SUPPORTS_NO_VARIADIC_MACROS_FLAG)