]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_metadata/creader.rs
Remove support for self-opening
[rust.git] / src / librustc_metadata / creader.rs
index 3e5d7b8efd530a5d31341446639ca9a62f3af454..f3c4eca5fde2c928330d281ab8703b08a5482a21 100644 (file)
@@ -585,7 +585,7 @@ fn dlsym_proc_macros(
 
         // 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),
         };
@@ -686,7 +686,9 @@ fn inject_panic_runtime(&mut self, krate: &ast::Crate) {
     }
 
     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");