Update build system.
This commit is contained in:
@@ -25,13 +25,13 @@ MRUBY_CFLAGS ?= -I./libs/mruby/build/host/include
|
|||||||
MRUBY_LIBS ?= -L./libs/mruby/build/host/lib -lmruby
|
MRUBY_LIBS ?= -L./libs/mruby/build/host/lib -lmruby
|
||||||
|
|
||||||
CFLAGS_DEBUG :=\
|
CFLAGS_DEBUG :=\
|
||||||
-std=c++26 -Wall -Wextra \
|
-std=c++20 -Wall -Wextra -fno-rtti \
|
||||||
-O0 -fno-inline -gsplit-dwarf \
|
-Og -fno-inline -gsplit-dwarf \
|
||||||
-g -fno-omit-frame-pointer -ffast-math \
|
-g -fno-omit-frame-pointer -ffast-math \
|
||||||
-I./include -I./libs/unicode_width
|
-I./include -I./libs/unicode_width
|
||||||
|
|
||||||
CFLAGS_RELEASE :=\
|
CFLAGS_RELEASE :=\
|
||||||
-std=c++26 -O3 -march=x86-64 -mtune=generic -fno-rtti \
|
-std=c++20 -O3 -mtune=generic -fno-rtti \
|
||||||
-fvisibility=hidden -static -ffast-math \
|
-fvisibility=hidden -static -ffast-math \
|
||||||
-fomit-frame-pointer -DNDEBUG -s \
|
-fomit-frame-pointer -DNDEBUG -s \
|
||||||
-I./include -I./libs/unicode_width
|
-I./include -I./libs/unicode_width
|
||||||
@@ -77,6 +77,7 @@ $(TARGET_DEBUG): $(PCH_DEBUG) $(OBJ_DEBUG) $(UNICODE_OBJ)
|
|||||||
$(TARGET_RELEASE): $(PCH_RELEASE) $(OBJ_RELEASE) $(UNICODE_OBJ)
|
$(TARGET_RELEASE): $(PCH_RELEASE) $(OBJ_RELEASE) $(UNICODE_OBJ)
|
||||||
@mkdir -p $(BIN_DIR)
|
@mkdir -p $(BIN_DIR)
|
||||||
@$(CXX) $(CFLAGS_RELEASE) -o $@ $(OBJ_RELEASE) $(UNICODE_OBJ) $(LIBS)
|
@$(CXX) $(CFLAGS_RELEASE) -o $@ $(OBJ_RELEASE) $(UNICODE_OBJ) $(LIBS)
|
||||||
|
@strip $@
|
||||||
@echo "Release build complete: $@"
|
@echo "Release build complete: $@"
|
||||||
|
|
||||||
$(OBJ_DIR)/debug/%.o: $(SRC_DIR)/%.cc $(PCH_DEBUG) $(GENERATED_HEADER)
|
$(OBJ_DIR)/debug/%.o: $(SRC_DIR)/%.cc $(PCH_DEBUG) $(GENERATED_HEADER)
|
||||||
|
|||||||
@@ -59,6 +59,7 @@
|
|||||||
xxd
|
xxd
|
||||||
bash
|
bash
|
||||||
findutils
|
findutils
|
||||||
|
binutils
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,6 @@ extern "C" {
|
|||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <immintrin.h>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <map>
|
#include <map>
|
||||||
@@ -51,4 +50,5 @@ extern "C" {
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
#include <variant>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|||||||
+14
-3
@@ -3,15 +3,26 @@
|
|||||||
#include "vase/shard.h"
|
#include "vase/shard.h"
|
||||||
#include "vase/vase.h"
|
#include "vase/vase.h"
|
||||||
|
|
||||||
int main() {
|
int main(int argc, char *argv[]) {
|
||||||
const char *text_o =
|
/*const char *text_o =
|
||||||
"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\n"
|
"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\n"
|
||||||
"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\n"
|
"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\n"
|
||||||
"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\n"
|
"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\n"
|
||||||
"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
|
"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
|
||||||
|
|
||||||
uint32_t len = strlen(text_o);
|
uint32_t len = strlen(text_o);
|
||||||
char *text = strdup(text_o);
|
char *text = strdup(text_o);*/
|
||||||
|
|
||||||
|
const char *path;
|
||||||
|
|
||||||
|
if (argc >= 2)
|
||||||
|
path = argv[1];
|
||||||
|
else
|
||||||
|
throw "Please give filename.";
|
||||||
|
|
||||||
|
uint32_t len;
|
||||||
|
char *text;
|
||||||
|
read_file(path, &text, &len);
|
||||||
|
|
||||||
Vase vase = Vase(text, len);
|
Vase vase = Vase(text, len);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user