Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Building XPCOM plugin



  I'm facing an issue with a dynamic library built on a Mac having a much
bigger size than the same library built from the same code and same makefile
on Linux.

  For a skeleton XPCOM plugin, I'm getting about 750K. On Linux, it's about
40K (and 28K on Windows).

  I'm using gcc-3.3 from Xcode 1.5. Here is a part of my makefile:

CXX = g++
CPPFLAGS += -dynamiclib
GECKO_CONFIG_INCLUDE = -include mozilla-config.h

GECKO_DEFINES = -DXPCOM_GLUE -DMOZILLA_STRICT_API

GECKO_LDFLAGS = -L$(GECKO_SDK_PATH)/lib -lxpcomglue\
 -L$(GECKO_SDK_PATH)/bin -lnspr4\
 -L$(GECKO_SDK_PATH)/bin -lplc4\
 -L$(GECKO_SDK_PATH)/bin -lplds4\
 -L$(GECKO_SDK_PATH)/bin -lxpcom\


  Adding -dead-strip to the flags reduces the size to 680K, stripping the
binary (without options) further reduces it to 450K - still far from what I
get on Linux. What do I overlook?

- WBR, Alexey Proskuryakov


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.