[PATCH] D42026: Allow the llvm bindings to be disabled
Vassil Vassilev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 13 02:39:18 PST 2018
v.g.vassilev created this revision.
v.g.vassilev added reviewers: beanz, pcc.
Herald added a subscriber: mgorny.
There was some demand for this over the years, for example here <http://lists.llvm.org/pipermail/llvm-dev/2016-January/093989.html>.
My personal opinion is that bindings should be off by default because I doubt the majority of users need it.
This patch also helps a little when trying to fit the compilation of LLVM on the tight public infrastructures (such as travis).
Repository:
rL LLVM
https://reviews.llvm.org/D42026
Files:
CMakeLists.txt
cmake/config-ix.cmake
Index: cmake/config-ix.cmake
===================================================================
--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -569,10 +569,10 @@
endif()
set(LLVM_BINDINGS "")
-if(WIN32)
+find_program(GO_EXECUTABLE NAMES go DOC "go executable")
+if(WIN32 OR NOT LLVM_ENABLE_BINDINGS)
message(STATUS "Go bindings disabled.")
else()
- find_program(GO_EXECUTABLE NAMES go DOC "go executable")
if(GO_EXECUTABLE STREQUAL "GO_EXECUTABLE-NOTFOUND")
message(STATUS "Go bindings disabled.")
else()
@@ -612,7 +612,7 @@
# Keep the version requirements in sync with bindings/ocaml/README.txt.
include(FindOCaml)
include(AddOCaml)
-if(WIN32)
+if(WIN32 OR NOT LLVM_ENABLE_BINDINGS)
message(STATUS "OCaml bindings disabled.")
else()
find_package(OCaml)
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -509,6 +509,7 @@
option (LLVM_ENABLE_DOXYGEN "Use doxygen to generate llvm API documentation." OFF)
option (LLVM_ENABLE_SPHINX "Use Sphinx to generate llvm documentation." OFF)
option (LLVM_ENABLE_OCAMLDOC "Build OCaml bindings documentation." ON)
+option (LLVM_ENABLE_BINDINGS "Build bindings." ON)
set(LLVM_INSTALL_DOXYGEN_HTML_DIR "share/doc/llvm/doxygen-html"
CACHE STRING "Doxygen-generated HTML documentation install directory")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42026.129754.patch
Type: text/x-patch
Size: 1370 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180113/480c915f/attachment.bin>
More information about the llvm-commits
mailing list