Add two basic modules to core in order to test ir unification of clang

This commit is contained in:
Sameer Rahmani 2022-07-03 11:24:01 +01:00
parent 1ad61adb5a
commit e2873780b8
3 changed files with 30 additions and 3 deletions

View File

@ -22,9 +22,11 @@ if(NOT APPLE)
set(CMAKE_INSTALL_RPATH $ORIGIN)
endif()
set(SOURCES reader.cpp)
add_library(core STATIC
reader.cpp)
${SOURCES})
#add_custom_target(serene.core)
# Create an ALIAS target. This way if we mess up the name
# there will be an cmake error inseat of a linker error which is harder
# to understand. So any binary that wants to use serene has to
@ -52,7 +54,6 @@ else()
target_compile_features(core PUBLIC cxx_std_17)
endif()
#target_compile_options(core PUBLIC ${CMAKE_C_FLAGS} -emit-llvm)
# We need this directory, and users of our library will need it too
target_include_directories(core PUBLIC "$<BUILD_INTERFACE:${INCLUDE_DIR}>")
target_include_directories(core PUBLIC "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>")

26
core/lib/compiler.cpp Normal file
View File

@ -0,0 +1,26 @@
/*
* Serene Programming Language
*
* Copyright (c) 2019-2022 Sameer Rahmani <lxsameer@gnu.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 2.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "serene/core/reader.h"
#include "serene/types/types.h"
namespace serene {
int compile() { return 0; };
} // namespace serene

View File

@ -1,4 +1,4 @@
/* -*- C++ -*-
/*
* Serene Programming Language
*
* Copyright (c) 2019-2022 Sameer Rahmani <lxsameer@gnu.org>