about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2018-12-14 13:42:26 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2018-12-14 13:42:26 +0100
commit2d14dc9f1e02131d01906e8dcfa87861da8fe5f2 (patch)
tree7d866c2862e57116dde3926657ccb10e887cf0cd
parentc8d435aade4db3e51eb2414293a8e0d7934bd17a (diff)
downloadrust-2d14dc9f1e02131d01906e8dcfa87861da8fe5f2.tar.gz
rust-2d14dc9f1e02131d01906e8dcfa87861da8fe5f2.zip
Rustup cg_ssa to rustc 1.32.0-nightly (f4a421ee3 2018-12-13)
-rw-r--r--src/constant.rs8
-rw-r--r--src/link_copied.rs17
2 files changed, 11 insertions, 14 deletions
diff --git a/src/constant.rs b/src/constant.rs
index add22389bfe..366b06a1276 100644
--- a/src/constant.rs
+++ b/src/constant.rs
@@ -1,7 +1,7 @@
 use std::borrow::Cow;
 
 use rustc::mir::interpret::{
-    read_target_uint, AllocId, AllocType, Allocation, ConstValue, EvalResult, GlobalId, Scalar,
+    read_target_uint, AllocId, AllocKind, Allocation, ConstValue, EvalResult, GlobalId, Scalar,
 };
 use rustc::ty::Const;
 use rustc_mir::interpret::{
@@ -253,7 +253,7 @@ fn define_all_allocs<'a, 'tcx: 'a, B: Backend + 'a>(
             };
 
             let data_id = match tcx.alloc_map.lock().get(reloc).unwrap() {
-                AllocType::Function(instance) => {
+                AllocKind::Function(instance) => {
                     let (func_name, sig) = crate::abi::get_function_name_and_sig(tcx, instance);
                     let func_id = module
                         .declare_function(&func_name, Linkage::Import, &sig)
@@ -262,11 +262,11 @@ fn define_all_allocs<'a, 'tcx: 'a, B: Backend + 'a>(
                     data_ctx.write_function_addr(reloc_offset as u32, local_func_id);
                     continue;
                 }
-                AllocType::Memory(_) => {
+                AllocKind::Memory(_) => {
                     cx.todo.insert(TodoItem::Alloc(reloc));
                     data_id_for_alloc_id(module, reloc)
                 }
-                AllocType::Static(def_id) => {
+                AllocKind::Static(def_id) => {
                     cx.todo.insert(TodoItem::Static(def_id));
                     data_id_for_static(tcx, module, def_id, Linkage::Import)
                 }
diff --git a/src/link_copied.rs b/src/link_copied.rs
index bf5be809a0e..c19a6eec739 100644
--- a/src/link_copied.rs
+++ b/src/link_copied.rs
@@ -32,11 +32,7 @@ use crate::metadata::METADATA_FILENAME;
 const RLIB_BYTECODE_EXTENSION: &str = ".cg_clif_bytecode_dummy";
 
 fn archive_search_paths(sess: &Session) -> Vec<PathBuf> {
-    let mut search = Vec::new();
-    sess.target_filesearch(PathKind::Native).for_each_lib_search_path(|path, _| {
-        search.push(path.to_path_buf());
-    });
-    return search;
+    sess.target_filesearch(PathKind::Native).search_path_dirs()
 }
 
 fn archive_config<'a>(sess: &'a Session,
@@ -526,12 +522,13 @@ pub fn add_upstream_rust_crates(cmd: &mut dyn Linker,
 pub fn add_local_native_libraries(cmd: &mut dyn Linker,
                               sess: &Session,
                               codegen_results: &CodegenResults) {
-    sess.target_filesearch(PathKind::All).for_each_lib_search_path(|path, k| {
-        match k {
-            PathKind::Framework => { cmd.framework_path(path); }
-            _ => { cmd.include_path(&fix_windows_verbatim_for_gcc(path)); }
+    let filesearch = sess.target_filesearch(PathKind::All);
+    for search_path in filesearch.search_paths() {
+        match search_path.kind {
+            PathKind::Framework => { cmd.framework_path(&search_path.dir); }
+            _ => { cmd.include_path(&fix_windows_verbatim_for_gcc(&search_path.dir)); }
         }
-    });
+    }
 
     let relevant_libs = codegen_results.crate_info.used_libraries.iter().filter(|l| {
         relevant_lib(sess, l)