about summary refs log tree commit diff homepage
path: root/runtime/Intrinsic
diff options
context:
space:
mode:
authorMartin Nowack <m.nowack@imperial.ac.uk>2019-11-08 22:55:56 +0000
committerCristian Cadar <c.cadar@imperial.ac.uk>2020-11-04 15:14:47 +0000
commit6156b4eeb9a429ccc370782d719d0d6c787a6f72 (patch)
tree71ca1ec35a44d8170798cf0dc44dd75f71d94040 /runtime/Intrinsic
parent5b8e54a95bc2e1f373710aa62f5e6b70768555e7 (diff)
downloadklee-6156b4eeb9a429ccc370782d719d0d6c787a6f72.tar.gz
[cmake] Add support to generate arbitrary runtime library configurations
Every runtime library can be build with multiple configurations.

Replace the Makefile-based setup by cmake one.
Currently, we generate 32bit and 64bit libraries simultaneously and can link against them.
Diffstat (limited to 'runtime/Intrinsic')
-rw-r--r--runtime/Intrinsic/CMakeLists.txt24
-rw-r--r--runtime/Intrinsic/Makefile.cmake.bitcode15
2 files changed, 24 insertions, 15 deletions
diff --git a/runtime/Intrinsic/CMakeLists.txt b/runtime/Intrinsic/CMakeLists.txt
new file mode 100644
index 00000000..488e149b
--- /dev/null
+++ b/runtime/Intrinsic/CMakeLists.txt
@@ -0,0 +1,24 @@
+#===------------------------------------------------------------------------===#
+#
+#                     The KLEE Symbolic Virtual Machine
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+#===------------------------------------------------------------------------===#
+# Set up
+set(LIB_PREFIX "RuntimeIntrinsic")
+set(SRC_FILES
+        dso_handle.c
+        klee_choose.c
+        klee_div_zero_check.c
+        klee_int.c
+        klee_is_replay.c
+        klee_overshift_check.c
+        klee_range.c
+        )
+
+# Build it
+include("${CMAKE_SOURCE_DIR}/cmake/compile_bitcode_library.cmake")
+prefix_with_path("${SRC_FILES}" "${CMAKE_CURRENT_SOURCE_DIR}/" prefixed_files)
+add_bitcode_library_targets("${LIB_PREFIX}" "${prefixed_files}" "-std=gnu89" "")
\ No newline at end of file
diff --git a/runtime/Intrinsic/Makefile.cmake.bitcode b/runtime/Intrinsic/Makefile.cmake.bitcode
deleted file mode 100644
index 77727fb4..00000000
--- a/runtime/Intrinsic/Makefile.cmake.bitcode
+++ /dev/null
@@ -1,15 +0,0 @@
-#===--------------------------------------------------------*- Makefile -*--===#
-#
-#                     The KLEE Symbolic Virtual Machine
-#
-# This file is distributed under the University of Illinois Open Source
-# License. See LICENSE.TXT for details.
-#
-#===------------------------------------------------------------------------===#
-LEVEL := ../
-
-include $(LEVEL)/Makefile.cmake.bitcode.config
-
-ARCHIVE_NAME=kleeRuntimeIntrinsic
-
-include $(LEVEL)/Makefile.cmake.bitcode.rules