From 19a911bb41ad158576c9b39b83b0e487da8d7caf Mon Sep 17 00:00:00 2001 From: peefy Date: Tue, 30 Jan 2024 21:46:49 +0800 Subject: [PATCH] refactor: simplify the linker code Signed-off-by: peefy --- kclvm/runner/src/linker.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kclvm/runner/src/linker.rs b/kclvm/runner/src/linker.rs index 7048dca43..2e2707b31 100644 --- a/kclvm/runner/src/linker.rs +++ b/kclvm/runner/src/linker.rs @@ -107,7 +107,7 @@ impl Command { .arg(&format!("-Wl,-rpath,{}", &path)) .arg(&format!("-L{}", &path)) .arg(&format!("-I{}/include", self.executable_root)) - .arg("-lkclvm_cli_cdylib"); + .arg(&format!("-l{KCLVM_LIB_SHORT_NAME}")); Ok(()) } @@ -143,7 +143,7 @@ impl Command { cmd: &mut std::process::Command, ) -> Result<()> { cmd.args(libs) - .arg("kclvm_cli_cdylib.lib") + .arg(&format!("{KCLVM_LIB_SHORT_NAME}.lib")) .arg("/link") .arg("/NOENTRY") .arg("/NOLOGO")