Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/Makevars.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ $(STATLIB):
cp ./cargo_vendor_config.toml ./rust/.cargo/config.toml; \
fi

# Note: -fno-lto is appended to CFLAGS to override any -flto* injected by R
# (e.g. the gcc-SAN builder uses -flto=10). The cc crate compiles savvy's
# unwind_protect_wrapper.c with these CFLAGS and archives the result with
# plain `ar`, which doesn't record GCC LTO symbols, leaving
# unwind_protect_impl undefined at dyn.load time.
export CC="$(CC)" && \
export CFLAGS="$(CFLAGS)" && \
export CFLAGS="$(CFLAGS) -fno-lto" && \
if [ "$(TARGET)" != "wasm32-unknown-emscripten" ]; then \
@BEFORE_CARGO_BUILD@ cd ./rust && cargo build --jobs 1 --lib --release $(OFFLINE_OPTION); \
else \
Expand Down
Loading