about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-07-11 06:28:04 +0000
committerbors <bors@rust-lang.org>2020-07-11 06:28:04 +0000
commit346aec9b02f3c74f3fce97fd6bda24709d220e49 (patch)
tree8ddad2b3c566486f44ea01f6305e1beeb11140f7 /src/librustc_codegen_ssa
parentdaecab3a784f28082df90cebb204998051f3557d (diff)
parent79fc3861dfd1190b257ef7f4208533c3945254b7 (diff)
Auto merge of #74235 - Manishearth:rollup-bgs3q14, r=Manishearth
Rollup of 19 pull requests

Successful merges:

 - #71322 (Accept tuple.0.0 as tuple indexing (take 2))
 - #72303 (Add core::future::{poll_fn, PollFn})
 - #73862 (Stabilize casts and coercions to `&[T]` in const fn)
 - #73887 (stabilize const mem::forget)
 - #73989 (adjust ub-enum test to be endianess-independent)
 - #74045 (Explain effects of debugging options from config.toml)
 - #74076 (Add `read_exact_at` and `write_all_at` to WASI's `FileExt`)
 - #74099 (Add VecDeque::range* methods)
 - #74100 (Use str::strip* in bootstrap)
 - #74103 (Only add CFGuard on `windows-msvc` targets)
 - #74109 (Only allow `repr(i128/u128)` on enum)
 - #74122 (Start-up clean-up)
 - #74125 (Correctly mark the ending span of a match arm)
 - #74127 (Avoid "whitelist")
 - #74129 (:arrow_up: rust-analyzer)
 - #74135 (Update books)
 - #74145 (Update rust-installer to latest version)
 - #74161 (Fix  disabled dockerfiles)
 - #74162 (take self by value in ToPredicate)

Failed merges:

r? @ghost
Diffstat (limited to 'src/librustc_codegen_ssa')
-rw-r--r--src/librustc_codegen_ssa/back/linker.rs24
-rw-r--r--src/librustc_codegen_ssa/base.rs5
2 files changed, 10 insertions, 19 deletions
diff --git a/src/librustc_codegen_ssa/back/linker.rs b/src/librustc_codegen_ssa/back/linker.rs
index 54f55c806d0..7a07da0d3a6 100644
--- a/src/librustc_codegen_ssa/back/linker.rs
+++ b/src/librustc_codegen_ssa/back/linker.rs
@@ -475,9 +475,7 @@ impl<'a> Linker for GccLinker<'a> {
         self.cmd.arg("__llvm_profile_runtime");
     }
 
-    fn control_flow_guard(&mut self) {
-        self.sess.warn("Windows Control Flow Guard is not supported by this linker.");
-    }
+    fn control_flow_guard(&mut self) {}
 
     fn debuginfo(&mut self, strip: Strip) {
         match strip {
@@ -959,9 +957,7 @@ impl<'a> Linker for EmLinker<'a> {
         // noop, but maybe we need something like the gnu linker?
     }
 
-    fn control_flow_guard(&mut self) {
-        self.sess.warn("Windows Control Flow Guard is not supported by this linker.");
-    }
+    fn control_flow_guard(&mut self) {}
 
     fn debuginfo(&mut self, _strip: Strip) {
         // Preserve names or generate source maps depending on debug info
@@ -1163,9 +1159,7 @@ impl<'a> Linker for WasmLd<'a> {
         }
     }
 
-    fn control_flow_guard(&mut self) {
-        self.sess.warn("Windows Control Flow Guard is not supported by this linker.");
-    }
+    fn control_flow_guard(&mut self) {}
 
     fn no_crt_objects(&mut self) {}
 
@@ -1176,10 +1170,10 @@ impl<'a> Linker for WasmLd<'a> {
             self.cmd.arg("--export").arg(&sym);
         }
 
-        // LLD will hide these otherwise-internal symbols since our `--export`
-        // list above is a whitelist of what to export. Various bits and pieces
-        // of tooling use this, so be sure these symbols make their way out of
-        // the linker as well.
+        // LLD will hide these otherwise-internal symbols since it only exports
+        // symbols explicity passed via the `--export` flags above and hides all
+        // others. Various bits and pieces of tooling use this, so be sure these
+        // symbols make their way out of the linker as well.
         self.cmd.arg("--export=__heap_base");
         self.cmd.arg("--export=__data_end");
     }
@@ -1330,9 +1324,7 @@ impl<'a> Linker for PtxLinker<'a> {
 
     fn no_default_libraries(&mut self) {}
 
-    fn control_flow_guard(&mut self) {
-        self.sess.warn("Windows Control Flow Guard is not supported by this linker.");
-    }
+    fn control_flow_guard(&mut self) {}
 
     fn export_symbols(&mut self, _tmpdir: &Path, _crate_type: CrateType) {}
 
diff --git a/src/librustc_codegen_ssa/base.rs b/src/librustc_codegen_ssa/base.rs
index 4e257fba44a..b28cb071de6 100644
--- a/src/librustc_codegen_ssa/base.rs
+++ b/src/librustc_codegen_ssa/base.rs
@@ -842,10 +842,9 @@ impl CrateInfo {
                 }
             }
 
-            // No need to look for lang items that are whitelisted and don't
-            // actually need to exist.
+            // No need to look for lang items that don't actually need to exist.
             let missing =
-                missing.iter().cloned().filter(|&l| !lang_items::whitelisted(tcx, l)).collect();
+                missing.iter().cloned().filter(|&l| lang_items::required(tcx, l)).collect();
             info.missing_lang_items.insert(cnum, missing);
         }