summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Górny <mgorny@moritz.systems>2022-02-15 21:21:12 +0100
committerTom Stellard <tstellar@redhat.com>2022-03-07 21:02:29 -0800
commit6a713120502abc0a42b8d518edea345b60e829f3 (patch)
tree8b8a5fc033c3514d15490dff25113aa2a1de03c1
parent2de2a2bba998f4145cfd4298d39bfd5e98485bdd (diff)
[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 (cherry picked from commit 2c5c243bb5152de35c41f5880271451fce6165d0)
-rw-r--r--llvm/bindings/ocaml/README.txt1
-rw-r--r--llvm/cmake/config-ix.cmake6
-rw-r--r--llvm/test/Bindings/OCaml/lit.local.cfg3
-rw-r--r--llvm/test/CMakeLists.txt1
-rw-r--r--llvm/test/lit.site.cfg.py.in1
-rw-r--r--llvm/utils/gn/secondary/llvm/test/BUILD.gn1
6 files changed, 0 insertions, 13 deletions
diff --git a/llvm/bindings/ocaml/README.txt b/llvm/bindings/ocaml/README.txt
index a6a595e75bb5..08b5514e0a66 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 c70b8b3787a0..18d78879c968 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 fd9e1c50e990..364b97c632e8 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 2d18625e8613..495dccc39204 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 e92cb0caa4e1..5836c8e62b0d 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 042972aff276..41abe22ef571 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",