Skip to main content

CVM compile flags

2 replies [Last post]
arunib
Offline
Joined: 2007-04-16
Points: 0

The following are the variables which store compiler options for cvm...

1)CCFLAGS_SPEED
2)CCFLAGS_SPACE
3)CCFLAGS_LOOP
4)CCFLAGS_FDLIB

Of the four shown above, the optimization flag (to turn on gcc optimizations ) are -O4 in case of 1,3 and 4 and is only -O2 in the case of 2.

Why is this so? Why dont we give -O4 to CCFLAGS_SPACE also?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cjplummer
Offline
Joined: 2006-10-16
Points: 0

-O4 optimizes for speed. -O2 optimizes for size. So the -O option is matching what we want for each CCFLAGS variant. We build files that aren't performance critical with CCFLAGS_SPACE. A lot of JNI natives are built this way. Something like the interpreter loop or gc would use CCFLAGS_SPEED, since you are willing to sacrifice size for speed in this case.

arunib
Offline
Joined: 2007-04-16
Points: 0

thanks..just did'nt know the significance of the ccflags speed, ccflags space etc...