Update build system.

This commit is contained in:
2026-07-29 13:49:21 +01:00
parent b90c8a7fef
commit b10f1291a0
4 changed files with 20 additions and 7 deletions
+4 -3
View File
@@ -25,13 +25,13 @@ MRUBY_CFLAGS ?= -I./libs/mruby/build/host/include
MRUBY_LIBS ?= -L./libs/mruby/build/host/lib -lmruby
CFLAGS_DEBUG :=\
-std=c++26 -Wall -Wextra \
-O0 -fno-inline -gsplit-dwarf \
-std=c++20 -Wall -Wextra -fno-rtti \
-Og -fno-inline -gsplit-dwarf \
-g -fno-omit-frame-pointer -ffast-math \
-I./include -I./libs/unicode_width
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 \
-fomit-frame-pointer -DNDEBUG -s \
-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)
@mkdir -p $(BIN_DIR)
@$(CXX) $(CFLAGS_RELEASE) -o $@ $(OBJ_RELEASE) $(UNICODE_OBJ) $(LIBS)
@strip $@
@echo "Release build complete: $@"
$(OBJ_DIR)/debug/%.o: $(SRC_DIR)/%.cc $(PCH_DEBUG) $(GENERATED_HEADER)
+1
View File
@@ -59,6 +59,7 @@
xxd
bash
findutils
binutils
];
buildInputs = with pkgs; [
+1 -1
View File
@@ -29,7 +29,6 @@ extern "C" {
#include <filesystem>
#include <fstream>
#include <functional>
#include <immintrin.h>
#include <iostream>
#include <limits.h>
#include <map>
@@ -51,4 +50,5 @@ extern "C" {
#include <unistd.h>
#include <unordered_map>
#include <unordered_set>
#include <variant>
#include <vector>
+14 -3
View File
@@ -3,15 +3,26 @@
#include "vase/shard.h"
#include "vase/vase.h"
int main() {
const char *text_o =
int main(int argc, char *argv[]) {
/*const char *text_o =
"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\n"
"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\n"
"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\n"
"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
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);