rust-static-disable-network-test-on-static-libraries.patch 892 B

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