aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred SUmner <jarred@jarredsumner.com> 2021-10-04 20:41:27 -0700
committerGravatar Jarred SUmner <jarred@jarredsumner.com> 2021-10-04 20:41:27 -0700
commitf0f3d6d4eb7f7de92fe56aae235b62864c6e8a42 (patch)
tree60189a07b331760a67b439e4d315f044e052ec09
parentdc3eee44a928239524133177740addcb14b1b0a4 (diff)
downloadbun-f0f3d6d4eb7f7de92fe56aae235b62864c6e8a42.tar.gz
bun-f0f3d6d4eb7f7de92fe56aae235b62864c6e8a42.tar.zst
bun-f0f3d6d4eb7f7de92fe56aae235b62864c6e8a42.zip
Statically link libicu on Linux so it doesn't require installing icu separately.
this doubles the binary size :(
-rw-r--r--Makefile7
-rw-r--r--build-id2
2 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index aa33f1978..ad36a7417 100644
--- a/Makefile
+++ b/Makefile
@@ -298,9 +298,14 @@ MACOS_ICU_INCLUDE := $(HOMEBREW_PREFIX)opt/icu4c/include
ICU_FLAGS :=
+# TODO: find a way to make this more resilient
+# Ideally, we could just look up the linker search paths
+LIB_ICU_PATH ?= /usr/lib/x86_64-linux-gnu
+
ifeq ($(OS_NAME),linux)
- ICU_FLAGS += -licuuc -licudata -licui18n
+ ICU_FLAGS += $(LIB_ICU_PATH)/libicuuc.a $(LIB_ICU_PATH)/libicudata.a $(LIB_ICU_PATH)/libicui18n.a
endif
+
ifeq ($(OS_NAME),darwin)
ICU_FLAGS += -l icucore \
$(MACOS_ICU_FILES) \
diff --git a/build-id b/build-id
index e85087aff..f5c89552b 100644
--- a/build-id
+++ b/build-id
@@ -1 +1 @@
-31
+32