Skip to content

Commit

Permalink
Remove runtime linking in AOT executor
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianGCalderon committed Jan 15, 2025
1 parent 9c16cd3 commit f62b6d7
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,22 +243,6 @@ pub fn object_to_shared_lib(object: &[u8], output_filename: &Path) -> Result<()>
}
}

let runtime_library_path = if let Ok(extra_dir) = std::env::var("CAIRO_NATIVE_RUNTIME_LIBRARY")
{
let path = Path::new(&extra_dir);
if path.is_absolute() {
extra_dir
} else {
let absolute_path = env::current_dir()?.join(path).canonicalize()?;
absolute_path
.to_str()
.to_native_assert_error("absolute path should not contain non-utf8 characters")?
.to_string()
}
} else {
String::from("libcairo_native_runtime.a")
};

let args: Vec<Cow<'static, str>> = {
#[cfg(target_os = "macos")]
{
Expand All @@ -276,8 +260,6 @@ pub fn object_to_shared_lib(object: &[u8], output_filename: &Path) -> Result<()>
"-o".into(),
Cow::from(output_path),
"-lSystem".into(),
"-force_load".into(), // needed so `cairo_native__set_costs_builtin` is always available
Cow::from(runtime_library_path),
]);

args
Expand All @@ -296,8 +278,6 @@ pub fn object_to_shared_lib(object: &[u8], output_filename: &Path) -> Result<()>
Cow::from(output_path),
"-lc".into(),
Cow::from(file_path),
"--whole-archive".into(), // needed so `cairo_native__set_costs_builtin` is always available
Cow::from(runtime_library_path),
]);

args
Expand Down

0 comments on commit f62b6d7

Please sign in to comment.