Skip to content

Commit

Permalink
fix: use cmake to compile libuv && add jit load libuv logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Chronostasys committed Aug 29, 2024
1 parent f1e97be commit 05a0fa6
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 298 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion immix
Submodule immix updated 1 files
+46 −24 llvm/pljit.cpp
9 changes: 4 additions & 5 deletions pl_linker/src/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ fn get_linux_lib_paths() -> Vec<String> {
// fn get_libgcc_path() -> Result<String, String> {
// let base_path = "/usr/lib/gcc/x86_64-linux-gnu";
// let entries = std::fs::read_dir(base_path).map_err(|e| format!("Failed to read directory {}: {}", base_path, e))?;

// for entry in entries {
// let entry = entry.map_err(|e| format!("Failed to read directory entry: {}", e))?;
// if entry.path().is_dir() {
Expand All @@ -115,7 +115,6 @@ fn get_linux_lib_paths() -> Vec<String> {
// Err("No valid gcc version directory found".to_string())
// }


impl Linker for LdLinker {
fn add_object(&mut self, path: &Path) -> Result<(), LinkerError> {
let path_str = path
Expand Down Expand Up @@ -347,11 +346,11 @@ impl Linker for MsvcLinker {
self.push_args("ntdll.lib");
self.push_args("psapi.lib");
self.push_args("PowrProf.lib");
self.push_args("user32.lib"); // Add user32.lib
self.push_args("user32.lib"); // Add user32.lib
self.push_args("dbghelp.lib"); // Add dbghelp.lib
self.push_args("ole32.lib"); // Add ole32.lib
self.push_args("ole32.lib"); // Add ole32.lib
self.push_args("shell32.lib"); // Add shell32.lib
self.push_args("iphlpapi.lib");// Add iphlpapi.lib
self.push_args("iphlpapi.lib"); // Add iphlpapi.lib

self.args.insert(0, "lld-link".to_owned());
lld_rs::link(lld_rs::LldFlavor::Coff, &self.args)
Expand Down
1 change: 1 addition & 0 deletions vm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ rand = "0.8"

[build-dependencies]
cc = "1.0"
cmake = "0.1"

[lib]
name = "vm"
Expand Down
Loading

0 comments on commit 05a0fa6

Please sign in to comment.