about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/back
diff options
context:
space:
mode:
authorAndrew Paverd <andrew.paverd@microsoft.com>2020-07-06 16:10:42 +0100
committerAndrew Paverd <andrew.paverd@microsoft.com>2020-07-10 09:56:13 +0100
commit1ca7bfe481a18909e4769a9f6aee58f8cec17b44 (patch)
treeedf2d5ad96413810dd1311344975a594b81ad6e1 /src/librustc_codegen_ssa/back
parente1beee4992ad4b235fc700bf7af1ee86f894ea53 (diff)
downloadrust-1ca7bfe481a18909e4769a9f6aee58f8cec17b44.tar.gz
rust-1ca7bfe481a18909e4769a9f6aee58f8cec17b44.zip
Only add cfguard module flag on windows-msvc
Diffstat (limited to 'src/librustc_codegen_ssa/back')
-rw-r--r--src/librustc_codegen_ssa/back/linker.rs16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/librustc_codegen_ssa/back/linker.rs b/src/librustc_codegen_ssa/back/linker.rs
index 54f55c806d0..550de75c709 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) {}
 
@@ -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) {}