From 509a45dfb4e09a99a8d571e126eaaa6eea1b628c Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 1 Jun 2022 16:24:03 +0200 Subject: [PATCH] Prospective fix for windows build On Windows, `cargo build -p slint-lsp` creates slint-lsp.exe and slint-lsp.dll. Both claim slint-lsp.pdb for their debug info, which causes a race condition where two link.exe processes will try to create it. Cargo, upon invocation, even warns about this clash. Therefore let's rename the cdylib to disambiguate. --- tools/lsp/Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/lsp/Cargo.toml b/tools/lsp/Cargo.toml index f9eefd094..23102e882 100644 --- a/tools/lsp/Cargo.toml +++ b/tools/lsp/Cargo.toml @@ -26,6 +26,10 @@ path = "main.rs" # lib is there only for the web crate-type = ["cdylib"] path = "wasm_main.rs" +# On windows building this package creates slint-lsp.exe and slint-lsp.dll. +# To avoid that both end up trying to create slint-lsp.pdb for their debug +# symbols, rename the lib. +name = "slint_lsp_wasm" [features] backend-qt = ["slint-interpreter/backend-qt"]