diff --git a/.cargo/config.toml b/.cargo/config.toml deleted file mode 100644 index e44bca7..0000000 --- a/.cargo/config.toml +++ /dev/null @@ -1,7 +0,0 @@ -[build] -# Without this flag, when linking static libruby, the linker removes symbols -# (such as `_rb_ext_ractor_safe`) which it thinks are dead code... but they are -# not, and they need to be included for the `embed` feature to work with static -# Ruby. -# rustflags = ["-C", "link-args=-lz", "-C", "link-dead-code=on"] -rustflags = ["-C", "link-args=-lz"] diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..62f4b71 --- /dev/null +++ b/build.rs @@ -0,0 +1,3 @@ +fn main() { + println!("cargo:rustc-link-lib=z"); // TODO: if features Ruby +} diff --git a/src/runtimes/ruby.rs b/src/runtimes/ruby.rs index 609c68b..8a74fc1 100644 --- a/src/runtimes/ruby.rs +++ b/src/runtimes/ruby.rs @@ -76,14 +76,6 @@ impl RubyThread { let mut variable_in_this_stack_frame: VALUE = 0; ruby_init_stack(&mut variable_in_this_stack_frame as *mut VALUE as *mut _); rb_sys::ruby_init(); - let opts = ["-e", ""]; - let mut argv = vec![]; - argv.extend(opts.iter().map(|s| CString::new(*s).unwrap())); - let mut argv = argv - .iter() - .map(|cs| cs.as_ptr() as *mut _) - .collect::>(); - ruby_options(argv.len() as i32, argv.as_mut_ptr()); }; while let Ok(f) = receiver.recv() { let ruby = Ruby::get().expect("Failed to get a handle to Ruby API");