From 42eec8a363424d5761581870e73ff04fcd29b3d6 Mon Sep 17 00:00:00 2001 From: etienne-k <2804556+etienne-k@users.noreply.github.com> Date: Sat, 19 Nov 2022 15:07:55 +0100 Subject: [PATCH] fix(build): never statically link against the C standard library --- .cargo/config.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.cargo/config.toml b/.cargo/config.toml index 5d6155669a3ad..35eae2620d007 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,3 +1,9 @@ [alias] xtask = "run --package xtask --" integration-test = "test --features integration --workspace --test integration" + +[build] +# By default, on musl linux, statically linked binaries are produced. +# But such binaries do not support loading libraries using `dlopen()` ("libloading" crate), +# which is required for loading treesitter grammars. +rustflags = ["-C", "target-feature=-crt-static"]