Open ocaisa opened 3 months ago
I imagine that if the SYSTEM
compiler is not intended to support this then it should override 'COMPILER_SHARED_OPTS'
and 'COMPILER_UNIQUE_OPTS'
in https://github.com/easybuilders/easybuild-framework/blob/develop/easybuild/toolchains/system.py
Is there any compelling reason why it shouldn't support toolchainopts? Is it because we don't expect it to necessarily be GCC? I think we do expect that, implicitly, so why not let it set things like debug or lowopt etc.?
We don't know what version it is, so behaviour would not be easy to determine. I'll open a PR to remove the toolchainopts
and we can discuss there if there are some that should be supported
It is not just the documentation:
== Temporary log file in case of crash /dev/shm/branfosj/tmp-up-EL8/eb-wkdpvqyb/easybuild-79o4m74_.log
ERROR: Failed to process easyconfig /rds/projects/2017/branfosj-rse/easybuild/src/easybuild-easyconfigs/easybuild/easyconfigs/zlib-1.3.1.eb: Undefined toolchain option extra_flags specified (known options: cciscxx,pic,ieee,noopt,lowopt,defaultopt,opt,optarch,strict,precise,defaultprec,loose,veryloose,verbose,debug,i8,r8,unroll,cstd,shared,static,openmp,vectorize,packed-linker-options,rpath,extra_cflags,extra_cxxflags,extra_fflags,extra_fcflags,extra_f90flags)
This was working with zlib-1.3.1.eb
with items added into toolchainopts
.
And I now understand my confusion. In zlib-1.3.1.eb
we have
toolchainopts = {'pic': True}
But then have
# need to take care of $CFLAGS ourselves with SYSTEM toolchain
# we need to add -fPIC, but should also include -O* option to avoid
# compiling with -O0 (default for GCC)
buildopts = 'CFLAGS="-O2 -fPIC"'
The docs at https://docs.easybuild.io/version-specific/toolchain-opts/#system claim that
SYSTEM
supportstoolchainopts
but it actually doesn't