summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-08 00:34:22 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-08 00:34:22 +0000
commit3908a4047ec7ec875c8ee15fddf400b193a3774b (patch)
treee33310e1a7c17b6db4be317622295b2d6fa9a155 /llvm
parenta15c3b712450405ff2ebe628fc3faf3ed429c587 (diff)
downloadbcm5719-llvm-3908a4047ec7ec875c8ee15fddf400b193a3774b.tar.gz
bcm5719-llvm-3908a4047ec7ec875c8ee15fddf400b193a3774b.zip
Prevent warning spew about -fPIC when using CMake generated Xcode project files.
llvm-svn: 86427
Diffstat (limited to 'llvm')
-rw-r--r--llvm/CMakeLists.txt20
1 files changed, 13 insertions, 7 deletions
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 5b30309bf33..794e8e951c6 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -164,13 +164,19 @@ option(LLVM_ENABLE_PIC "Build Position-Independent Code" ON)
set(ENABLE_PIC 0)
if( LLVM_ENABLE_PIC )
- if( SUPPORTS_FPIC_FLAG )
- message(STATUS "Building with -fPIC")
- add_llvm_definitions(-fPIC)
- set(ENABLE_PIC 1)
- else( SUPPORTS_FPIC_FLAG )
- message(STATUS "Warning: -fPIC not supported.")
- endif()
+ if( XCODE )
+ # Xcode has -mdynamic-no-pic on by default, which overrides -fPIC. I don't
+ # know how to disable this, so just force ENABLE_PIC off for now.
+ message(STATUS "Warning: -fPIC not supported with Xcode.")
+ else( XCODE )
+ if( SUPPORTS_FPIC_FLAG )
+ message(STATUS "Building with -fPIC")
+ add_llvm_definitions(-fPIC)
+ set(ENABLE_PIC 1)
+ else( SUPPORTS_FPIC_FLAG )
+ message(STATUS "Warning: -fPIC not supported.")
+ endif()
+ endif()
endif()
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_TOOLS_BINARY_DIR} )
OpenPOWER on IntegriCloud