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)

PowerPC
Mac System 8.5
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9

People

(Reporter: mikepinkerton, Assigned: mikepinkerton)

Details

Attachments

(1 file)

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?
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."
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; }
oops, i need another trailing #endif on that patch. guess it didn't get copied when i pasted into here.
How about: #if defined(XP_MAC) && MOZ_MAC_LOWMEM ?
ok, here it is... /* build on macs with low memory */ #if defined(XP_MAC) && MOZ_MAC_LOWMEM #pragma optimization_level 1 #endif
brendan and hyatt for JS and chromeReg changes, respectively.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9
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
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.
ok, i attached the full patch, let me know if it's all ok.
I wish we could do this outside the source file, but I guess we can't. sr=shaver.
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).
r=sfraser
.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
QA contact to jj for verification.
QA Contact: granrose → jj
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?
i use this on my 256mb powerbook all the time with vm off
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: