Clang equivalent of given flags

Hey Devs,

Can someone suggest alternative flags for clang for the below-mentioned flags which work with GCC but get ignored in clang?





I see that in clang/include/Driver/, both -finline_functions_called_once and -finline-limit have been defined as “clang_ignored_gcc_optimization_f_Group”.

You can use -mllvm -inline-threshold= as a replacement for -finline-limit=. I am not sure if there is a replacement for


We generally don't have options to control the optimizers that
precisely. Even the threshold one you found is an LLVM internal option
and not guaranteed to be stable. It could disappear or arbitrarily
change its meaning at any point.