From 05925f25f15d3da0e7ccb9077bce15a68bdb0ea9 Mon Sep 17 00:00:00 2001 From: Sebastian Miasojed Date: Thu, 21 Nov 2024 13:57:00 +0100 Subject: [PATCH] Update comment --- crates/lld-sys/build.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/lld-sys/build.rs b/crates/lld-sys/build.rs index 28e7f87..27a1a98 100644 --- a/crates/lld-sys/build.rs +++ b/crates/lld-sys/build.rs @@ -39,7 +39,11 @@ fn set_rustc_link_flags(llvm_config_path: &Path) { "LLVMTargetParser", "LLVMBinaryFormat", "LLVMDemangle", - // Required by `llvm-sys` + // The `llvm-sys` crate relies on `llvm-config` to obtain a list of required LLVM libraries + // during the build process. This works well in typical native environments, where `llvm-config` + // can accurately list the necessary libraries. + // However, when cross-compiling to WebAssembly using Emscripten, `llvm-config` fails to recognize + // JavaScript-based libraries, making it necessary to manually inject the required dependencies. "LLVMRISCVDisassembler", "LLVMRISCVAsmParser", "LLVMRISCVCodeGen",