summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorPeter Zotov <whitequark@whitequark.org>2014-12-01 19:50:23 +0000
committerPeter Zotov <whitequark@whitequark.org>2014-12-01 19:50:23 +0000
commitb20073c63ca7cd4c2f73f469bf7793ba0678fb07 (patch)
tree3e15f61640de20fddc991b53b336c4f831197289 /llvm/test
parent57148cbcbdad689080c2db7681b0e2bfc952d3d8 (diff)
downloadbcm5719-llvm-b20073c63ca7cd4c2f73f469bf7793ba0678fb07.tar.gz
bcm5719-llvm-b20073c63ca7cd4c2f73f469bf7793ba0678fb07.zip
[OCaml] [cmake] Add CMake buildsystem for OCaml.
Closes PR15325. llvm-svn: 223071
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Bindings/OCaml/lit.local.cfg2
-rw-r--r--llvm/test/CMakeLists.txt18
-rw-r--r--llvm/test/lit.cfg3
3 files changed, 21 insertions, 2 deletions
diff --git a/llvm/test/Bindings/OCaml/lit.local.cfg b/llvm/test/Bindings/OCaml/lit.local.cfg
index bca5d39d249..7a83ca14280 100644
--- a/llvm/test/Bindings/OCaml/lit.local.cfg
+++ b/llvm/test/Bindings/OCaml/lit.local.cfg
@@ -3,5 +3,5 @@ config.suffixes = ['.ml']
if not 'ocaml' in config.root.llvm_bindings:
config.unsupported = True
-if config.root.have_ocaml_ounit != '1':
+if config.root.have_ocaml_ounit not in ('1', 'TRUE'):
config.unsupported = True
diff --git a/llvm/test/CMakeLists.txt b/llvm/test/CMakeLists.txt
index bdb5d79962d..69c9cf6ab10 100644
--- a/llvm/test/CMakeLists.txt
+++ b/llvm/test/CMakeLists.txt
@@ -68,6 +68,24 @@ if(TARGET llvm-go)
set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS} llvm-go)
endif()
+if(TARGET ocaml_llvm)
+ set(LLVM_TEST_DEPENDS ${LLVM_TEST_DEPENDS}
+ ocaml_llvm
+ ocaml_llvm_all_backends
+ ocaml_llvm_analysis
+ ocaml_llvm_bitreader
+ ocaml_llvm_bitwriter
+ ocaml_llvm_executionengine
+ ocaml_llvm_irreader
+ ocaml_llvm_linker
+ ocaml_llvm_target
+ ocaml_llvm_ipo
+ ocaml_llvm_passmgr_builder
+ ocaml_llvm_scalar_opts
+ ocaml_llvm_vectorize
+ )
+endif()
+
add_lit_testsuite(check-llvm "Running the LLVM regression tests"
${CMAKE_CURRENT_BINARY_DIR}
PARAMS llvm_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
diff --git a/llvm/test/lit.cfg b/llvm/test/lit.cfg
index 372e091add0..50ae60f67f8 100644
--- a/llvm/test/lit.cfg
+++ b/llvm/test/lit.cfg
@@ -196,7 +196,8 @@ config.substitutions.append( ('%python', config.python_executable) )
# OCaml substitutions.
# Support tests for both native and bytecode builds.
config.substitutions.append( ('%ocamlc',
- "%s ocamlc %s" % (config.ocamlfind_executable, config.ocaml_flags)) )
+ "%s ocamlc -cclib -L%s %s" %
+ (config.ocamlfind_executable, llvm_lib_dir, config.ocaml_flags)) )
if config.have_ocamlopt in ('1', 'TRUE'):
config.substitutions.append( ('%ocamlopt',
"%s ocamlopt -cclib -L%s -cclib -Wl,-rpath,%s %s" %
OpenPOWER on IntegriCloud