Closed Bug 1077148 Opened 10 years ago Closed 10 years ago

Define mozglue dependencies in moz.build

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla36

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(4 files)

Currently, we use awful rules in config.mk, based on MOZ_GLUE_LDFLAGS and MOZ_GLUE_PROGRAM_LDFLAGS to link against mozglue. And a set of directories opt out by emptying those variable. We already have code in mozbuild to make essentially everything depend on mozglue so that things build in the right order. That's horrible in many ways, but the main point is that it's all outside of moz.build scope which it shouldn't.

Also, when working on mfbt .cpp files or jemalloc (or other mozglue things, such as the linker) on Linux, it makes mach build binaries not pick up changes because of missing dependencies for executables.
Depends on: 1077151
Depends on: 1077366
Depends on: 1077214
Depends on: 1077384
Depends on: 1080375
Depends on: 1080994
Depends on: 1080998
Depends on: 1081000
Blocks: 1082792
Depends on: 1089932
Note the recursivemake.py change is temporary and goes away in subsequent parts.
Attachment #8512445 - Flags: review?(mshal)
This hack has actually not been actively used since sqlite, nss and nspr are
all folded together, because no shared library is actually linked in
db/sqlite3/src.
Attachment #8512468 - Flags: review?(mshal)
There is no reason these should be linked to mozglue on Linux only. This
makes the intent clearer for the related changes in part 4.
Attachment #8512469 - Flags: review?(mshal)
There are, sadly, many combinations of linkage in use throughout the tree.
The main differentiator, though, is between program/libraries related to
Gecko or not. Kind of. Some need mozglue, some don't. Some need dependent
linkage, some standalone.

Anyways, these new templates remove the need to manually define the
right dependencies against xpcomglue, nspr, mozalloc and mozglue
in most cases.

Places that build programs and were resetting MOZ_GLUE_PROGRAM_LDFLAGS
or that build libraries and were resetting MOZ_GLUE_LDFLAGS can now
just not use those Gecko-specific templates.
Attachment #8512470 - Flags: review?(mshal)
Attachment #8512470 - Flags: review?(gps)
Comment on attachment 8512470 [details] [diff] [review]
part 4 - Add and use new moz.build templates for Gecko programs and libraries

Review of attachment 8512470 [details] [diff] [review]:
-----------------------------------------------------------------

Very nice. I love how our complex linking situation keeps getting easier to understand.
Attachment #8512470 - Flags: review?(gps) → review+
Attachment #8512470 - Flags: review?(mshal)
Attachment #8512445 - Flags: review?(mshal) → review?(gps)
Attachment #8512468 - Flags: review?(mshal) → review?(gps)
Attachment #8512469 - Flags: review?(mshal) → review?(gps)
Attachment #8512445 - Flags: review?(gps) → review+
Attachment #8512468 - Flags: review?(gps) → review+
Attachment #8512469 - Flags: review?(gps) → review+
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.