mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
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:
parent
85e0b07fa8
commit
a79d68b929
@ -243,7 +243,7 @@ ASOBJS = $(notdir $(addsuffix .$(OBJ_SUFFIX),$(basename $(ASFILES))))
|
|||||||
RSOBJS = $(addprefix lib,$(notdir $(RSSRCS:.rs=.rlib)))
|
RSOBJS = $(addprefix lib,$(notdir $(RSSRCS:.rs=.rlib)))
|
||||||
RS_STATICLIB_CRATE_OBJ = $(addprefix lib,$(notdir $(RS_STATICLIB_CRATE_SRC:.rs=.$(LIB_SUFFIX))))
|
RS_STATICLIB_CRATE_OBJ = $(addprefix lib,$(notdir $(RS_STATICLIB_CRATE_SRC:.rs=.$(LIB_SUFFIX))))
|
||||||
ifndef OBJS
|
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))
|
OBJS = $(strip $(_OBJS))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -1246,7 +1246,7 @@ class RecursiveMakeBackend(CommonBackend):
|
|||||||
# Building the Rust super-crate will take care of Rust->Rust linkage.
|
# Building the Rust super-crate will take care of Rust->Rust linkage.
|
||||||
if isinstance(obj, SharedLibrary) and any(isinstance(o, RustRlibLibrary)
|
if isinstance(obj, SharedLibrary) and any(isinstance(o, RustRlibLibrary)
|
||||||
for o in obj.linked_libraries):
|
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:
|
for lib in obj.linked_system_libs:
|
||||||
if obj.KIND == 'target':
|
if obj.KIND == 'target':
|
||||||
|
Loading…
Reference in New Issue
Block a user