llvm-ld with -O params?

I am using LLVM via the Adobe Alchemy project. I’m trying to upgrade LLVM within Alchemy (its v2.1 of opt is crashing), but am running into an issue with llvm-ld. Alchemy is passing –O5 to llvm-ld, but it seems that –O params are no longer accepted by llvm-ld v2.4+ (“llvm-ld: Unknown command line argument ‘-O5’. Try: ‘llvm-ld --help’”).

Are –O optimizations completely deprecated? Or is there an alternate way to pass them in?

Thanks,

aaron

I’m also running into an issue with llc. Alchemy is trying to use –march avm2 and other avm2 options, but:

llc: for the -march option: : Cannot find option named ‘avm2’!

llc: Unknown command line argument ‘-avm2-use-memuser’. Try: ‘llc --help’

llc: Unknown command line argument ‘-avm2-package-name=cmodule’. Try: ‘llc --help’

Was avm2 support dropped?

There never was avm2 support in mainline LLVM.

Best regards,
--Edwin

AVM support was never contributed to the public tree. Alchemy must be using a patched version of LLVM.

–Owen

My apologies. I didn't realize that Adobe had branched llc.

What about llvm-ld and -O?

Hi Aaron-

I believe llvm-ld performs a set of optimisations by default unless you pass -disable-opt; if you need finer-grained control you might consider linking your bitcode files together with llvm-link and running opt that way.

Alastair