[llvm] 2c5c243 - [llvm] [bindings/OCaml] Remove unused dep on ounit2

Michał Górny via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 16 10:30:53 PST 2022


Author: Michał Górny
Date: 2022-02-16T19:30:25+01:00
New Revision: 2c5c243bb5152de35c41f5880271451fce6165d0

URL: https://github.com/llvm/llvm-project/commit/2c5c243bb5152de35c41f5880271451fce6165d0
DIFF: https://github.com/llvm/llvm-project/commit/2c5c243bb5152de35c41f5880271451fce6165d0.diff

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

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 Shiwei Weng and Josh Berdine for bringing this to
my attention.

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

Added: 
    

Modified: 
    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

Removed: 
    


################################################################################
diff  --git a/llvm/bindings/ocaml/README.txt b/llvm/bindings/ocaml/README.txt
index a6a595e75bb5f..08b5514e0a664 100644
--- a/llvm/bindings/ocaml/README.txt
+++ b/llvm/bindings/ocaml/README.txt
@@ -6,7 +6,6 @@ Prerequisites
 
 * OCaml 4.00.0+.
 * ctypes 0.4+.
-* oUnit 2+ (only required for tests).
 * CMake (to build LLVM).
 
 Building the bindings

diff  --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake
index c70b8b3787a0a..18d78879c968f 100644
--- a/llvm/cmake/config-ix.cmake
+++ b/llvm/cmake/config-ix.cmake
@@ -650,12 +650,6 @@ else()
       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

diff  --git a/llvm/test/Bindings/OCaml/lit.local.cfg b/llvm/test/Bindings/OCaml/lit.local.cfg
index fd9e1c50e990c..364b97c632e83 100644
--- a/llvm/test/Bindings/OCaml/lit.local.cfg
+++ b/llvm/test/Bindings/OCaml/lit.local.cfg
@@ -2,6 +2,3 @@ config.suffixes = ['.ml']
 
 if not 'ocaml' in config.root.llvm_bindings:
     config.unsupported = True
-
-if not config.root.have_ocaml_ounit:
-    config.unsupported = True

diff  --git a/llvm/test/CMakeLists.txt b/llvm/test/CMakeLists.txt
index 46f87897a2025..b12b7f2ede4d1 100644
--- a/llvm/test/CMakeLists.txt
+++ b/llvm/test/CMakeLists.txt
@@ -2,7 +2,6 @@ llvm_canonicalize_cmake_booleans(
   BUILD_SHARED_LIBS
   LLVM_HAVE_LIBXAR
   HAVE_OCAMLOPT
-  HAVE_OCAML_OUNIT
   LLVM_ENABLE_DIA_SDK
   LLVM_ENABLE_FFI
   LLVM_ENABLE_THREADS

diff  --git a/llvm/test/lit.site.cfg.py.in b/llvm/test/lit.site.cfg.py.in
index e92cb0caa4e1c..5836c8e62b0d4 100644
--- a/llvm/test/lit.site.cfg.py.in
+++ b/llvm/test/lit.site.cfg.py.in
@@ -20,7 +20,6 @@ config.ld64_executable = "@LD64_EXECUTABLE@"
 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@"

diff  --git a/llvm/utils/gn/secondary/llvm/test/BUILD.gn b/llvm/utils/gn/secondary/llvm/test/BUILD.gn
index 970caaf54e368..544bebd731f12 100644
--- a/llvm/utils/gn/secondary/llvm/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/test/BUILD.gn
@@ -84,7 +84,6 @@ write_lit_config("lit_site_cfg") {
     "LLVM_INCLUDE_GO_TESTS=0",
 
     "HAVE_OCAMLOPT=0",
-    "HAVE_OCAML_OUNIT=0",
     "OCAMLFIND=OCAMLFIND-NOTFOUND",
     "OCAMLFLAGS=",
     "LLVM_BUILD_EXAMPLES=0",


        


More information about the llvm-commits mailing list