diff options
author | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2016-02-09 19:41:14 +0000 |
---|---|---|
committer | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2016-02-09 19:41:14 +0000 |
commit | 155ca8f2519252b798c732389e2690d462b46e51 (patch) | |
tree | f577e94c2a657c27049e8b66413ebfb2e1a48a2b /llvm/lib/Support | |
parent | 4215cda66fc257a8a03614a0a3eb2e5d4bf9e163 (diff) | |
download | bcm5719-llvm-155ca8f2519252b798c732389e2690d462b46e51.tar.gz bcm5719-llvm-155ca8f2519252b798c732389e2690d462b46e51.zip |
llvm-config: Add preliminary Windows support
Summary:
This patch adds Windows support for a few of the llvm-config commands,
including cflags, ldflags, libs, and system-libs.
Currently llvm-config is untested, so this patch adds tests for the
commands that it fixes as well.
Reviewers: rnk
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16762
llvm-svn: 260263
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/CMakeLists.txt | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt index 75b3e89f916..0eb4a61fd8f 100644 --- a/llvm/lib/Support/CMakeLists.txt +++ b/llvm/lib/Support/CMakeLists.txt @@ -1,32 +1,30 @@ set(system_libs) -if( NOT MSVC ) - if( MINGW ) - # libuuid required for FOLDERID_Profile usage in lib/Support/Windows/Path.inc. - set(system_libs ${system_libs} psapi shell32 ole32 uuid) - elseif( CMAKE_HOST_UNIX ) - if( HAVE_LIBRT ) - set(system_libs ${system_libs} rt) +if( MSVC OR MINGW ) + # libuuid required for FOLDERID_Profile usage in lib/Support/Windows/Path.inc. + set(system_libs ${system_libs} psapi shell32 ole32 uuid) +elseif( CMAKE_HOST_UNIX ) + if( HAVE_LIBRT ) + set(system_libs ${system_libs} rt) + endif() + if( HAVE_LIBDL ) + set(system_libs ${system_libs} ${CMAKE_DL_LIBS}) + endif() + if(LLVM_ENABLE_TERMINFO) + if(HAVE_TERMINFO) + set(system_libs ${system_libs} ${TERMINFO_LIBS}) endif() - if( HAVE_LIBDL ) - set(system_libs ${system_libs} ${CMAKE_DL_LIBS}) - endif() - if(LLVM_ENABLE_TERMINFO) - if(HAVE_TERMINFO) - set(system_libs ${system_libs} ${TERMINFO_LIBS}) - endif() - endif() - if( LLVM_ENABLE_THREADS AND HAVE_LIBATOMIC ) - set(system_libs ${system_libs} atomic) - endif() - if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD ) - set(system_libs ${system_libs} pthread) - endif() - if ( LLVM_ENABLE_ZLIB AND HAVE_LIBZ ) - set(system_libs ${system_libs} z) - endif() - set(system_libs ${system_libs} m) - endif( MINGW ) -endif( NOT MSVC ) + endif() + if( LLVM_ENABLE_THREADS AND HAVE_LIBATOMIC ) + set(system_libs ${system_libs} atomic) + endif() + if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD ) + set(system_libs ${system_libs} pthread) + endif() + if ( LLVM_ENABLE_ZLIB AND HAVE_LIBZ ) + set(system_libs ${system_libs} z) + endif() + set(system_libs ${system_libs} m) +endif( MSVC OR MINGW ) add_llvm_library(LLVMSupport APFloat.cpp |