From 2c1eee48ad0dbf53155dba6047e611ff2c7b5c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Mon, 2 Jan 2023 20:50:30 +0100 Subject: [PATCH] Add -lunwind on non-windows targets --- lib/cli/src/commands/create_exe.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/cli/src/commands/create_exe.rs b/lib/cli/src/commands/create_exe.rs index 1dc38a058..7cc25409d 100644 --- a/lib/cli/src/commands/create_exe.rs +++ b/lib/cli/src/commands/create_exe.rs @@ -1156,6 +1156,10 @@ fn link_exe_from_dir( cmd.arg("-I"); cmd.arg(normalize_path(&format!("{}", include_path.display()))); + if !zig_triple.contains("windows") { + cmd.arg("-lunwind"); + } + cmd.arg("-OReleaseFast"); cmd.arg("-fno-compiler-rt"); cmd.arg("-fno-lto");