// Make sure the path contains a / or the linker will search for it.
let path = env::current_dir().unwrap().join(path);
- let lib = match DynamicLibrary::open(Some(&path)) {
+ let lib = match DynamicLibrary::open(&path) {
Ok(lib) => lib,
Err(err) => self.sess.span_fatal(span, &err),
};
}
fn inject_profiler_runtime(&mut self) {
- if self.sess.opts.debugging_opts.profile || self.sess.opts.cg.profile_generate.enabled() {
+ if (self.sess.opts.debugging_opts.profile || self.sess.opts.cg.profile_generate.enabled())
+ && !self.sess.opts.debugging_opts.no_profiler_runtime
+ {
info!("loading profiler");
let name = Symbol::intern("profiler_builtins");