Details
Diff Detail
Event Timeline
I realize that the wrapper may be removed in few months so let me know if this is irrelevant.
Hi @ygribov, thank you for this fix!
While this is "in-tree", all fixes are relevant :) Also, the main goal is to rename flang-new (Flang's compiler driver) as flang and this script as e.g. flang-to-gfortran. I hope that this will happen sooner rather than later - flang is a rather misleading name in this case. This does not mean that this script will be deleted - if people find it useful, then it may remain available as an option (albeit under a different name). Time will tell. I will definitely be in favor of removing it :)
As for your patch, I think that it would make a lot of sense to extract the following into a separate function (e.g. get_external_fc_name or something similar):
local ext_fc="" if [[ -v FLANG_FC ]]; then ext_fc="${FLANG_FC}" elif [[ -v F18_FC ]]; then # We support F18_FC for backwards compatibility. ext_fc="${F18_FC}" else ext_fc=gfortran fi
This way you will reduce code duplication.