Closed Bug 103659 Opened 23 years ago Closed 20 years ago

move to static lib per directory

Categories

(Core :: XSLT, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla1.7beta

People

(Reporter: axel, Assigned: peterv)

References

Details

(Keywords: memory-footprint)

Attachments

(1 file, 1 obsolete file)

We shouldn't build our executable or library from the object files, but from
static libs.
I did this for unix, and this about doubles the binary size for both debug
and optim when compiling with sun workshop, while having almost no impact when
compiling with gdb. But the 'bloated' ws build is about the size of gcc, so
wth. But we should really try to use less directories.

First patch will fix unix only. As I have moved URIUtils and thus obsoleted
source/net, I do change some makefile.win's, and will need a mac buddy.

Axel
Blocks: 102138
Keywords: footprint
Hi Chris,
I saw you rant about static libs in the content/layout merge bug, so before
going further in the direction of static libs, I request your word.

Problem: adding the objects of all dirs to OBJS adds them to the dependencies,
and they get rebuilt if build/Makefile changes.
How about moving them to $(LIBS) instead? Or some other foo?

Thanx
LIBS might work although I wouldn't encourage widespread use of that practice. 
 Is there a problem with the files being built from build/ ?  If you use the
same CFLAGS/CXXFLAGS across the project, I would encourage building from a
single makefile/make invocation rather than calling the submakes (RMCH and all
that).

Hi Chris, thanx for the input.
I managed to build transformiix standalone from one Makefile.in, but:
if I specify the src files with relative paths, the file is compiled to that
directory, (which isn't generated by the build process anymore). So I specified
the src files without path and made one hell of a VPATH so that gmake finds
the sources.
Directories and make are evil. Nevertheless I kind of like it that way, as you
can just type 
make txObjFile.o
to regenerate just a specific file.

So the next issue is, is there a VPATH equivalent for nmake?
I am unaware of a VPATH equivalent for nmake but I really haven't looked.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcug98/html/_asug_overview.3a_.nmake_reference.asp
makes me think there's no VPATH in nmake.
You can do some {aSrcDir} foo, but that has to happen within the rule.
So static libs it is? Or static libs for windows, and on build dir for unix?
Blocks: 163207
Assignee: axel → peterv
Priority: -- → P3
Target Milestone: --- → mozilla1.7beta
Attachment #52526 - Attachment is obsolete: true
Attachment #142348 - Flags: superreview?(bryner)
Attachment #142348 - Flags: review?(axel)
Status: NEW → ASSIGNED
Attachment #142348 - Flags: review?(axel) → review+
Attachment #142348 - Flags: superreview?(bryner) → superreview+
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: