llvm.org GIT mirror llvm / 7ca91f9
[CMake] Introduce LLVM_ENABLE_PLUGINS as an internal option. BUILD_SHARED_LIBS may not control enable/disable plugins. FIXME: Make this configurable. FIXME: "ENABLE_SHARED" doesn't make sense, since it is used just for plugins. We may rename it. I introduced config.enable_shared in r120273. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212315 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 5 years ago
2 changed file(s) with 17 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
209209 if(ARG_SHARED OR ARG_STATIC)
210210 message(WARNING "MODULE with SHARED|STATIC doesn't make sense.")
211211 endif()
212 if(NOT LLVM_ON_UNIX OR CYGWIN)
212 if(NOT LLVM_ENABLE_PLUGINS)
213213 message(STATUS "${name} ignored -- Loadable modules not supported on this platform.")
214214 return()
215215 endif()
574574
575575 set(SHLIBEXT "${LTDL_SHLIB_EXT}")
576576
577 if(BUILD_SHARED_LIBS)
578 set(LLVM_SHARED_LIBS_ENABLED "1")
579 else()
580 set(LLVM_SHARED_LIBS_ENABLED "0")
581 endif(BUILD_SHARED_LIBS)
582
583577 # Configuration-time: See Unit/lit.site.cfg.in
584578 if (CMAKE_CFG_INTDIR STREQUAL ".")
585579 set(LLVM_BUILD_MODE ".")
597591 string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} SHLIBDIR "${LLVM_SHLIB_OUTPUT_INTDIR}")
598592
599593 set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
600 set(ENABLE_SHARED ${LLVM_SHARED_LIBS_ENABLED})
594 # FIXME: "ENABLE_SHARED" doesn't make sense, since it is used just for
595 # plugins. We may rename it.
596 if(LLVM_ENABLE_PLUGINS)
597 set(ENABLE_SHARED "1")
598 else()
599 set(ENABLE_SHARED "0")
600 endif()
601601
602602 if(LLVM_ENABLE_ASSERTIONS AND NOT MSVC_IDE)
603603 set(ENABLE_ASSERTIONS "1")
412412 string(REGEX REPLACE "(^| ) */EH[-cs]+ *( |$)" "\\1 \\2" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
413413 string(REGEX REPLACE "(^| ) */GR-? *( |$)" "\\1 \\2" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
414414 endif()
415
416 # Plugin support
417 # FIXME: Make this configurable.
418 if(WIN32 OR CYGWIN)
419 # DLL platform(s) don't support plugins.
420 set(LLVM_ENABLE_PLUGINS OFF)
421 else()
422 set(LLVM_ENABLE_PLUGINS ON)
423 endif()