Issue on Solaris CC optimization flag
Pergunta
May I ask a question about the CC compiler in Solaris environment.
I try to compile a Solaris release library with "-O" using Solaris CC compiler. I can compile the debug library previously using "-g".
However, when I change the "-g" to "-O", after some time, the compilation stop without any error. There is no output however.
I am thinking it is related to memory. So I try to compile a very simple cpp using -O flag. This time, the output is there.
May I know if any one has any idea on it? If it is a memory issue, can we use some commend or compile flag to solve it? Maybe increase the virtual memory assigned to CC?
Thanks,
Solução
You could increase virtual memory by making a swapfile:
mkswap 4096M /where/you/want/your/swapfile
swap -a /where/you/want/your/swapfile
Alternatively, you can run your truss your compilation to see exactly what's going on:
truss -f <build command>