Closed
Bug 72945
Opened 24 years ago
Closed 24 years ago
Add option to build on low-mem macs more easily
Categories
(SeaMonkey :: Build Config, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9
People
(Reporter: mikepinkerton, Assigned: mikepinkerton)
Details
Attachments
(1 file)
2.68 KB,
patch
|
Details | Diff | Splinter Review |
Add an option |lowmem| to the build system so that macs without gobs of ram can
do optimized builds.
patching jsinterp.c, nsChromeRegistry.cpp, nsHTMLEditRules.cpp with
#ifdef XP_MAC
/* build on macs with low memory */
#if MOZ_MAC_LOWMEM
#pragma optimization_level 1
#endif
need r/sr. beard? sfraser?
Assignee | ||
Comment 1•24 years ago
|
||
this will have no effect on debug builds since we turn the global optimizer off,
so i don't see any need to #ifndef DEBUG. From the codewarrior manual:
"If the global optimizer is turned off, the compiler ignores the pragma
optimization_level."
Assignee | ||
Comment 2•24 years ago
|
||
Index: mozilla/build/mac/build_scripts/MozillaBuildFlags.txt
===================================================================
RCS file: /m/pub/mozilla/build/mac/build_scripts/MozillaBuildFlags.txt,v
retrieving revision 1.13
diff -c -2 -r1.13 MozillaBuildFlags.txt
*** MozillaBuildFlags.txt 2001/03/22 01:33:46 1.13
--- MozillaBuildFlags.txt 2001/03/22 04:39:43
***************
*** 54,57 ****
--- 54,58 ----
carbon 0
cache 1
+ lowmem 0
filepath_flags
Index: mozilla/build/mac/build_scripts/Moz/BuildFlags.pm
===================================================================
RCS file: /m/pub/mozilla/build/mac/build_scripts/Moz/BuildFlags.pm,v
retrieving revision 1.9
diff -c -2 -r1.9 BuildFlags.pm
*** BuildFlags.pm 2001/03/21 01:45:11 1.9
--- BuildFlags.pm 2001/03/22 04:40:22
***************
*** 222,225 ****
--- 222,226 ----
$optiondefines->{"cache"}{"MOZ_NEW_CACHE"} = 1;
$optiondefines->{"soap"}{"MOZ_SOAP"} = 1;
+ $optiondefines->{"lowmem"}{"MOZ_MAC_LOWMEM"} = 1;
$optiondefines->{"ldap_experimental"}{"MOZ_LDAP_XPCOM_EXPERIMENTAL"} = 1;
}
Assignee | ||
Comment 3•24 years ago
|
||
oops, i need another trailing #endif on that patch. guess it didn't get copied
when i pasted into here.
Comment 4•24 years ago
|
||
How about:
#if defined(XP_MAC) && MOZ_MAC_LOWMEM
?
Assignee | ||
Comment 5•24 years ago
|
||
ok, here it is...
/* build on macs with low memory */
#if defined(XP_MAC) && MOZ_MAC_LOWMEM
#pragma optimization_level 1
#endif
Assignee | ||
Comment 6•24 years ago
|
||
brendan and hyatt for JS and chromeReg changes, respectively.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9
Comment 7•24 years ago
|
||
How about a diff -u? Looks ok (is MOZ_MAC_LOWMEM always defined as 0 or 1,
hence the lack of a defined() around it in the #if?), just want to read the
change in context.
/be
Comment 8•24 years ago
|
||
I think you'll need to do
/* build on macs with low memory */
#if defined(XP_MAC) && defined(MOZ_MAC_LOWMEM)
#pragma optimization_level 1
#endif
The build script doesn't write out "#define MOZ_MAC_LOWMEM 0" to avoid
recompiling the world when someone adds an option that is turned off by default.
Assignee | ||
Comment 9•24 years ago
|
||
Assignee | ||
Comment 10•24 years ago
|
||
ok, i attached the full patch, let me know if it's all ok.
Comment 11•24 years ago
|
||
I wish we could do this outside the source file, but I guess we can't.
sr=shaver.
Comment 12•24 years ago
|
||
r=peterv.
The only way I see to leave the source files alone is put the pragma in the
prefix headers, but that would change the optimization level for the whole
library (js, editor and rdf).
Comment 13•24 years ago
|
||
r=sfraser
Assignee | ||
Comment 14•24 years ago
|
||
.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 16•24 years ago
|
||
Pink, does this mean we can now build with less than 384 MB of RAM ?
or to put it differently, how can i verify this bug?
Assignee | ||
Comment 17•24 years ago
|
||
i use this on my 256mb powerbook all the time with vm off
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•