Author: compnerd Date: Thu Sep 1 15:49:54 2016 New Revision: 280413 URL: http://llvm.org/viewvc/llvm-project?rev=280413&view=rev Log: build: don't add -fPIC on Windows
`-fPIC` doesn't make much sense for Windows, since Windows DLLs aren't compiled position independent and are instead relocated at runtime. Patch by Shoaib Meenai! Modified: libcxx/trunk/lib/CMakeLists.txt Modified: libcxx/trunk/lib/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/lib/CMakeLists.txt?rev=280413&r1=280412&r2=280413&view=diff ============================================================================== --- libcxx/trunk/lib/CMakeLists.txt (original) +++ libcxx/trunk/lib/CMakeLists.txt Thu Sep 1 15:49:54 2016 @@ -72,7 +72,9 @@ add_library_flags_if(LIBCXX_HAS_GCC_S_LI add_library_flags_if(LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB atomic) # Setup flags. -add_flags_if_supported(-fPIC) +if (NOT WIN32) + add_flags_if_supported(-fPIC) +endif() add_link_flags_if_supported(-nodefaultlibs) if ( APPLE AND (LIBCXX_CXX_ABI_LIBNAME STREQUAL "libcxxabi" OR _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits