Skip to content
Snippets Groups Projects
Commit 133e33d5 authored by Petr Rockai's avatar Petr Rockai
Browse files

cmake: Update the dios/ build system to reflect the runtime -> dios move.

parent 63f089bd
No related branches found
No related tags found
No related merge requests found
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
include( stringify ) include( stringify )
file( GLOB H_RUNTIME LIST_DIRECTORIES false file( GLOB H_RUNTIME LIST_DIRECTORIES false
*.h dios/*.hpp dios/core/*.hpp dios/core/*.def dios/lib/*.hpp *.h sys/*.hpp sys/core/*.hpp sys/core/*.def sys/lib/*.hpp
dios/macro/* sys/macro/*
atomic sys/*.h bits/*.h atomic sys/*.h bits/*.h
abstract/*.hpp abstract/*.h abstract/*.hpp abstract/*.h
libc/include/*.h libc/internals/*.h libc/include/*.h libc/internals/*.h
...@@ -15,10 +15,9 @@ file( GLOB H_RUNTIME LIST_DIRECTORIES false ...@@ -15,10 +15,9 @@ file( GLOB H_RUNTIME LIST_DIRECTORIES false
libcxx/include/* libcxx/ext/* libcxx/include/experimental/* libcxx/include/* libcxx/ext/* libcxx/include/experimental/*
libcxx/src/*.h libcxx/src/*.h
libcxx/include/support/xlocale/*.h libcxx/src/support/atomic_support.h libcxx/include/support/xlocale/*.h libcxx/src/support/atomic_support.h
libunwind/include/* libunwind/include/mach-o/* dios/filesystem/*.h ) libunwind/include/* libunwind/include/mach-o/* sys/fs/*.h )
file( GLOB SRC_libdios file( GLOB SRC_dios sys/*.cpp sys/core/*.cpp sys/fs/*.cpp )
dios/*.cpp dios/core/*.cpp dios/filesystem/*.cpp )
file( GLOB SRC_libabstract abstract/*.cpp abstract/*.c ) file( GLOB SRC_libabstract abstract/*.cpp abstract/*.c )
file( GLOB SRC_libc libc/functions/*/*.c ) file( GLOB SRC_libc libc/functions/*/*.c )
...@@ -45,7 +44,7 @@ macro( mkobjs var flags ) ...@@ -45,7 +44,7 @@ macro( mkobjs var flags )
COMMAND mkdir -p bc COMMAND mkdir -p bc
COMMAND runtime-cc ${divine_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} COMMAND runtime-cc ${divine_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${f} bc/${out} ${flags} ) ${f} bc/${out} ${flags} )
stringify( "runtime" "." ${f} ) stringify( "dios" "." ${f} )
endforeach() endforeach()
endmacro() endmacro()
...@@ -60,7 +59,7 @@ macro( mklib lib ) ...@@ -60,7 +59,7 @@ macro( mklib lib )
COMMAND runtime-ld bc/${lib}.a ${BC_${lib}} COMMAND runtime-ld bc/${lib}.a ${BC_${lib}}
) )
stringify( "runtime" "${CMAKE_CURRENT_BINARY_DIR}/bc" "${lib}.a" ) stringify( "dios" "${CMAKE_CURRENT_BINARY_DIR}/bc" "${lib}.a" )
endmacro() endmacro()
foreach( hdr divm.h lart.h vmutil.h ) foreach( hdr divm.h lart.h vmutil.h )
...@@ -78,11 +77,10 @@ add_custom_command( ...@@ -78,11 +77,10 @@ add_custom_command(
COMMAND perl ${CMAKE_CURRENT_SOURCE_DIR}/hostabi.pl ${CMAKE_C_COMPILER} > ${HOSTABI} COMMAND perl ${CMAKE_CURRENT_SOURCE_DIR}/hostabi.pl ${CMAKE_C_COMPILER} > ${HOSTABI}
) )
include( compile-rt.flags ) include( compile-flags.cmake )
include_directories( ${divine_SOURCE_DIR} ) include_directories( ${divine_SOURCE_DIR} )
add_definitions( -Wno-overlength-strings ${DIVINE_DEFINES} ) add_definitions( -Wno-overlength-strings ${DIVINE_DEFINES} )
add_library( divine-rt ${divine_SOURCE_DIR}/divine/rt/runtime.cpp add_library( divine-rt ${divine_SOURCE_DIR}/divine/rt/runtime.cpp ${dios_FILES} dios_list.cpp )
${runtime_FILES} runtime_list.cpp )
set_target_properties( divine-rt PROPERTIES POSITION_INDEPENDENT_CODE ON ) set_target_properties( divine-rt PROPERTIES POSITION_INDEPENDENT_CODE ON )
install( TARGETS divine-rt DESTINATION lib ) install( TARGETS divine-rt DESTINATION lib )
...@@ -29,9 +29,9 @@ list( APPEND flags -std=c++1z ) ...@@ -29,9 +29,9 @@ list( APPEND flags -std=c++1z )
mkobjs( libcxxabi "${flags};-DLIBCXXABI_USE_LLVM_UNWINDER" ) mkobjs( libcxxabi "${flags};-DLIBCXXABI_USE_LLVM_UNWINDER" )
mkobjs( libcxx "${flags};-D_LIBCPP_BUILDING_LIBRARY;-DLIBCXX_BUILDING_LIBCXXABI" ) mkobjs( libcxx "${flags};-D_LIBCPP_BUILDING_LIBRARY;-DLIBCXX_BUILDING_LIBCXXABI" )
list( APPEND flags -I${CMAKE_CURRENT_SOURCE_DIR}/filesystem -I${CMAKE_CURRENT_BINARY_DIR} list( APPEND flags -I${CMAKE_CURRENT_SOURCE_DIR}/fs -I${CMAKE_CURRENT_BINARY_DIR}
-Wall -Wextra -Wold-style-cast -Werror) -Wall -Wextra -Wold-style-cast -Werror)
mkobjs( libdios "${flags};-D__dios_kernel__" ) mkobjs( dios "${flags};-D__dios_kernel__" )
mkobjs( libabstract "${flags}" ) mkobjs( libabstract "${flags}" )
mklib( libc libc_cpp ) mklib( libc libc_cpp )
...@@ -42,16 +42,16 @@ mklib( libdios ) ...@@ -42,16 +42,16 @@ mklib( libdios )
mklib( libabstract ) mklib( libabstract )
foreach( f ${H_RUNTIME} ) foreach( f ${H_RUNTIME} )
stringify( "runtime" "." ${f} ) stringify( "dios" "." ${f} )
endforeach() endforeach()
set( OPS_src "${CMAKE_SOURCE_DIR}/llvm/include/llvm/IR/Instruction.def" ) set( OPS_src "${CMAKE_SOURCE_DIR}/llvm/include/llvm/IR/Instruction.def" )
set( OPS_dest "divine/Instruction.def" ) set( OPS_dest "divine/Instruction.def" )
file( COPY ${OPS_src} DESTINATION "divine" ) file( COPY ${OPS_src} DESTINATION "divine" )
stringify( "runtime" ${CMAKE_CURRENT_BINARY_DIR} ${OPS_dest} ) stringify( "dios" ${CMAKE_CURRENT_BINARY_DIR} ${OPS_dest} )
foreach( hdr divm.h lart.h vmutil.h hostabi.h ) foreach( hdr divm.h lart.h vmutil.h hostabi.h )
stringify( "runtime" ${CMAKE_CURRENT_BINARY_DIR} libc/include/sys/${hdr} ) stringify( "dios" ${CMAKE_CURRENT_BINARY_DIR} libc/include/sys/${hdr} )
endforeach() endforeach()
stringlist( "runtime" runtime ) stringlist( "dios" dios )
# vim: ft=cmake # vim: ft=cmake
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment