Attempt to fix build on Windows with LLVM_ENABLE_PIC=OFF
authorNico Weber <nicolasweber@gmx.de>
Fri, 25 Jan 2019 23:37:57 +0000 (23:37 +0000)
committerNico Weber <nicolasweber@gmx.de>
Fri, 25 Jan 2019 23:37:57 +0000 (23:37 +0000)
commite9cac31dac90aaf0829b7215778fce41edc946f5
tree5eaa7c6c40da71c19c3ba7f35cb79f7e03935346
parented01f8cc43def054815e595f96a65c92a5051e12
Attempt to fix build on Windows with LLVM_ENABLE_PIC=OFF

libclang can be built in shared or static mode. On Windows, with
LLVM_ENABLE_PIC=OFF, it was built in neither mode, leading to clients of
libclang (c-index-test, c-arcmt-test) failing to link with it set.

Since PIC isn't really a thing on Windows, build libclang in shared mode when
LLVM_ENABLE_PIC=OFF there. This is also somewhat symmetric with the existing
ENABLE_STATIC a few lines down.

Differential Revision: https://reviews.llvm.org/D57258

llvm-svn: 352253
clang/tools/libclang/CMakeLists.txt