Closed Bug 696788 Opened 8 years ago Closed 8 years ago

Build using jemalloc and SDK compiler crashes shortly after startup

Categories

(Firefox Build System :: General, defect)

x86
Windows XP
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: neil, Assigned: neil)

Details

Attachments

(1 file)

The CRT provided with the Windows SDK compiler doesn't import free from crtdll.obj, so we don't try to build our own private CRT import library.

This means that when we enable jemalloc, we pass MOZ_UTILS_LDFLAGS directly to NSPR/NSS via DLLFLAGS. However there are two problems with this:

In NSPR this doesn't work at all, since NSPR doesn't know what EXPAND_LIBNAME_PATH or LIBXUL_DIST are, and so the $(call EXPAND_LIBNAME_PATH,mozutils,$(LIBXUL_DIST)/lib) simply gets ignored.

For NSS the mozilla/security/manager/Makefile.in exports DLLFLAGS into the environment. This does seem to correctly expand it. However for some reason some (or all?) of the DLLs still end up linking to the CRT free instead.
Attached patch Possible patchSplinter Review
I found that inserting the lib using -DEFAULTLIB (which resembles the way we do it for broken crtdll.obj builds) does ensure that NSS links correctly, although we then have to port the fix to comm-central because for some reason its copy of the broken DLLFLAGS confuses NSS again.
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #569095 - Flags: review?(khuey)
Attachment #569095 - Flags: feedback?(bugspam.Callek)
Pushed changeset 204bd66034e2 to mozilla-central.
Attachment #569095 - Flags: feedback?(bugspam.Callek) → feedback+
Pushed changeset 16efbe29a2a2 to comm-central.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.