Bug 1231764 - part 0 - only link librul once; r=chmanchester

Through an oversight, we listed librul.a twice when linking libxul: once
as part of the "objects" we were linking, and once as a static library.
This duplication is unnecessary and would cause problems later when we
try to generate librul.a via cargo, as cargo will put it someplace
different from where we expect and the two names will conflict.  Let's
have rules.mk be the single source of truth for how librul.a is named,
and then the code to link libxul can simply refer to that name.
This commit is contained in:
Nathan Froyd 2016-08-03 19:40:41 -04:00
parent 85e0b07fa8
commit a79d68b929
2 changed files with 2 additions and 2 deletions

View File

@ -243,7 +243,7 @@ ASOBJS = $(notdir $(addsuffix .$(OBJ_SUFFIX),$(basename $(ASFILES))))
RSOBJS = $(addprefix lib,$(notdir $(RSSRCS:.rs=.rlib)))
RS_STATICLIB_CRATE_OBJ = $(addprefix lib,$(notdir $(RS_STATICLIB_CRATE_SRC:.rs=.$(LIB_SUFFIX))))
ifndef OBJS
_OBJS = $(COBJS) $(SOBJS) $(CPPOBJS) $(CMOBJS) $(CMMOBJS) $(ASOBJS) $(RSOBJS) $(RS_STATICLIB_CRATE_OBJ)
_OBJS = $(COBJS) $(SOBJS) $(CPPOBJS) $(CMOBJS) $(CMMOBJS) $(ASOBJS) $(RSOBJS)
OBJS = $(strip $(_OBJS))
endif

View File

@ -1246,7 +1246,7 @@ class RecursiveMakeBackend(CommonBackend):
# Building the Rust super-crate will take care of Rust->Rust linkage.
if isinstance(obj, SharedLibrary) and any(isinstance(o, RustRlibLibrary)
for o in obj.linked_libraries):
backend_file.write('STATIC_LIBS += librul.$(LIB_SUFFIX)\n')
backend_file.write('STATIC_LIBS += $(RS_STATICLIB_CRATE_OBJ)\n')
for lib in obj.linked_system_libs:
if obj.KIND == 'target':