From 83a331a9af6c69522d46263b53e8d211fe1aa09f Mon Sep 17 00:00:00 2001 From: Stefano Sanfilippo Date: Sun, 8 Mar 2015 12:19:06 +0100 Subject: [PATCH] Adding stdlib target to CMake, migrating runtime to C++. --- CMakeLists.txt | 4 ++++ Runtime.c => Runtime.cpp | 8 ++++---- Runtime.h => Runtime.hpp | 0 3 files changed, 8 insertions(+), 4 deletions(-) rename Runtime.c => Runtime.cpp (96%) rename Runtime.h => Runtime.hpp (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index e5680d7..3867919 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,3 +109,7 @@ target_link_libraries(mcc ${LLVM_LIBRARIES} ) +## 6. Build the runtime library too + +add_library(mcrt STATIC Runtime.cpp) + diff --git a/Runtime.c b/Runtime.cpp similarity index 96% rename from Runtime.c rename to Runtime.cpp index 48155d7..1c5c944 100644 --- a/Runtime.c +++ b/Runtime.cpp @@ -17,11 +17,11 @@ * along with this program. If not, see . */ -#include "Runtime.h" +#include "Runtime.hpp" -#include -#include -#include +#include +#include +#include void __Monicelli_main(); diff --git a/Runtime.h b/Runtime.hpp similarity index 100% rename from Runtime.h rename to Runtime.hpp