rust-static-disable-network-test-on-static-libraries.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. diff -rauN a/config/makefiles/rust.mk b/config/makefiles/rust.mk
  2. --- a/config/makefiles/rust.mk 2020-10-13 20:23:09.920635480 +0200
  3. +++ b/config/makefiles/rust.mk 2020-10-13 20:24:02.273994137 +0200
  4. @@ -324,17 +324,17 @@
  5. # the chance of proxy bypasses originating from rust code.
  6. # The check only works when rust code is built with -Clto but without MOZ_LTO_RUST_CROSS.
  7. # Sanitizers and sancov also fail because compiler-rt hooks network functions.
  8. -ifndef MOZ_PROFILE_GENERATE
  9. -ifeq ($(OS_ARCH), Linux)
  10. -ifeq (,$(rustflags_sancov)$(MOZ_ASAN)$(MOZ_TSAN)$(MOZ_UBSAN))
  11. -ifndef MOZ_LTO_RUST_CROSS
  12. -ifneq (,$(filter -Clto,$(cargo_rustc_flags)))
  13. - $(call py_action,check_binary,--target --networking $@)
  14. -endif
  15. -endif
  16. -endif
  17. -endif
  18. -endif
  19. +#ifndef MOZ_PROFILE_GENERATE
  20. +#ifeq ($(OS_ARCH), Linux)
  21. +#ifeq (,$(rustflags_sancov)$(MOZ_ASAN)$(MOZ_TSAN)$(MOZ_UBSAN))
  22. +#ifndef MOZ_LTO_RUST
  23. +#ifneq (,$(filter -Clto,$(cargo_rustc_flags)))
  24. +# $(call py_action,check_binary,--target --networking $@)
  25. +#endif
  26. +#endif
  27. +#endif
  28. +#endif
  29. +#endif
  30. force-cargo-library-check:
  31. $(call CARGO_CHECK) --lib $(cargo_target_flag) $(rust_features_flag)