summaryrefslogtreecommitdiffstats
path: root/source/xap/mozilla-thunderbird/gkrust.a.no.networking.check.diff
diff options
context:
space:
mode:
Diffstat (limited to 'source/xap/mozilla-thunderbird/gkrust.a.no.networking.check.diff')
-rw-r--r--source/xap/mozilla-thunderbird/gkrust.a.no.networking.check.diff22
1 files changed, 13 insertions, 9 deletions
diff --git a/source/xap/mozilla-thunderbird/gkrust.a.no.networking.check.diff b/source/xap/mozilla-thunderbird/gkrust.a.no.networking.check.diff
index e2f3f98d3..759809277 100644
--- a/source/xap/mozilla-thunderbird/gkrust.a.no.networking.check.diff
+++ b/source/xap/mozilla-thunderbird/gkrust.a.no.networking.check.diff
@@ -1,23 +1,27 @@
---- ./config/makefiles/rust.mk.orig 2019-08-26 16:32:05.000000000 -0500
-+++ ./config/makefiles/rust.mk 2019-08-28 15:33:32.393489657 -0500
-@@ -243,13 +243,13 @@
- # When we are building in --enable-release mode; we add an additional check to confirm
- # that we are not importing any networking-related functions in rust code. This reduces
+--- ./config/makefiles/rust.mk.orig 2020-08-04 21:42:49.000000000 -0500
++++ ./config/makefiles/rust.mk 2020-08-24 21:44:11.930497037 -0500
+@@ -303,15 +303,15 @@
# the chance of proxy bypasses originating from rust code.
--ifndef DEVELOPER_OPTIONS
--ifndef MOZ_DEBUG_RUST
+ # The check only works when rust code is built with -Clto.
+ # Sanitizers and sancov also fail because compiler-rt hooks network functions.
+-ifndef MOZ_PROFILE_GENERATE
-ifeq ($(OS_ARCH), Linux)
+-ifeq (,$(rustflags_sancov)$(MOZ_ASAN)$(MOZ_TSAN)$(MOZ_UBSAN))
+-ifneq (,$(filter -Clto,$(cargo_rustc_flags)))
- $(call py_action,check_binary,--target --networking $@)
-endif
-endif
-endif
-+#ifndef DEVELOPER_OPTIONS
-+#ifndef MOZ_DEBUG_RUST
+-endif
++#ifndef MOZ_PROFILE_GENERATE
+#ifeq ($(OS_ARCH), Linux)
++#ifeq (,$(rustflags_sancov)$(MOZ_ASAN)$(MOZ_TSAN)$(MOZ_UBSAN))
++#ifneq (,$(filter -Clto,$(cargo_rustc_flags)))
+# $(call py_action,check_binary,--target --networking $@)
+#endif
+#endif
+#endif
++#endif
force-cargo-library-check:
$(call CARGO_CHECK) --lib $(cargo_target_flag) $(rust_features_flag)