aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile4
-rw-r--r--integration/bunjs-only-snippets/response.file.test.js2
2 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d36223e79..4fefe232a 100644
--- a/Makefile
+++ b/Makefile
@@ -89,10 +89,12 @@ CMAKE_FLAGS_WITHOUT_RELEASE = -DCMAKE_C_COMPILER=$(CC) -DCMAKE_CXX_COMPILER=$(CX
CMAKE_FLAGS = $(CMAKE_FLAGS_WITHOUT_RELEASE) -DCMAKE_BUILD_TYPE=Release
+BITCODE_OR_SECTIONS=-fdata-sections -ffunction-sections
LIBTOOL=libtoolize
ifeq ($(OS_NAME),darwin)
LIBTOOL=glibtoolize
AR=llvm-ar
+BITCODE_OR_SECTIONS=-fembed-bitcode=all
endif
ifeq ($(OS_NAME),linux)
@@ -101,7 +103,7 @@ AR=llvm-ar-13
endif
OPTIMIZATION_LEVEL=-O3
-CFLAGS = $(MACOS_MIN_FLAG) $(MARCH_NATIVE) -fembed-bitcode=all -g $(OPTIMIZATION_LEVEL)
+CFLAGS = $(MACOS_MIN_FLAG) $(MARCH_NATIVE) $(BITCODE_OR_SECTIONS) -g $(OPTIMIZATION_LEVEL)
BUN_TMP_DIR := /tmp/make-bun
BUN_DEPLOY_DIR = /tmp/bun-v$(PACKAGE_JSON_VERSION)/$(PACKAGE_NAME)
diff --git a/integration/bunjs-only-snippets/response.file.test.js b/integration/bunjs-only-snippets/response.file.test.js
index a7c829d57..f05c875f0 100644
--- a/integration/bunjs-only-snippets/response.file.test.js
+++ b/integration/bunjs-only-snippets/response.file.test.js
@@ -69,7 +69,7 @@ it("Bun.file -> Bun.file", async () => {
const file = path.join(import.meta.dir, "fetch.js.txt");
await gcTick();
const text = fs.readFileSync(file, "utf8");
- fs.writeFileSync("/tmp/fetch.js.in", text, { mode: 0644 });
+ fs.writeFileSync("/tmp/fetch.js.in", text);
await gcTick();
{
const result = await Bun.write(