Open DarjanKrijan opened 3 years ago
I know this is a late reply, but nonetheless....
I do not think AOCC ships with the LLVM version of the gold linker. YMMV.
Still for AOCC/LLVM you should be able to use the LLD linker instead. Try adding "-fuse-ld=lld" to your linker flags.
LINKFLAGS="-fuse-ld=lld"
Otherwise, AFAICT, SCons should accept a LINK construction variable pointing to a linker in the build config.
For AOCC/LLVM software building also consider trying ThinLTO to potentially speed build times versus FullLTO by using "-flto=thin" in your compiler flags.
I tried adding Link Time Optimization by adding
'-flto'
to CCFLAGS and LINKFLAGS insrc/SConscript
, it results in compiler warnings and eventually errors: libalm_gcc_lto_warnings_errors.txt This is with GCC 11.1.0.Also AOCC 3.1.0 gives an error not finding LLVMgold.so, while other compiles with
-flto
work with it:Link Time Optimization would be very benefitial for a library like this for better linking, inlining some functionality. Is this something that could be fixed and supported?