diff --git a/mozilla/config/rules.mk b/mozilla/config/rules.mk index a19bc550dce..2d7517bc8bf 100644 --- a/mozilla/config/rules.mk +++ b/mozilla/config/rules.mk @@ -408,6 +408,20 @@ ifdef IS_COMPONENT EXTRA_DSO_LDOPTS += $(MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS) endif # IS_COMPONENT +# +# Enforce the requirement that MODULE_NAME must be set +# for components in static builds +# +ifdef IS_COMPONENT +ifdef EXPORT_LIBRARY +ifndef FORCE_SHARED_LIB +ifndef MODULE_NAME +$(error MODULE_NAME is required for components which may be used in static builds) +endif +endif +endif +endif + # # MacOS X specific stuff #