summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@auroraux.org>2009-08-03 01:08:25 +0000
committerEdward O'Callaghan <eocallaghan@auroraux.org>2009-08-03 01:08:25 +0000
commitd904635616ca27a56531375a7d25547c930a4040 (patch)
tree2debf48933b911292580b8ed393f7f19017f78d2
parentad9a17686dff730aa89f181b22ab4ec827d40be2 (diff)
downloadcompiler-rt-d904635616ca27a56531375a7d25547c930a4040.tar.gz
compiler-rt-d904635616ca27a56531375a7d25547c930a4040.tar.bz2
compiler-rt-d904635616ca27a56531375a7d25547c930a4040.tar.xz
Initial import of CMake type build system. Just like the rest of llvm..
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@77933 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--BlocksRuntime/CMakeLists.txt8
-rw-r--r--CMakeLists.txt34
-rw-r--r--lib/CMakeLists.txt29
-rw-r--r--lib/i386/CMakeLists.txt3
-rw-r--r--lib/ppc/CMakeLists.txt12
-rw-r--r--lib/x86_64/CMakeLists.txt5
-rw-r--r--test/CMakeLists.txt2
-rw-r--r--test/Unit/CMakeLists.txt109
-rw-r--r--test/Unit/ppc/CMakeLists.txt9
-rw-r--r--test/timing/CMakeLists.txt23
10 files changed, 234 insertions, 0 deletions
diff --git a/BlocksRuntime/CMakeLists.txt b/BlocksRuntime/CMakeLists.txt
new file mode 100644
index 00000000..33ab7e55
--- /dev/null
+++ b/BlocksRuntime/CMakeLists.txt
@@ -0,0 +1,8 @@
+PROJECT( BlocksRuntime )
+
+SET( SRCS
+ runtime.c
+ data.c
+ )
+
+ADD_LIBRARY( ${PROJECT_NAME} SHARED ${SRCS})
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 00000000..4ef82bef
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,34 @@
+# See docs/CMake.html for instructions about how to build Compiler-RT with CMake.
+
+project(CompilerRT)
+cmake_minimum_required(VERSION 2.6.1)
+
+set(PACKAGE_NAME compiler-rt)
+set(PACKAGE_VERSION 1.0svn)
+set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+set(PACKAGE_BUGREPORT "llvmbugs@cs.uiuc.edu")
+
+if( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE )
+ message(FATAL_ERROR "In-source builds are not allowed.
+CMake would overwrite the makefiles distributed with Compiler-RT.
+Please create a directory and run cmake from there, passing the path
+to this source directory as the last argument.
+This process created the file `CMakeCache.txt' and the directory `CMakeFiles'.
+Please delete them.")
+endif()
+
+install(DIRECTORY include
+ DESTINATION .
+ PATTERN ".svn" EXCLUDE
+ PATTERN "*.cmake" EXCLUDE
+ PATTERN "*.in" EXCLUDE
+ )
+
+# BlocksRuntime - some random cruft that got thrown in at the last minute, ignoring for now.
+# ADD_SUBDIRECTORY( BlocksRuntime )
+ADD_SUBDIRECTORY( lib )
+# Tests are being ignored for until the very basics are working.
+# ADD_SUBDIRECTORY( test )
+
+# Creates a shared lib .so
+ADD_LIBRARY( ${PROJECT_NAME} SHARED ${SRCS})
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
new file mode 100644
index 00000000..92499a6b
--- /dev/null
+++ b/lib/CMakeLists.txt
@@ -0,0 +1,29 @@
+#
+# Create a library called "CompilerRT" which includes the source files.
+
+# Generic functions needed for each architecture
+
+SET( SRCS
+ absvdi2.c cmpdi2.c fixdfdi.c floatdidf.c moddi3.c negvti2.c ucmpdi2.c
+ absvsi2.c cmpti2.c fixdfti.c floatdisf.c modsi3.c paritydi2.c ucmpti2.c
+ absvti2.c ctzdi2.c fixsfdi.c floatdixf.c modti3.c paritysi2.c udivdi3.c
+ addvdi3.c ctzsi2.c fixsfti.c floattidf.c muldc3.c parityti2.c udivmoddi4.c
+ addvsi3.c ctzti2.c fixunsdfdi.c floattisf.c muldi3.c popcountdi2.c udivmodti4.c
+ addvti3.c divdc3.c fixunsdfsi.c floattixf.c mulsc3.c popcountsi2.c udivsi3.c
+ apple_versioning.c divdi3.c fixunsdfti.c floatundidf.c multi3.c popcountti2.c udivti3.c
+ ashldi3.c divsc3.c fixunssfdi.c floatundisf.c mulvdi3.c powidf2.c umoddi3.c
+ ashlti3.c divsi3.c fixunssfsi.c floatundixf.c mulvsi3.c powisf2.c umodsi3.c
+ ashrdi3.c divti3.c fixunssfti.c floatuntidf.c mulvti3.c powitf2.c umodti3.c
+ ashrti3.c divxc3.c fixunsxfdi.c floatuntisf.c mulxc3.c powixf2.c
+ clear_cache.c enable_execute_stack.c fixunsxfsi.c floatuntixf.c negdi2.c subvdi3.c
+ clzdi2.c eprintf.c fixunsxfti.c gcc_personality_v0.c negti2.c subvsi3.c
+ clzsi2.c ffsdi2.c fixxfdi.c lshrdi3.c negvdi2.c subvti3.c
+ clzti2.c ffsti2.c fixxfti.c lshrti3.c negvsi2.c trampoline_setup.c
+ )
+
+# Optimized functions for each architecture
+
+# Commenting out for the min until the basics are working first.
+# ADD_SUBDIRECTORY( ppc )
+# ADD_SUBDIRECTORY( x86_64 )
+# ADD_SUBDIRECTORY( i386 )
diff --git a/lib/i386/CMakeLists.txt b/lib/i386/CMakeLists.txt
new file mode 100644
index 00000000..1c2861af
--- /dev/null
+++ b/lib/i386/CMakeLists.txt
@@ -0,0 +1,3 @@
+SET( SRCS
+
+ )
diff --git a/lib/ppc/CMakeLists.txt b/lib/ppc/CMakeLists.txt
new file mode 100644
index 00000000..fb0fcd5a
--- /dev/null
+++ b/lib/ppc/CMakeLists.txt
@@ -0,0 +1,12 @@
+SET( SRCS
+ fixtfdi.c
+ gcc_qdiv.c
+ gcc_qmul.c
+ divtc3.c
+ gcc_qsub.c
+ multc3.c
+ floatditf.c
+ gcc_qadd.c
+ fixunstfdi.c
+ floatunditf.c
+ )
diff --git a/lib/x86_64/CMakeLists.txt b/lib/x86_64/CMakeLists.txt
new file mode 100644
index 00000000..ee21308e
--- /dev/null
+++ b/lib/x86_64/CMakeLists.txt
@@ -0,0 +1,5 @@
+SET( SRCS
+ floatdixf.c
+ floatdisf.c
+ floatdidf.c
+ )
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
new file mode 100644
index 00000000..86c4689e
--- /dev/null
+++ b/test/CMakeLists.txt
@@ -0,0 +1,2 @@
+ADD_SUBDIRECTORY( timing )
+ADD_SUBDIRECTORY( Unit )
diff --git a/test/Unit/CMakeLists.txt b/test/Unit/CMakeLists.txt
new file mode 100644
index 00000000..14847c8c
--- /dev/null
+++ b/test/Unit/CMakeLists.txt
@@ -0,0 +1,109 @@
+PROJECT( Unit )
+
+SET( SRCS
+ ashldi3_test.c
+ gcc_personality_test.c
+ udivmodti4_test.c
+ negvsi2_test.c
+ fixdfdi_test.c
+ mulvsi3_test.c
+ fixdfti_test.c
+ muldc3_test.c
+ popcountdi2_test.c
+ negti2_test.c
+ divsc3_test.c
+ cmpti2_test.c
+ trampoline_setup_test.c
+ mulvti3_test.c
+ fixunsxfdi_test.c
+ fixunsxfti_test.c
+ paritydi2_test.c
+ negvti2_test.c
+ divtc3_test.c
+ ucmpti2_test.c
+ multc3_test.c
+ floatdixf_test.c
+ popcountti2_test.c
+ negdi2_test.c
+ floatdidf_test.c
+ fixunstfdi_test.c
+ ashlti3_test.c
+ enable_execute_stack_test.c
+ floatundixf_test.c
+ udivmoddi4_test.c
+ paritysi2_test.c
+ floatundidf_test.c
+ divdc3_test.c
+ floatuntisf_test.c
+ ucmpdi2_test.c
+ powixf2_test.c
+ mulsc3_test.c
+ popcountsi2_test.c
+ cmpdi2_test.c
+ floattisf_test.c
+ mulvdi3_test.c
+ fixunssfdi_test.c
+ fixunsdfsi_test.c
+ fixunssfti_test.c
+ parityti2_test.c
+ negvdi2_test.c
+ moddi3_test.c
+ clear_cache_test.c
+ fixunsxfsi_test.c
+ subvdi3_test.c
+ multi3_test.c
+ addvdi3_test.c
+ clzti2_test.c
+ umoddi3_test.c
+ absvsi2_test.c
+ ctzdi2_test.c
+ powitf2_test.c
+ fixsfdi_test.c
+ ffsti2_test.c
+ divdi3_test.c
+ fixsfti_test.c
+ absvti2_test.c
+ ashrti3_test.c
+ powisf2_test.c
+ mulxc3_test.c
+ lshrdi3_test.c
+ udivdi3_test.c
+ clzsi2_test.c
+ addvti3_test.c
+ udivsi3_test.c
+ clzdi2_test.c
+ floatuntidf_test.c
+ umodti3_test.c
+ divxc3_test.c
+ ctzti2_test.c
+ floatuntixf_test.c
+ powidf2_test.c
+ floattidf_test.c
+ modti3_test.c
+ fixunssfsi_test.c
+ fixunsdfdi_test.c
+ divsi3_test.c
+ floattixf_test.c
+ fixunsdfti_test.c
+ subvti3_test.c
+ muldi3_test.c
+ ctzsi2_test.c
+ absvdi2_test.c
+ ashrdi3_test.c
+ lshrti3_test.c
+ floatdisf_test.c
+ addvsi3_test.c
+ udivti3_test.c
+ umodsi3_test.c
+ subvsi3_test.c
+ fixxfdi_test.c
+ modsi3_test.c
+ fixxfti_test.c
+ ffsdi2_test.c
+ divti3_test.c
+ floatundisf_test.c
+ )
+
+ADD_LIBRARY( ${PROJECT_NAME} SHARED ${SRCS})
+# ADD_EXECUTABLE( ${PROJECT_NAME} ${SRCS} )
+# TARGET_LINK_LIBRARIES( ${PROJECT_NAME} ${LIBS} )
diff --git a/test/Unit/ppc/CMakeLists.txt b/test/Unit/ppc/CMakeLists.txt
new file mode 100644
index 00000000..45f1a269
--- /dev/null
+++ b/test/Unit/ppc/CMakeLists.txt
@@ -0,0 +1,9 @@
+SET( SRCS
+ floatditf_test.c
+ fixtfdi_test.c
+ qsub_test.c
+ qadd_test.c
+ qmul_test.c
+ qdiv_test.c
+ floatunditf_test.c
+ )
diff --git a/test/timing/CMakeLists.txt b/test/timing/CMakeLists.txt
new file mode 100644
index 00000000..4368731b
--- /dev/null
+++ b/test/timing/CMakeLists.txt
@@ -0,0 +1,23 @@
+PROJECT( timing )
+
+SET( SRCS
+ lshrdi3.c
+ floatundixf.c
+ floatdixf.c
+ umoddi3.c
+ udivdi3.c
+ negdi2.c
+ ashrdi3.c
+ muldi3.c
+ ashldi3.c
+ divdi3.c
+ floatundisf.c
+ floatdidf.c
+ floatdisf.c
+ moddi3.c
+ floatundidf.c
+ )
+
+ADD_LIBRARY( ${PROJECT_NAME} SHARED ${SRCS})
+# ADD_EXECUTABLE( ${PROJECT_NAME} ${SRCS} )
+# TARGET_LINK_LIBRARIES( ${PROJECT_NAME} ${LIBS} )