aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Jarred SUmner <jarred@jarredsumner.com> 2021-10-03 18:49:31 -0700
committerGravatar Jarred SUmner <jarred@jarredsumner.com> 2021-10-03 18:49:31 -0700
commit82bf89a946690c0297cba84bf50214eba705a863 (patch)
tree22215f2c7651fa07606221a57c35fbfe7b292d85 /Makefile
parentf4a4e793aa964ba2d0883a19205c32ec01eaf8f0 (diff)
downloadbun-82bf89a946690c0297cba84bf50214eba705a863.tar.gz
bun-82bf89a946690c0297cba84bf50214eba705a863.tar.zst
bun-82bf89a946690c0297cba84bf50214eba705a863.zip
1% perf improvements on Linuxjarred/linux
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 13 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index bd3ebe0c7..71fbe1394 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,7 @@ BUN_BUILD_TAG := bun-v$(PACKAGE_JSON_VERSION)
CC := clang
CXX := clang++
+
bun: vendor build-obj bun-link-lld-release
@@ -48,7 +49,11 @@ sign-macos-x64:
sign-macos-aarch64:
gon sign.macos-aarch64.json
-release-macos: all-js build-obj jsc-bindings-mac bun-link-lld-release
+release: all-js build-obj jsc-bindings-mac bun-link-lld-release
+
+release-linux: release strip-debug
+
+
all-js: runtime_js fallback_decoder bun_error node-fallbacks
@@ -299,11 +304,14 @@ BUN_LLD_FLAGS += -lstdc++fs \
-pthread \
-ldl \
-lc \
- -fuse-ld=lld \
-Wl,-z,now \
-Wl,--as-needed \
-Wl,-z,stack-size=12800000 \
- -Wl,-z,notext
+ -Wl,-z,notext \
+ -ffunction-sections \
+ -fdata-sections \
+ -Wl,--gc-sections \
+ -fuse-ld=lld
endif
@@ -312,12 +320,10 @@ mimalloc:
bun-link-lld-debug:
$(CXX) $(BUN_LLD_FLAGS) \
+ -g \
$(DEBUG_BIN)/bun-debug.o \
-W \
-o $(DEBUG_BIN)/bun-debug \
- -march=native \
- -flto
-
bun-link-lld-release:
$(CXX) $(BUN_LLD_FLAGS) \
@@ -326,8 +332,7 @@ bun-link-lld-release:
-W \
-flto \
-ftls-model=initial-exec \
- -march=native \
- -O3
+ -O3 \
rm $(BIN_DIR)/bun.o
bun-link-lld-release-aarch64: