[PATCH] D119884: [llvm] [bindings/OCaml] Remove unused dep on ounit2

Michał Górny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 15 12:26:01 PST 2022


mgorny created this revision.
mgorny added reviewers: jberdine, vaivaswatha.
mgorny requested review of this revision.
Herald added a project: LLVM.

Remove the dependency on ounit2 and the relevant lit code.  It seems
that ounit2 is not used at all and all OCaml binding tests pass without
it installed.

Thanks for Josh Berdine for noticing.


https://reviews.llvm.org/D119884

Files:
  llvm/bindings/ocaml/README.txt
  llvm/cmake/config-ix.cmake
  llvm/test/Bindings/OCaml/lit.local.cfg
  llvm/test/CMakeLists.txt
  llvm/test/lit.site.cfg.py.in
  llvm/utils/gn/secondary/llvm/test/BUILD.gn


Index: llvm/utils/gn/secondary/llvm/test/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/llvm/test/BUILD.gn
+++ llvm/utils/gn/secondary/llvm/test/BUILD.gn
@@ -84,7 +84,6 @@
     "LLVM_INCLUDE_GO_TESTS=0",
 
     "HAVE_OCAMLOPT=0",
-    "HAVE_OCAML_OUNIT=0",
     "OCAMLFIND=OCAMLFIND-NOTFOUND",
     "OCAMLFLAGS=",
     "LLVM_BUILD_EXAMPLES=0",
Index: llvm/test/lit.site.cfg.py.in
===================================================================
--- llvm/test/lit.site.cfg.py.in
+++ llvm/test/lit.site.cfg.py.in
@@ -20,7 +20,6 @@
 config.osx_sysroot = path(r"@CMAKE_OSX_SYSROOT@")
 config.ocamlfind_executable = "@OCAMLFIND@"
 config.have_ocamlopt = @HAVE_OCAMLOPT@
-config.have_ocaml_ounit = @HAVE_OCAML_OUNIT@
 config.ocaml_flags = "@OCAMLFLAGS@"
 config.include_go_tests = @LLVM_INCLUDE_GO_TESTS@
 config.go_executable = "@GO_EXECUTABLE@"
Index: llvm/test/CMakeLists.txt
===================================================================
--- llvm/test/CMakeLists.txt
+++ llvm/test/CMakeLists.txt
@@ -2,7 +2,6 @@
   BUILD_SHARED_LIBS
   LLVM_HAVE_LIBXAR
   HAVE_OCAMLOPT
-  HAVE_OCAML_OUNIT
   LLVM_ENABLE_DIA_SDK
   LLVM_ENABLE_FFI
   LLVM_ENABLE_THREADS
Index: llvm/test/Bindings/OCaml/lit.local.cfg
===================================================================
--- llvm/test/Bindings/OCaml/lit.local.cfg
+++ llvm/test/Bindings/OCaml/lit.local.cfg
@@ -2,6 +2,3 @@
 
 if not 'ocaml' in config.root.llvm_bindings:
     config.unsupported = True
-
-if not config.root.have_ocaml_ounit:
-    config.unsupported = True
Index: llvm/cmake/config-ix.cmake
===================================================================
--- llvm/cmake/config-ix.cmake
+++ llvm/cmake/config-ix.cmake
@@ -650,12 +650,6 @@
       find_ocamlfind_package(ctypes VERSION 0.4 OPTIONAL)
       if( HAVE_OCAML_CTYPES )
         message(STATUS "OCaml bindings enabled.")
-        find_ocamlfind_package(ounit2 OPTIONAL)
-        if ( HAVE_OCAML_OUNIT2 )
-          set(HAVE_OCAML_OUNIT TRUE)
-        else()
-          find_ocamlfind_package(oUnit VERSION 2 OPTIONAL)
-        endif()
         set(LLVM_BINDINGS "${LLVM_BINDINGS} ocaml")
 
         set(LLVM_OCAML_INSTALL_PATH "${OCAML_STDLIB_PATH}" CACHE STRING
Index: llvm/bindings/ocaml/README.txt
===================================================================
--- llvm/bindings/ocaml/README.txt
+++ llvm/bindings/ocaml/README.txt
@@ -6,7 +6,6 @@
 
 * OCaml 4.00.0+.
 * ctypes 0.4+.
-* oUnit 2+ (only required for tests).
 * CMake (to build LLVM).
 
 Building the bindings


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119884.409009.patch
Type: text/x-patch
Size: 2571 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220215/6d870889/attachment.bin>


More information about the llvm-commits mailing list