Skip to content

Commit

Permalink
v0.3.5 Huge optimization update
Browse files Browse the repository at this point in the history
Rewrote the macroexpander in c++ inside the compiler

Signed-off-by: Nick Wanninger <[email protected]>
  • Loading branch information
nickwanninger committed Feb 6, 2019
1 parent 0e25098 commit 86fa72c
Show file tree
Hide file tree
Showing 32 changed files with 954 additions and 508 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,20 @@ set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -DBUILD_MODE=Debug")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -g -DBUILD_MODE=Release")


add_definitions(-DCORE_DIR="${CORE_DIR}")


include_directories(${CMAKE_SOURCE_DIR}/include)

include(${CMAKE_SOURCE_DIR}/src/cedar/CMakeLists.txt)
target_compile_options(cedar-lib PRIVATE -g -Wall -Wextra -Wno-unused-parameter -Wno-strict-aliasing -flto)
target_compile_options(cedar-lib PRIVATE -g -Wall -Wextra -Wno-unused-parameter -Wno-strict-aliasing)

add_executable(cedar-bin src/main.cpp)

target_link_libraries(cedar-bin cedar-lib ${CMAKE_DL_LIBS} -luv -pthread)
set_target_properties(cedar-bin PROPERTIES OUTPUT_NAME cedar)

target_compile_options(cedar-bin PRIVATE -Wall -Wextra -Wno-unused-parameter -Wno-strict-aliasing -flto)
target_compile_options(cedar-bin PRIVATE -Wall -Wextra -Wno-unused-parameter -Wno-strict-aliasing)


install(TARGETS cedar-bin DESTINATION bin)
Expand Down
21 changes: 13 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,30 @@ BUILDMODE=Release

BINDIR = bin

default: src/lib/std.inc.h
@mkdir -p $(BINDIR)
@cd $(BINDIR); cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ../; ninja


release: src/lib/std.inc.h
debug:
@mkdir -p $(BINDIR)
@cd $(BINDIR); cmake -G "Ninja" -DCORE_DIR=$(shell pwd)/core -DCMAKE_BUILD_TYPE=Debug ../; ninja

release:
@mkdir -p $(BINDIR)
@cd $(BINDIR); cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release ../; ninja
@cd $(BINDIR); cmake -G "Ninja" -DCORE_DIR=$(shell pwd)/core -DCMAKE_BUILD_TYPE=Release ../; ninja

src/lib/std.inc.h: ./src/lib/std.inc.cdr
xxd -i src/lib/std.inc.cdr > src/lib/std.inc.h
default:
@mkdir -p $(BINDIR)
@cd $(BINDIR); cmake -G "Ninja" -DCORE_DIR=/usr/local/lib/cedar/core -DCMAKE_BUILD_TYPE=Debug ../; ninja

gen:
@python3 tools/scripts/generate_cedar_h.py
@python3 tools/scripts/generate_src_cmakelists.py
@python3 tools/scripts/generate_opcode_h.py

install:
@cd $(BINDIR); ninja install
cd $(BINDIR); ninja install
mkdir -p /usr/local/lib/cedar
@rm -rf /usr/local/lib/cedar/core
cp -r core /usr/local/lib/cedar/

clean:
rm -rf $(BINDIR)
Expand Down
Loading

0 comments on commit 86fa72c

Please sign in to comment.