diff --git a/Makefile b/Makefile index 24f488f76c..5b19e244d3 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ VIEW_TARGETS := $(patsubst views/%.ecr,static/views/%.html,$(VIEW_SOURCES)) VIEW_PARTIALS := $(wildcard views/partials/*.ecr) JS := static/js/lib/chunks/helpers.segment.js static/js/lib/chart.js static/js/lib/amqp-websocket-client.mjs static/js/lib/amqp-websocket-client.mjs.map static/js/lib/luxon.js static/js/lib/chartjs-adapter-luxon.esm.js static/js/lib/elements-8.2.0.js static/js/lib/elements-8.2.0.css CRYSTAL_FLAGS := --release --stats -override CRYSTAL_FLAGS += --error-on-warnings --link-flags=-pie +override CRYSTAL_FLAGS += --error-on-warnings --link-flags=-pie -Dgc_none .DEFAULT_GOAL := all @@ -46,7 +46,7 @@ bin/%-debug: src/%.cr $(SOURCES) lib $(JS) $(DOCS) | bin crystal build $< -o $@ --debug $(CRYSTAL_FLAGS) bin/lavinmqperf: src/lavinmqperf.cr lib | bin - crystal build $< -o $@ -Dpreview_mt $(CRYSTAL_FLAGS) + crystal build $< -o $@ $(CRYSTAL_FLAGS) bin/lavinmqctl: src/lavinmqctl.cr lib | bin crystal build $< -o $@ -Dgc_none $(CRYSTAL_FLAGS) diff --git a/shard.lock b/shard.lock index 8f2559ea84..be89d2fb26 100644 --- a/shard.lock +++ b/shard.lock @@ -12,6 +12,10 @@ shards: git: https://github.com/cloudamqp/amqp-client.cr.git version: 1.2.8 + immix: + git: https://github.com/ysbaddaden/gc.git + version: 0.1.0+git.commit.47ae36012cdf436a2c18895c5bc00a91cee12149 + lz4: git: https://github.com/84codes/lz4.cr.git version: 1.0.0+git.commit.96d714f7593c66ca7425872fd26c7b1286806d3d diff --git a/shard.yml b/shard.yml index 1798aacc3d..fcf59cca80 100644 --- a/shard.yml +++ b/shard.yml @@ -32,6 +32,9 @@ dependencies: github: 84codes/systemd.cr lz4: github: 84codes/lz4.cr + immix: + github: ysbaddaden/gc + branch: master development_dependencies: ameba: diff --git a/src/lavinmq.cr b/src/lavinmq.cr index 91484cc5fb..5f041ee432 100644 --- a/src/lavinmq.cr +++ b/src/lavinmq.cr @@ -1,3 +1,6 @@ +{% if flag?(:gc_none) %} + require "immix" +{% end %} require "./lavinmq/version" require "./stdlib/*" require "./lavinmq/config" diff --git a/src/lavinmqctl.cr b/src/lavinmqctl.cr index 4345b08d62..ff4fec06ed 100644 --- a/src/lavinmqctl.cr +++ b/src/lavinmqctl.cr @@ -1,3 +1,6 @@ +{% if flag?(:gc_none) %} + require "immix" +{% end %} require "./lavinmq/version" require "./lavinmq/http/constants" require "./lavinmq/definitions_generator" diff --git a/src/lavinmqperf.cr b/src/lavinmqperf.cr index 0200417d99..864a40b478 100644 --- a/src/lavinmqperf.cr +++ b/src/lavinmqperf.cr @@ -1,3 +1,6 @@ +{% if flag?(:gc_none) %} + require "immix" +{% end %} require "./lavinmq/version" require "./stdlib/resource" require "option_parser"