Julia CPU Target

Damn stupid question - is there a methodology for choosing the -C CPU Target fields for a given CPU type?
I can see that you can use CPUID.jl but for more in depth choices such as th many avx related flags is there a scriptable way to figure out what the processor you are running on has available? I mean that you can run a quick utility then launch Julia with the appropriate -C flags.

Is this question better answered in LLVM land?

julia -e 'println(Sys.CPU_NAME)'?

I believe you don’t need that, since Julia chooses appropriate. Julia will compile, your code, for your type of CPU (for JLLs, already compiled code from e.g. C, then it will not but -C would neither change that code). If you were to compile to distribute that code, it might not work for older/other CPUs, why if you use PackageCompiler.jl it would by default be more, i.e. very conservative, compile for rather old CPUs.