adobe-flash/crossbridge

Linker gets out of memory

crazyjul opened this issue · 5 comments

Hi,
I'm trying to build our project using crossbridge, but linking goes over 32bit memory limit.

Do you know any mean to link in several steps or some settings that lower the need for so much memory?

The project is not huge, so any advices would be great

Thanks

Basically 2 options:
1 dedicate a large memory to abc linking with -jvmopt=-Xmx2000M
2 try LTO to strip out unused symbols: https://github.com/adobe-flash/crossbridge/wiki/Enable-%E2%80%93flto-and-%E2%80%93flto-export-options-to-optimize-your-application-and-reduce-linking-time

On Dec 31, 2013, at 7:54 AM, Julien Hamaide notifications@github.com wrote:

Hi,
I'm trying to build our project using crossbridge, but linking goes over 32bit memory limit.

Do you know any mean to link in several steps or some settings that lower the need for so much memory?

The project is not huge, so any advices would be great

Thanks


Reply to this email directly or view it on GitHub.

Thanks for the quick answer :
I already have jvmop=-Xmx14G, but it's ld that crashes in a C++ code ( got a std::bad_alloc exception )

I'll try your suggestion on next monday ( I'm off until that )

Thanks again

Unfortunately, the flag was the flto-api is already there.

No clue how to solve this issue, but compiling the toolchain in 64 bits

Just another question, can I use g++ to merge object together and do the linking in smaller part?

Thanks

If you compile them into LLVM IR (I mean before convert them into ABC), yes you can use llvm-link.
But even linking into one file, you still have those symbols and still have to convert them into ABC.
Whereas nothing is different in final linking under current design.

So IMHO, it's better to pass as few symbols as possible to decrease the memory demand.
Yes, sometime it's hard. You depend a lib call where in chain you get a lot of dependencies automatically.
Then a smaller code turns into a Big ABC.

On Jan 5, 2014, at 4:29 AM, Julien Hamaide notifications@github.com wrote:

Just another question, can I use g++ to merge object together and do the linking in smaller part?

Thanks


Reply to this email directly or view it on GitHub.