zsh-workers
 help / color / mirror / code / Atom feed
From: "Jun. T" <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: Re: Improvements to the gcc completion script
Date: Wed, 31 Mar 2021 23:53:16 +0900	[thread overview]
Message-ID: <B2339163-0F79-483A-88EF-D6DDAB202587@kba.biglobe.ne.jp> (raw)
In-Reply-To: <56973-1617193890.190979@qzz3.XNO_.UryG>

[-- Attachment #1: Type: text/plain, Size: 1726 bytes --]


> 2021/03/31 21:31, Oliver Kiddle <opk@zsh.org> wrote:
> 
> On 23 Mar, "Jun. T" wrote:
>> Does anyone know a way to prevent '--' from being split in 'partial word completion'?
> 
> It is possible if you check for a -- in $PREFIX and don't add the other
> matches when it is found. That might subvert approximate completion,
> however. .... (snip)

Thanks for the analysis.
It seems 'r:|[_-][^-]=* r:|=*' works _slightly_ better, although I don't
know why. Or does this have some bad side effects?

> 2021/03/31 21:31, Oliver Kiddle <opk@zsh.org> wrote:
> 
> Was this the only outstanding issue for the contributed _gcc update?
> What's the status otherwise?

I've been trying to find a reasonable default for library_path.
We need to add /usr/lib/x86_64-linux-gnu on Ubuntu (and Debian?) and
/usr/lib64 and on Fedora/CentOS. Are there any OSs that are known to
use directories other than /usr/{,local/}lib? In the attached _gcc
I use the following for OSTYPE==linux-gnu:

      tmp=$(_call_program library-paths $words[1] -print-multiarch)
      if [[ $tmp != '' && -d /usr/lib/$tmp ]]; then
	library_path+=( /usr/lib/$tmp )
      elif [[ -d /usr/lib64 ]]; then
	library_path+=( /usr/lib64 )
      fi

> It does add
> a commented out line that assigns args2 without the file glob. That
> serves no useful purpose, was probably debug that got left in and should
> be stripped.

OP (Jacob Gelbman) wanted to use the commend-out version, but I argued that
it was not a good idea in a response to him.

Only differences of the attached _gcc from the 2nd version by OP are
the above three points (except for format changes etc.).

I will push this soon unless any problems are found.


[-- Attachment #2: _gcc --]
[-- Type: application/octet-stream, Size: 142473 bytes --]

#compdef gcc g++ cc c++ llvm-gcc llvm-g++ clang clang++ -value-,LDFLAGS,-default- -value-,CFLAGS,-default- -value-,CXXFLAGS,-default- -value-,CPPFLAGS,-default- -P gcc-* -P g++-* -P c++-*

local curcontext="$curcontext" state line ret=1 expl i
local -a args args2 warnings arch
typeset -A opt_args

if [[ "$service" = -value-* ]]; then
  compset -q
  words=( fake "$words[@]" )
  (( CURRENT++ ))
  if [[ "$service" = *LDFLAGS ]]; then
    args2=( '-R:runtime path:->rundir' )
  else
    args2=()
  fi
else
  # On some systems (macOS), cc/gcc/g++ are actually clang; treat them accordingly
  [[ $service != clang* ]] &&
  _pick_variant clang=clang unix --version &&
  service=clang-$service

  args2=( '*:input file:_files -g "*.([cCmisSoak]|cc|cpp|cxx|ii|k[ih])(-.)"' )
fi

args=()
case $MACHTYPE in

m68*)
  args=(
    -m68000 -m68020 -m68020-40 -m68030 -m68040 -m68881
    -mbitfield -mc68000 -mc68020 -mfpa -mnobitfield
    -mrtd -mshort -msoft-float
  )
  ;;
vax)
  args=(
    -mg -mgnu -munix
  )
  ;;
c[1234]*)
  args=(
    -mc1 -mc2 -mc32 -mc34 -mc38
    -margcount -mnoargcount
    -mlong32 -mlong64
    -mvolatile-cache -mvolatile-nocache
  )
  ;;
amd290?0)
  args=(
    -m29000 -m29050 -mbw -mnbw -mdw -mndw
    -mlarge -mnormal -msmall
    -mkernel-registers -mno-reuse-arg-regs
    -mno-stack-check -mno-storem-bug
    -mreuse-arg-regs -msoft-float -mstack-check
    -mstorem-bug -muser-registers
  )
  ;;
arm)
  args=(
    -mapcs -m2 -m3 -m6 -mbsd -mxopen -mno-symrename
    '-faapcs-bitfield-load[all volatile bit-field write generates at least one load]'
    '-faapcs-bitfield-width[volatile bit-field width is dictated by the field container type]'
    '-mcmse[allow use of CMSE]'
    '-mexecute-only[disallow generation of data access to code sections]'
    '-mno-movt[disallow use of movt/movw pairs]'
    '-mno-neg-immediates[disallow converting instructions with negative immediates to their negation]'
    '-mnocrc[disallow use of CRC instructions]'
    '-mrestrict-it[disallow generation of deprecated IT blocks for ARMv8]'
    '-mtp=[thread pointer access method]:arg'
    '-munaligned-access[allow memory accesses to be unaligned]'
  )
  ;;
m88k)
  args=(
    -m88000 -m88100 -m88110 -mbig-pic
    -mcheck-zero-division -mhandle-large-shift
    -midentify-revision -mno-check-zero-division
    -mno-ocs-debug-info -mno-ocs-frame-position
    -mno-optimize-arg-area -mno-serialize-volatile
    -mno-underscores -mocs-debug-info
    -mocs-frame-position -moptimize-arg-area
    -mserialize-volatile -msvr3
    -msvr4 -mtrap-large-shift -muse-div-instruction
    -mversion-03.00 -mwarn-passed-structs
    '-mshort-data--:maximum displacement:'
  )
  ;;
rs6000|powerpc*)
  arch=(rios1 rios2 rsc 501 603 604 power powerpc 403 common)
  args=(
    -mpower -mno-power -mpower2 -mno-power2
    -mpowerpc -mno-powerpc
    -mpowerpc-gpopt -mno-powerpc-gpopt
    -mpowerpc-gfxopt -mno-powerpc-gfxopt
    -mnew-mnemonics -mno-new-mnemonics
    -mfull-toc -mminimal-toc -mno-fop-in-toc -mno-sum-in-toc
    -msoft-float -mhard-float -mmultiple -mno-multiple
    -mstring -mno-string -mbit-align -mno-bit-align
    -mstrict-align -mno-strict-align -mrelocatable -mno-relocatable
    -mtoc -mno-toc -mtraceback -mno-traceback
    -mlittle -mlittle-endian -mbig -mbig-endian
    -mcall-aix -mcall-sysv -mprototype
    '-mcpu=:CPU type:->arch'
    '-maltivec[altivec]'
    '-mcmpb[cmpb]'
    '-mcrbits[crbits]'
    '-mcrypto[crypto]'
    '-mdirect-move[direct move]'
    '-mefpu2[efpu2]'
    '-mfloat128[float128]'
    '-mfprnd[fprnd]'
    '-mhtm[htm]'
    '-minvariant-function-descriptors[invariant function descriptors]'
    '-misel[isel]'
    '-mlongcall[longcall]'
    '-mmfocrf[mfocrf]'
    '-mmfcrf[mfcrf]'
    '-mmma[mma]'
    '-mpaired-vector-memops[paired vector memops]'
    '-mpcrel[pcrel]'
    '-mpopcntd[popcntd]'
    '-mpower10-vector[power10 vector]'
    '-mpower8-vector[power8 vector]'
    '-mpower9-vector[power9 vector]'
    '-mrop-protection[rop protection]'
    '-msecure-plt[secure plt]'
    '-mspe[spe]'
    '-mvsx[vsx]'
  )
  ;;
romp)
  args=(
    -mcall-lib-mul -mfp-arg-in-fpregs -mfp-arg-in-gregs
    -mfull-fp-blocks -mhc-struct-return -min-line-mul
    -mminimum-fp-blocks -mnohc-struct-return
  )
  ;;
mips*)
  arch=(r2000 r3000 r4000 r4400 r4600 r6000)
  args=(
    -membedded-pic -mgas -mgp32 -mgp64 -mhalf-pic -mhard-float -mint64 -mips1
    -mips2 -mips3 -mlong64 -mmemcpy -mmips-as -mmips-tfile -mno-abicalls
    -mno-embedded-data -mno-embedded-pic -mno-gpopt -mno-long-calls -mno-memcpy
    -mno-mips-tfile -mno-rnames -mno-stats -mrnames -msoft-float -m4650 -mmad
    -mstats -nocpp
    '-mcpu=:CPU type:->arch'
    '-mabicalls[enable SVR4-style position-independent code]'
    '-mabs=[abs]:arg'
    '-mcheck-zero-division[check zero division]'
    '-mcompact-branches=[compact branches]:arg'
    '-mdouble-float[double float]'
    '-mdsp[dsp]'
    '-mdspr2[dspr2]'
    '-membedded-data[place constants in the .rodata section instead of the .sdata section]'
    '-mextern-sdata[assume that externally defined data is in the small data]'
    '-mfp32[use 32-bit floating point registers]'
    '-mfp64[use 64-bit floating point registers]'
    '-mginv[ginv]'
    '-mgpopt[use GP relative accesses for symbols known to be in a small data section]'
    '-mindirect-jump=[change indirect jump instructions to inhibit speculation]:arg'
    '-mips16[ips16]'
    '-mldc1-sdc1[ldc1 sdc1]'
    '-mlocal-sdata[extend the -G behaviour to object local data]'
    '-mmadd4[enable the generation of 4-operand madd.s, madd.d, etc]'
    '-mmicromips[micromips]'
    '-mmsa[enable MSA ASE]'
    '-mmt[enable MT ASE]'
    '-mnan=[nan]:arg'
    '-mno-mips16[no mips16]'
    '-msingle-float[single float]'
    '-mvirt[virt]'
    '-mxgot[xgot]'
  )
  ;;
i[3456]86|x86_64)
  arch=(
    native i386 i486 i586 pentium pentium-mmx pentiumpro i686 pentium2 pentium3
    pentium3m pentium-m pentium4 pentium4m prescott nocona core2 corei7 corei7-avx
    core-avx-i core-avx2 atom k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp
    athlon-mp k8 opteron athlon64 athlon-fx k8-sse3 opteron-sse3 athlon64-sse3
    amdfam10 barcelona bdver1 bdver2 bdver3 btver1 btver2 winchip-c6 winchip2 c3
    c3-2 geode
  )
  args=(
    '-m128bit-long-double[sizeof(long double) is 16]'
    '-m16[generate 16bit i386 code]'
    '-m32[generate 32bit i386 code]'
    '-m3dnowa[support Athlon 3Dnow! built-in functions]'
    '-m3dnow[support 3DNow! built-in functions]'
    '-m64[generate 64bit x86-64 code]'
    '-m80387[use hardware fp]'
    '-m8bit-idiv[expand 32bit/64bit integer divide into 8bit unsigned integer divide with run-time check]'
    '-m96bit-long-double[sizeof(long double) is 12]'
    '-mabi=-[generate code that conforms to the given ABI]:abi:(ms sysv)'
    '-mabm[support code generation of Advanced Bit Manipulation (ABM) instructions]'
    '-maccumulate-outgoing-args[reserve space for outgoing arguments in the function prologue]'
    '-maddress-mode=-[use given address mode]:address mode:(short long)'
    '-madx[support flag-preserving add-carry instructions]'
    '-maes[support AES built-in functions and code generation]'
    '-malign-data=-[use the given data alignment]:type:(compat abi cacheline)'
    '-malign-double[align some doubles on dword boundary]'
    '-malign-functions=-[function starts are aligned to this power of 2]: **2 base for function alignment: '
    '-malign-jumps=-[jump targets are aligned to this power of 2]: **2 base for jump goal alignment: '
    '-malign-loops=-[loop code aligned to this power of 2]: **2 base for loop alignment: '
    '-malign-stringops[align destination of the string operations]'
    '-mamx-bf16[amx bf16]'
    '-mamx-int8[amx int8]'
    '-mamx-tile[amx tile]'
    '-mandroid[generate code for the Android platform]'
    '-march=-[generate instructions for CPU type]:CPU type:->archgeneric'
    '-masm=-[use given assembler dialect]:asm dialect:(att intel)'
    '-mavx256-split-unaligned-load[split 32-byte AVX unaligned load]'
    '-mavx256-split-unaligned-store[split 32-byte AVX unaligned store]'
    '-mavx2[support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX and AVX2 built-in functions and code generation]'
    '-mavx5124fmaps[support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX512F and AVX5124FMAPS built- in functions and code generation]'
    '-mavx5124vnniw[support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX512F and AVX5124VNNIW built- in functions and code generation]'
    '-mavx512bf16[avx512bf16]'
    '-mavx512bitalg[avx512bitalg]'
    '-mavx512bw[support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2 and AVX512F and AVX512BW built- in functions and code generation]'
    '-mavx512cd[support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2 and AVX512F and AVX512CD built- in functions and code generation]'
    '-mavx512dq[support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2 and AVX512F and AVX512DQ built- in functions and code generation]'
    '-mavx512er[support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2 and AVX512F and AVX512ER built- in functions and code generation]'
    '-mavx512f[support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2 and AVX512F built-in functions and code generation]'
    '-mavx512ifma[support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2 and AVX512F and AVX512IFMA built-in functions and code generation]'
    '-mavx512pf[support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2 and AVX512F and AVX512PF built- in functions and code generation]'
    '-mavx512vbmi2[avx512vbmi2]'
    '-mavx512vbmi[support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2 and AVX512F and AVX512VBMI built-in functions and code generation]'
    '-mavx512vl[support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2 and AVX512F and AVX512VL built- in functions and code generation]'
    '-mavx512vnni[avx512vnni]'
    '-mavx512vp2intersect[avx512vp2intersect]'
    '-mavx512vpopcntdq[support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX512F and AVX512VPOPCNTDQ built-in functions and code generation]'
    '-mavx[support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2 and AVX built-in functions and code generation]'
    '-mavxvnni[avxvnni]'
    '-mbionic[use Bionic C library]'
    '-mbmi2[support BMI2 built-in functions and code generation]'
    '-mbmi[support BMI built-in functions and code generation]'
    '-mbranch-cost=-[branches are this expensive (1-5, arbitrary units)]:branch cost (1-5): '
    '-mcldemote[cldemote]'
    '-mcld[generate cld instruction in the function prologue]'
    '-mclflushopt[support CLFLUSHOPT instructions]'
    '-mclwb[support CLWB instruction]'
    '-mclzero[support CLZERO built-in functions and code generation]'
    '-mcmodel=-[use given x86-64 code model]:memory model:(32 small kernel medium large)'
    '-mcpu=-[set CPU type]:CPU type:->arch'
    '-mcrc32[support code generation of crc32 instruction]'
    '-mcx16[support code generation of cmpxchg16b instruction]'
    '-mdispatch-scheduler[do dispatch scheduling if processor is bdver1, bdver2, bdver3, bdver4 or znver1 and Haifa scheduling is selected]'
    '-menqcmd[enqcmd]'
    '-mf16c[support F16C built-in functions and code generation]'
    '-mfancy-math-387[generate sin, cos, sqrt for FPU]'
    '-mfentry[emit profiling counter call at function entry before prologue]'
    '-mfma4[support FMA4 built-in functions and code generation]'
    '-mfma[support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX and FMA built-in functions and code generation]'
    '-mforce-drap[always use Dynamic Realigned Argument Pointer (DRAP) to realign stack]'
    '-mfpmath=-[generate floating point mathematics using given instruction set]:FPU type:(387 sse sse,387 both)'
    '-mfp-ret-in-387[return values of functions in FPU registers]'
    '-mfsgsbase[support FSGSBASE built-in functions and code generation]'
    '-mfunction-return=-[convert function return to call and return thunk]:choice:(keep thunk thunk-inline thunk-extern)'
    '-mfxsr[support FXSAVE and FXRSTOR instructions]'
    '-mgeneral-regs-only[generate code which uses only the general registers]'
    '-mgfni[gfni]'
    '-mglibc[use GNU C library]'
    '-mhard-float[use hardware fp]'
    '-mhle[support Hardware Lock Elision prefixes]'
    '-mhreset[hreset]'
    '-miamcu[generate code that conforms to Intel MCU psABI]'
    '-mieee-fp[use IEEE math for fp comparisons]'
    '-mincoming-stack-boundary=-[assume incoming stack aligned to this power of 2]:assumed size of boundary: '
    '-mindirect-branch=-[convert indirect call and jump to call and return thunks]:choice:(keep thunk thunk-inline thunk-extern)'
    '-mindirect-branch-register[force indirect call and jump via register]'
    '-minline-all-stringops[inline all known string operations]'
    '-minline-stringops-dynamically[inline memset/memcpy string operations, but perform inline version only for small blocks]'
    '-minvpcid[invpcid]'
    '-mkl[kl]'
    '-mlarge-data-threshold=-[data greater than given threshold will go into .ldata section in x86-64 medium model]:threshold: '
    '-mlong-double-128[use 128-bit long double]'
    '-mlong-double-64[use 64-bit long double]'
    '-mlong-double-80[use 80-bit long double]'
    '-mlwp[support LWP built-in functions and code generation]'
    '-mlzcnt[support LZCNT built-in function and code generation]'
    {'-mmemset-strategy=-','-mmemcpy-strategy=-'}'[specify memcpy expansion strategy when expected size is known]:strategy:'
    '-mmitigate-rop[attempt to avoid generating instruction sequences containing ret bytes]'
    '-mmmx[support MMX built-in functions]'
    '-mmovbe[support code generation of movbe instruction]'
    '-mmovdir64b[movdir64b]'
    '-mmovdiri[movdiri]'
    '-mmpx[support MPX code generation]'
    '-mms-bitfields[use native (MS) bitfield layout]'
    '-mmusl[use musl C library]'
    '-mmwaitx[support MWAITX and MONITORX built-in functions and code generation]'
    '-mno-default[clear all tune features]'
    '-mnop-mcount[generate mcount/__fentry__ calls as nops. To activate they need to be patched in]'
    '-mno-sse4[do not support SSE4.1 and SSE4.2 built-in functions and code generation]'
    '-momit-leaf-frame-pointer[omit the frame pointer in leaf functions]'
    '-mpc32[set 80387 floating-point precision to 32-bit]'
    '-mpc64[set 80387 floating-point precision to 64-bit]'
    '-mpc80[set 80387 floating-point precision to 80-bit]'
    '-mpclmul[support PCLMUL built-in functions and code generation]'
    '-mpconfig[pconfig]'
    '-mpku[support PKU built-in functions and code generation]'
    '-mpopcnt[support code generation of popcnt instruction]'
    '-mprefer-avx128[use 128-bit AVX instructions instead of 256-bit AVX instructions in the auto-vectorizer]'
    '-mpreferred-stack-boundary=-[attempt to keep stack aligned to this power of 2]:size of boundary: '
    '-mprefetchwt1[support PREFETCHWT1 built-in functions and code generation]'
    '-mprfchw[support PREFETCHW instruction]'
    '-mptwrite[ptwrite]'
    '-mpush-args[use push instructions to save outgoing arguments]'
    '-mrdpid[support RDPID built-in functions and code generation]'
    '-mrdrnd[support RDRND built-in functions and code generation]'
    '-mrdseed[support RDSEED instruction]'
    '-mrecip=-[control generation of reciprocal estimates]::instruction:(all none div divf divd rsqrt rsqrtf rsqrtd)' # TODO comma separated and can have !
    '-mrecip[generate reciprocals instead of divss and sqrtss]'
    '-mrecord-mcount[generate __mcount_loc section with all mcount or __fentry__ calls]'
    '-mred-zone[use red-zone in the x86-64 code]'
    '-mreg-alloc=[control the default allocation order of integer registers]:default register allocation order:'
    '-mregparm=-[number of registers used to pass integer arguments]:number of integer argument registers: '
    '-mretpoline-external-thunk[retpoline external thunk]'
    '-mrtd[alternate calling convention]'
    '-mrtm[support RTM built-in functions and code generation]'
    '-msahf[support code generation of sahf instruction in 64bit x86-64 code]'
    '-mserialize[serialize]'
    '-msgx[support SGX built-in functions and code generation]'
    '-msha[support SHA1 and SHA256 built-in functions and code generation]'
    '-mshstk[shstk]'
    '-mskip-rax-setup[skip setting up RAX register when passing variable arguments]'
    '-msoft-float[do not use hardware fp]'
    '-msse2avx[encode SSE instructions with VEX prefix]'
    '-msse2[support MMX, SSE and SSE2 built-in functions and code generation]'
    '-msse3[support MMX, SSE, SSE2 and SSE3 built-in functions and code generation]'
    '-msse4.1[support MMX, SSE, SSE2, SSE3, SSSE3 and SSE4.1 built-in functions and code generation]'
    '-msse4.2[support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1 and SSE4.2 built-in functions and code generation]'
    '-msse4a[support MMX, SSE, SSE2, SSE3 and SSE4A built-in functions and code generation]'
    '-msse4[support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1 and SSE4.2 built-in functions and code generation]'
    '-msseregparm[use SSE register passing conventions for SF and DF mode]'
    '-msse[support MMX and SSE built-in functions and code generation]'
    '-mssse3[support MMX, SSE, SSE2, SSE3 and SSSE3 built-in functions and code generation]'
    '-mstack-arg-probe[enable stack probing]'
    '-mstack-protector-guard=-[use given stack-protector guard]:guard:(global tls)'
    '-mstackrealign[realign stack in prologue]'
    '-mstringop-strategy=-[chose strategy to generate stringop using]:stringop strategy:(byte_loop libcall loop rep_4byte rep_8byte rep_byte unrolled_loop)'
    '-mstv[disable Scalar to Vector optimization pass transforming 64-bit integer computations into a vector ones]'
    '-mtbm[support TBM built-in functions and code generation]'
    '-mthreads[support thread-safe exception handling on MinGW]'
    '-mtls-dialect=-[use given thread-local storage dialect]:TLS dialect:(gnu gnu2)'
    '-mtls-direct-seg-refs[use direct references against %gs when accessing tls data]'
    '-mtsxldtrk[tsxldtrk]'
    #'-mtune-ctrl=-[fine grain control of tune features]:feature-list:' #for dev use only
    '-mtune=-[tune code for CPU type]:CPU type:->arch'
    '-muclibc[use uClibc C library]'
    '-muintr[uintr]'
    '-mvaes[vaes]'
    '-mveclibabi=-[vector library ABI to use]:vector library ABI:(acml svml)'
    '-mvect8-ret-in-mem[return 8-byte vectors in memory]'
    '-mvpclmulqdq[vpclmulqdq]'
    '-mvzeroupper[generate vzeroupper instruction before a transfer of control flow out of the function]'
    '-mwaitpkg[waitpkg]'
    '-mwbnoinvd[wbnoinvd]'
    '-mwidekl[widekl]'
    '-mx32[generate 32bit x86-64 code]'
    '-mx87[x87]'
    '-mxop[support XOP built-in functions and code generation]'
    '-mxsavec[support XSAVEC instructions]'
    '-mxsaveopt[support XSAVEOPT instruction]'
    '-mxsaves[support XSAVES and XRSTORS instructions]'
    '-mxsave[support XSAVE and XRSTOR instructions]'
  )
  ;;
hppa*)
  args=(
    -mdisable-fpregs -mdisable-indexing -mfast-indirect-calls
    -mgas -mjump-in-delay -mlong-millicode-calls -mno-disable-fpregs
    -mno-disable-indexing -mno-fast-indirect-calls -mno-gas
    -mno-jump-in-delay -mno-millicode-long-calls
    -mno-portable-runtime -mno-soft-float -msoft-float
    -mpa-risc-1-0 -mpa-risc-1-1 -mportable-runtime
    '-mschedule=:code scheduling constraints:(700 7100 7100LC)'
  )
  ;;
i960)
  args=(
    -m{ka,kb,mc,ca,cf,sa,sb}
    -masm-compat -mclean-linkage
    -mcode-align -mcomplex-addr -mleaf-procedures
    -mic-compat -mic2.0-compat -mic3.0-compat
    -mintel-asm -mno-clean-linkage -mno-code-align
    -mno-complex-addr -mno-leaf-procedures
    -mno-old-align -mno-strict-align -mno-tail-call
    -mnumerics -mold-align -msoft-float -mstrict-align
    -mtail-call
  )
  ;;
sparc)
  arch=(
    v7 cypress v8 supersparc sparclite f930 f934 hypersparc sparclite86x sparclet
    tsc701 v9 ultrasparc ultrasparc3
  )
  args=(
    -mapp-regs -mno-app-regs
    -mfpu -mhard-float
    -mno-fpu -msoft-float
    -mhard-quad-float
    -msoft-quad-float
    -mno-unaligned-doubles
    -munaligned-doubles
    -mfaster-structs -mno-faster-structs
    -mimpure-text
    '-mcpu=:CPU type:->arch'
    '-mtune=:CPU type:->arch'
    -mv8plus -mno-v8plus
    -mvis -mno-vis
    -mlittle-endian
    -m32 -m64
    '-mcmodel=:memory model:(medlow medmid medany embmedany)'
    -mstack-bias -mno-stack-bias
    -mv8
    -mcypress -mepilogue -mflat
    -mno-flat
    -mno-epilogue
    -msparclite -msupersparc
    -mmedlow -mmedany
    -mint32 -mint64 -mlong32 -mlong64
  )
  ;;
alpha*)
  args=(
    -mfp-regs -mno-fp-regs -mno-soft-float
    -msoft-float
  )
  ;;
clipper)
  args=(
    -mc300 -mc400
  )
  ;;
h8/300)
  args=(
    -mrelax -mh
  )
  ;;
aarch64)
  args=(
    '-mmark-bti-property[add .note.gnu.property with BTI to assembly files]'
    '-moutline[enable function outlining (AArch64 only)]'
    '-msve-vector-bits=[specify the size in bits of an SVE vector register]:bits'
  )
  ;;
amdgpu)
  args=(
    '-mcumode[specify CU wavefront execution mode]'
    '-mtgsplit[enable threadgroup split execution mode (AMDGPU only)]'
  )
  ;;
hexagon)
  args=(
    '-mieee-rnd-near[ieee rnd near]'
    '-mmemops[enable generation of memop instructions]'
    '-mnvj[enable generation of new-value jumps]'
    '-mnvs[enable generation of new-value stores]'
    '-mpackets[enable generation of instruction packets]'
    '-mhvx[enable Hexagon Vector eXtensions]'
    '-mhvx-length=[set Hexagon Vector Length]:arg'
    '-mhvx=[enable Hexagon Vector eXtensions]:arg'
  )
  ;;
webassembly*)
  args=(
    '-matomics[atomics]'
    '-mbulk-memory[bulk memory]'
    '-mexception-handling[exception handling]'
    '-mmultivalue[multivalue]'
    '-mmutable-globals[mutable globals]'
    '-mnontrapping-fptoint[no ntrapping fptoint]'
    '-mreference-types[reference types]'
    '-msign-ext[sign ext]'
    '-msimd128[simd128]'
    '-mtail-call[tail call]'
    '-munimplemented-simd128[unimplemented simd128]'
    '-mexec-model=[execution model]:arg'
  )
  ;;
riscv)
  args=(
    '-msave-restore[enable using library calls for save and restore]'
  )
  ;;
esac

if [[ "$service" = clang* ]]; then
  args+=(
    '-all_load[undocumented option]'
    '-allowable_client[undocumented option]:argument'
    '--analyzer-no-default-checks[analyzer does no default checks]'
    '--analyzer-output[static analyzer report output format]:format:(html plist plist-multi-file plist-html sarif sarif-html text)'
    '--analyze[run the static analyzer]'
    '-arch[arch]:argument'
    '-arch_errors_fatal[arch errors fatal]'
    '-arch_only[arch only]:argument'
    '-arcmt-migrate-emit-errors[emit ARC errors even if the migrator can fix them]'
    '-arcmt-migrate-report-output[output path for the plist report]:file:_files'
    '-a-[undocumented option]:argument'
    '--autocomplete=[autocomplete]:argument'
    '-bind_at_load[bind at load]'
    '--bootclasspath=[bootclasspath]:arg'
    '-bundle[bundle]'
    '-bundle_loader[bundle loader]:argument'
    '--CLASSPATH=[CLASSPATH]:arg'
    '--classpath=[classpath]:arg'
    '-cl-denorms-are-zero[allow denormals to be flushed to zero]'
    '-cl-fast-relaxed-math[cl fast relaxed math]'
    '-cl-finite-math-only[allow floating-point optimizations]'
    '-cl-fp32-correctly-rounded-divide-sqrt[specify that divide and sqrt are correctly rounded]'
    '-client_name[client name]:argument'
    '-cl-kernel-arg-info[generate kernel argument metadata]'
    '-cl-mad-enable[allow use of less precise MAD computations]'
    '-cl-no-signed-zeros[allow use of no signed zeros computations]'
    '-cl-no-stdinc[disables all standard includes]'
    '-cl-opt-disable[disables all optimizations]'
    '-cl-single-precision-constant[treat double float constant as single precision]'
    '-cl-std=[openCL language standard to compile for]:arg'
    '-cl-strict-aliasing[this option is added for compatibility with OpenCL 1.0]'
    '-cl-uniform-work-group-size[defines that the global work-size be uniform]'
    '-cl-unsafe-math-optimizations[allow unsafe floating-point optimizations]'
    '-compatibility_version[compatibility version]:compatibility version'
    '--config[specifies configuration file]:configuration file:_files'
    '--constant-cfstrings[use constant cfstrings]'
    '--coverage[coverage]'
    '-coverage[coverage]'
    '-cpp[cpp]'
    '--cuda-compile-host-device[compile CUDA code for both host and device]'
    '--cuda-device-only[compile CUDA code for device only]'
    '--cuda-gpu-arch=[cUDA offloading device architecture]:arg'
    '--cuda-host-only[compile CUDA code for host only]'
    '*--cuda-include-ptx=[include ptx for the following gpu architecture]:argument'
    '--cuda-noopt-device-debug[enable device-side debug info generation]'
    '--cuda-path=[cUDA installation path]:arg'
    '--cuda-path-ignore-env[ignore environment variables to detect CUDA installation]'
    '-cuid=[an id for compilation unit]:argument'
    '-current_version[current version]:current version'
    '-cxx-isystem[add directory to the C++ SYSTEM include search path]:directory:_files -/'
    '-dead_strip[dead strip]'
    '-dependency-dot[file to write dot-formatted header dependencies to]:file:_files'
    '-dependency-file[file to write dependency output to]:file:_files'
    '--dyld-prefix=[dyld prefix]:prefix'
    '--dylib_file[dyld file]:file:_files'
    '-dylinker[dylinker]'
    '-dylinker_install_name[dylinker install name]:name'
    '-dynamic[dynamic]'
    '-dynamiclib[dynamic lib]'
    '-EB[big endian]'
    '-EL[little endian]'
    '-emit-ast[emit Clang AST files for source inputs]'
    '-emit-interface-stubs[generate Interface Stub Files]'
    '-emit-llvm[use the LLVM representation for assembler and object files]'
    '-emit-merged-ifs[generate Interface Stub Files, emit merged text not binary]'
    '--emit-static-lib[enable linker job to emit a static library]'
    #'-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang[trivial automatic variable initialization to zero is only here for benchmarks]'
    '--encoding=[encoding]:arg'
    '-exported_symbols_list[exported symbols list]:argument'
    '--extdirs=[extdirs]:arg'
    '--extra-warnings[enable extra warnings]'
    '-faccess-control[access control]'
    '*-F+[add directory to framework search path]:framework directory:_files -/'
    '-faddrsig[emit an address-significance table]'
    '-faggressive-function-elimination[aggressive function elimination]'
    '-falign-commons[align commons]'
    '-faligned-allocation[aligned allocation]'
    '-faligned-new[enable C++17 aligned allocation functions]'
    '-fall-intrinsics[all intrinsics]'
    '-fallow-editor-placeholders[treat editor placeholders as valid source code]'
    '-fallow-unsupported[allow unsupported]'
    '-falternative-parameter-statement[enable the old style PARAMETER statement]'
    '-faltivec[altivec]'
    '-fansi-escape-codes[use ANSI escape codes for diagnostics]'
    "-fapple-kext[use Apple's kernel extensions ABI]"
    '-fapple-link-rtlib[force linking the clang builtins runtime library]'
    '-fapple-pragma-pack[enable Apple GCC-compatible #pragma pack handling]'
    '-fapplication-extension[restrict code to those available for App Extensions]'
    '-fasm-blocks[asm blocks]'
    '-fassume-sane-operator-new[assume sane operator new]'
    '-fast[ast]'
    '-fastcp[astcp]'
    '-fastf[astf]'
    '-fautolink[autolink]'
    '-fautomatic[automatic]'
    '-fauto-profile-accurate[auto profile accurate]'
    '-fauto-profile=[enable sample-based profile guided optimizations]::arg'
    '-fbackslash[change the interpretation of backslashes in string literals]'
    '-fbacktrace[backtrace]'
    '-fbasic-block-sections=[generate labels for each basic block]:arg'
    '-fbinutils-version=[produced object files can use all ELF features supported by this version]:major.minor'
    '-fblas-matmul-limit=[blas matmul limit]:arg'
    '-fblocks[enable the blocks language feature]'
    '-fbootclasspath=[bootclasspath]:arg'
    '-fborland-extensions[accept non-standard constructs supported by the Borland compiler]'
    '-fbracket-depth=[bracket depth]:arg'
    '-fbuild-session-file=[use the last modification time of <file> as the build session timestamp]:file:_files'
    '-fbuild-session-timestamp=[time when the current build session started]:time since Epoch in seconds'
    '-fbuiltin-module-map[load the clang builtins module map file]'
    '-fcaret-diagnostics[show diagnostic messages using a caret]'
    '-fcf-protection=[instrument control-flow architecture protection]::arg (options\: return, branch, full, none)'
    '-fcf-runtime-abi=[cf runtime abi]:arg'
    '-fchar8_t[enable C++ builtin type char8_t]'
    '-fcheck-array-temporaries[check array temporaries]'
    '-fcheck=[check]:arg'
    '-fclang-abi-compat=[attempt to match the ABI of Clang <version>]:version'
    '-fclasspath=[classpath]:arg'
    '-fcoarray=[coarray]:arg'
    '-fcolor-diagnostics[enable colors in diagnostics]'
    '-fcomment-block-commands=[treat each comma separated argument in <arg> as a documentation comment block command]:arg'
    '-fcompile-resource=[compile resource]:arg'
    '-fcomplete-member-pointers[require member pointer base types to be complete if they would be significant under the Microsoft ABI]'
    '-fconstant-cfstrings[constant cfstrings]'
    '-fconstant-string-class=[constant string class]:arg'
    '-fconstexpr-backtrace-limit=[constexpr backtrace limit]:arg'
    '-fconstexpr-depth=[constexpr depth]:arg'
    '-fconstexpr-steps=[constexpr steps]:arg'
    '-fconvergent-functions[assume functions may be convergent]'
    '-fconvert=[convert]:arg'
    '-fcoroutines-ts[enable support for the C++ Coroutines TS]'
    '-fcoverage-compilation-dir=[the compilation directory to embed in the coverage mapping]:arg'
    '-fcoverage-mapping[generate coverage mapping to enable code coverage analysis]'
    '-fcoverage-prefix-map=[remap file source paths in coverage mapping]:arg'
    '-fcrash-diagnostics-dir=[crash diagnostics dir]:arg'
    '-fcray-pointer[cray pointer]'
    '-fcreate-profile[create profile]'
    '-fcs-profile-generate[generate instrumented code to collect context sensitive execution counts]'
    '-fcs-profile-generate=[generate instrumented code to collect context sensitive execution counts]:directory:_files -/'
    '-fc\+\+-static-destructors[c++ static destructors]'
    '-fcuda-approx-transcendentals[use approximate transcendental functions]'
    '-fcuda-flush-denormals-to-zero[flush denormal floating point values to zero in CUDA device mode]'
    '-fcuda-rdc[cuda rdc]'
    '-fcuda-short-ptr[use 32-bit pointers for accessing const/local/shared address spaces]'
    '-fcxx-exceptions[enable C++ exceptions]'
    '-fcxx-modules[cxx modules]'
    '-fdebug-compilation-dir=[the compilation directory to embed in the debug info]:arg'
    '-fdebug-default-version=[default DWARF version to use]:arg'
    '-fdebug-dump-parse-tree[dump the parse tree]'
    '-fdebug-dump-provenance[dump provenance]'
    '-fdebug-dump-symbols[dump symbols after the semantic analysis]'
    '-fdebug-info-for-profiling[emit extra debug info to make sample profile more accurate]'
    '-fdebug-macro[emit macro debug information]'
    '-fdebug-measure-parse-tree[measure the parse tree]'
    '-fdebug-pass-arguments[debug pass arguments]'
    '-fdebug-pass-structure[debug pass structure]'
    '-fdebug-pre-fir-tree[dump the pre-FIR tree]'
    '-fdebug-ranges-base-address[use DWARF base address selection entries in .debug_ranges]'
    '-fdebug-unparse[unparse and stop]'
    '-fdebug-unparse-with-symbols[unparse and stop]'
    '-fdeclspec[allow __declspec as a keyword]'
    '-fdefault-double-8[set the default double precision kind to an 8 byte wide type]'
    '-fdefault-integer-8[set the default integer kind to an 8 byte wide type]'
    '-fdefault-real-8[set the default real kind to an 8 byte wide type]'
    '-fdelayed-template-parsing[parse templated function definitions at the end of the translation unit]'
    '-fdenormal-fp-math=[denormal fp math]:arg'
    '-fdepfile-entry=[depfile entry]:arg'
    '-fdiagnostics-absolute-paths[print absolute paths in diagnostics]'
    '-fdiagnostics-fixit-info[supply fixit into with diagnostic messages]'
    '-fdiagnostics-format=[diagnostics format]:arg'
    '-fdiagnostics-hotness-threshold=[prevent optimization remarks from being output if they do not meet threshold]:value'
    '-fdiagnostics-parseable-fixits[print fixits in a machine parseable form]'
    '-fdiagnostics-print-source-range-info[print source range spans in numeric form]'
    '-fdiagnostics-show-category=[diagnostics show category]:arg'
    '-fdiagnostics-show-hotness[enable profile hotness information in diagnostic line]'
    '-fdiagnostics-show-note-include-stack[display include stacks for diagnostic notes]'
    '-fdiagnostics-show-option[enable -Woption information in diagnostic line]'
    '-fdiagnostics-show-template-tree[print a template comparison tree for differing templates]'
    '-fdigraphs[enable alternative token representations]'
    "-fdirect-access-external-data[don't use GOT indirection to reference external data symbols]"
    '-fdiscard-value-names[discard value names in LLVM IR]'
    '-fd-lines-as-code[d lines as code]'
    '-fd-lines-as-comments[d lines as comments]'
    '-fdollar-ok[dollar ok]'
    '-fdouble-square-bracket-attributes[enable double square bracket attributes]'
    '-fdump-fortran-optimized[dump fortran optimized]'
    '-fdump-fortran-original[dump fortran original]'
    '-fdump-parse-tree[dump parse tree]'
    '-fdwarf-directory-asm[DWARF directory asm]'
    '-fdwarf-exceptions[use DWARF style exceptions]'
    '-felide-constructors[elide constructors]'
    '-felide-type[elide types when printing diagnostics]'
    '-fembed-bitcode=[embed LLVM bitcode (option: off, all, bitcode, marker)]:option'
    '-fembed-bitcode[equivalent to -fembed-bitcode=all]'
    '-fembed-bitcode-marker[equivalent to -fembed-bitcode=marker]'
    '-femit-all-decls[emit all declarations]'
    '-femulated-tls[use emutls functions to access thread_local variables]'
    '-fenable-matrix[enable matrix data type and related builtin functions]'
    '-fencoding=[encoding]:arg'
    '-ferror-limit=[error limit]:arg'
    '-fescaping-block-tail-calls[escaping block tail calls]'
    '-fexperimental-isel[experimental isel]'
    '-fexperimental-new-constant-interpreter[enable the experimental new constant interpreter]'
    '-fexperimental-relative-c\+\+-abi-vtables[use the experimental C++ class ABI for classes with vtables]'
    '-fexperimental-strict-floating-point[enables experimental strict floating point in LLVM]'
    '-fextdirs=[extdirs]:arg'
    '-fexternal-blas[external blas]'
    '-ff2c[f2c]'
    '-ffile-compilation-dir=[the compilation directory to embed in the debug info]:arg'
    '-ffile-prefix-map=[remap file source paths in debug info and predefined preprocessor macros]:arg'
    '-ffine-grained-bitfield-accesses[use separate accesses for consecutive bitfield runs with legal widths and alignments]'
    '-ffinite-loops[assume all loops are finite]'
    '-ffixed-form[process source files in fixed form]'
    '-ffixed-line-length=[set column after which characters are ignored]:arg'
    '-ffixed-point[enable fixed point types]'
    '-fforce-dwarf-frame[always emit a debug frame section]'
    '-fforce-emit-vtables[emits more virtual tables to improve devirtualization]'
    '-fforce-enable-int128[enable support for int128_t type]'
    '-ffor-scope[for scope]'
    '-ffpe-trap=[fpe trap]:arg'
    '-ffp-exception-behavior=[specifies the exception behavior of floating-point operations]:arg'
    '-ffp-model=[controls the semantics of floating-point calculations]:arg'
    '-ffree-form[process source files in free form]'
    '-ffree-line-length-[free line length]:arg'
    '-ffrontend-optimize[frontend optimize]'
    '-fglobal-isel[enables the global instruction selector]'
    '-fgnuc-version=[sets various macros to claim compatibility with the given GCC version]:version'
    '-fgnu-inline-asm[gnu inline asm]'
    '-fgnu-keywords[allow GNU-extension keywords regardless of language standard]'
    '-fgnu-runtime[generate output compatible with the standard GNU Objective-C runtime]'
    '-fgpu-allow-device-init[allow device side init function in HIP]'
    '-fgpu-defer-diag[defer host/device related diagnostic messages for CUDA/HIP]'
    '-fgpu-rdc[generate relocatable device code, also known as separate compilation mode]'
    '-fgpu-sanitize[enable sanitizer for AMDGPU target]'
    '-fheinous-gnu-extensions[heinous GNU extensions]'
    '-fhip-new-launch-api,[-fno-hip-new-launch-api Use new kernel launching API for HIP]'
    '-fhonor-infinites[honor infinites]'
    '-fhonor-infinities[honor infinities]'
    '-fhonor-nans[honor nans]'
    '-fignore-exceptions[enable support for ignoring exception handling constructs]'
    '-filelist[ilelist]:arg'
    '-fimplicit-module-maps[implicit module maps]'
    '-fimplicit-modules[implicit modules]'
    '-fimplicit-none[no implicit typing allowed unless overridden by IMPLICIT statements]'
    '-findirect-virtual-calls[indirect virtual calls]'
    '-finit-character=[init character]:arg'
    '-finit-integer=[init integer]:arg'
    '-finit-local-zero[init local zero]'
    '-finit-logical=[init logical]:arg'
    '-finit-real=[init real]:arg'
    '-finline-hint-functions[inline functions which are (explicitly or implicitly) marked inline]'
    '-finstrument-function-entry-bare[instrument function entry only]'
    '-finstrument-functions-after-inlining[insert the calls after inlining]'
    '-finteger-4-integer-8[integer 4 integer 8]'
    '-fintegrated-as[enable the integrated assembler]'
    '-fintegrated-cc1[run cc1 in-process]'
    '-fintrinsic-modules-path[intrinsic modules path]'
    '-flarge-sizes[use INTEGER(KIND=8) for the result type in size-related intrinsics]'
    '-flat_namespace[flat namespace]'
    '-flegacy-pass-manager[use the legacy pass manager in LLVM]'
    '-flimited-precision=[limited precision]:arg'
    '-flogical-abbreviations[enable logical abbreviations]'
    '-flto=-[generate output files suitable for link time optimization]::style:(full thin)'
    '-flto-jobs=[controls the backend parallelism]:arg'
    '-fmacro-backtrace-limit=[macro backtrace limit]:limit'
    '-fmacro-prefix-map=[remap file source paths in predefined preprocessor macros]:arg'
    '-fmax-array-constructor=[max array constructor]:arg'
    '-fmax-identifier-length[max identifier length]'
    '-fmax-stack-var-size=[max stack var size]:arg'
    '-fmax-subrecord-length=[max subrecord length]:arg'
    '-fmax-tokens=[max total number of preprocessed tokens for -Wmax-tokens]:number'
    '-fmax-type-align=[specify the maximum alignment to enforce on pointers lacking an explicit alignment]:arg'
    '-fmemory-profile=[enable heap memory profiling and dump results into <directory>]::directory:_files -/'
    '-fmodule-file-deps[module file deps]'
    '-fmodule-file=[specify the mapping of module name to precompiled module file]:file:_files'
    '-fmodule-implementation-of[module implementation of]:name'
    '-fmodule-map-file=[load this module map file]:file:_files'
    '-fmodule-maps[implicitly search the file system for module map files.]'
    '-fmodule-name=[specify the name of the module to build]:name'
    '-fmodule-private[module private]'
    '-fmodules-cache-path=[specify the module cache path]:directory:_files -/'
    '-fmodules-decluse[require declaration of modules used within a module]'
    '-fmodules-disable-diagnostic-validation[disable validation of the diagnostic options when loading the module]'
    '-fmodules[enable the modules language feature]'
    '-fmodules-ignore-macro=[ignore the definition of the given macro when building and loading modules]:macro'
    '-fmodules-prune-after=[specify the interval after which a module file will be considered unused]:seconds'
    '-fmodules-prune-interval=[specify the interval between attempts to prune the module cache]:seconds'
    '-fmodules-search-all[search even non-imported modules to resolve references]'
    '-fmodules-strict-decluse[requires all headers to be in modules]'
    '-fmodules-ts[enable support for the C++ Modules TS]'
    '-fmodules-user-build-path[specify the module user build path]:directory:_files -/'
    '-fmodules-validate-input-files-content[validate PCM input files based on content if mtime differs]'
    "-fmodules-validate-once-per-build-session[don't verify input files for the modules]"
    '-fmodules-validate-system-headers[validate the system headers that a module depends on when loading the module]'
    '-fms-compatibility[enable full Microsoft Visual C++ compatibility]'
    '-fms-compatibility-version=[microsoft compiler version number]:arg'
    '-fmsc-version=[microsoft compiler version number to report]:arg'
    '-fms-memptr-rep=[ms memptr rep]:arg'
    '-fms-volatile[ms volatile]'
    '-fnested-functions[nested functions]'
    '-fnew-alignment=[specifies the largest alignment guaranteed]:align'
    '-fnext-runtime[next runtime]'
    '-fno-builtin-[disable implicit builtin knowledge of a specific function]:arg'
    '-fno-crash-diagnostics[disable auto-generation of preprocessed source files and a script for reproduction during a clang crash]'
    '-fno-limit-debug-info[no limit debug info]'
    '-fno-max-type-align[no max type align]'
    '-fno_modules-validate-input-files-content[no modules validate input files content]'
    '-fno_pch-validate-input-files-content[no pch validate input files content]'
    '-fno-strict-modules-decluse[no strict modules decluse]'
    '-fno-temp-file[directly create compilation output files]'
    '-fno-working-directory[no working directory]'
    '-fnoxray-link-deps[no xray link deps]'
    '-fobjc-abi-version=-[set Objective-C ABI version]:version'
    '-fobjc-arc-exceptions[use EH-safe code when synthesizing retains and releases in -fobjc-arc]'
    '-fobjc-arc[synthesize retain and release calls for Objective-C pointers]'
    '-fobjc-convert-messages-to-runtime-calls[convert messages to runtime calls]'
    '-fobjc-encode-cxx-class-template-spec[fully encode C++ class template specialization]'
    '-fobjc-exceptions[enable Objective-C exceptions]'
    '-fobjc-infer-related-result-type[infer related result type]'
    '-fobjc-legacy-dispatch[use legacy dispatch]'
    '-fobjc-link-runtime[set link runtime]'
    '-fobjc-nonfragile-abi[set nonfragile abi]'
    '-fobjc-nonfragile-abi-version=-[set nonfragile abi version]:version'
    '-fobjc-runtime=-[specify the target Objective-C runtime kind and version]:runtime'
    '-fobjc-sender-dependent-dispatch[set sender dependent dispatch]'
    '-fobjc-weak[enable ARC-style weak references in Objective-C]'
    '-fopenmp-targets=[specify comma-separated list of triples OpenMP offloading targets to be supported]:targets'
    '-fopenmp-version=[openmp version]:version'
    '-foperator-arrow-depth=[operator arrow depth]:arg'
    '-foperator-names[treat C++ operator name keywords as synonyms for operators]'
    '-foptimization-record-file=[specify the output name of the file containing the optimization remarks]:file:_files'
    '-foptimization-record-passes=[only include passes which match a specified regex]:regex'
    '-force_cpusubtype_ALL[force cpusubtype all]'
    '-force_flat_namespace[force flat namespace]'
    '--force-link=[force link]:arg'
    '-force_load[force load]:argument'
    '-forder-file-instrumentation[generate instrumented code to collect order file]'
    '-foutput-class-dir=[output class dir]:arg'
    '-fpack-derived[pack derived]'
    '-fparse-all-comments[parse all comments]'
    '-fpascal-strings[recognize and construct Pascal-style string literals]'
    '-fpass-plugin=[load pass plugin from a dynamic shared object file]:dsopath'
    '-fpatchable-function-entry=[generate NOPs around function entry]:N,M'
    '-fpch-codegen[generate code for uses of this PCH]'
    '-fpch-debuginfo[generate debug info for types in an object file built from this PCH]'
    '-fpch-instantiate-templates[instantiate templates already while building a PCH]'
    '-fpch-validate-input-files-content[validate PCH input files based on content]'
    '-fprebuilt-implicit-modules[look up implicit modules]'
    '-fprebuilt-module-path=[specify the prebuilt module path]:directory:_files -/'
    '-fpreserve-as-comments[preserve as comments]'
    '-fproc-stat-report=[save subprocess statistics to the given file]:arg'
    '-fprofile-exclude-files=[exclude files from profile]:arg'
    '-fprofile-filter-files=[filter files for profile]:arg'
    '-fprofile-instr-generate=[generate instrumented profile into file]::file:_files'
    '-fprofile-instr-use=[use instrumentation data for profile-guided optimization]::arg'
    '-fprofile-list=[filename defining the list of items to instrument]:file:_files'
    '-fprofile-remapping-file=[use the remappings described in file in profile]:file:_files'
    '-fprofile-sample-accurate[specifies that the sample profile is accurate]'
    '-fprofile-sample-use=[profile sample use]::arg'
    '-fprofile-update=[set update method of profile counters]:method'
    '-fprotect-parens[protect parens]'
    '-fpseudo-probe-for-profiling[emit pseudo probes for sample profiling]'
    '*-framework[include framework found in search path]:framework:->framework'
    '-frange-check[range check]'
    '-freal-4-real-10[real 4 real 10]'
    '-freal-4-real-16[real 4 real 16]'
    '-freal-4-real-8[real 4 real 8]'
    '-freal-8-real-10[real 8 real 10]'
    '-freal-8-real-16[real 8 real 16]'
    '-freal-8-real-4[real 8 real 4]'
    '-frealloc-lhs[realloc lhs]'
    '-frecord-command-line[record command line]'
    '-frecord-marker=[record marker]:arg'
    '-frecursive[recursive]'
    '-fregister-global-dtors-with-atexit[use atexit to register global destructors]'
    '-frelaxed-template-template-args[enable C++17 relaxed template template argument matching]'
    '-frepack-arrays[repack arrays]'
    '-freroll-loops[turn on loop reroller]'
    '-fretain-comments-from-system-headers[retain comments from system headers]'
    '-frewrite-imports[rewrite imports]'
    '-frewrite-includes[rewrite includes]'
    '-frewrite-map-file=[rewrite map file]:arg'
    '-fropi[generate read-only position independent code (ARM only)]'
    '-frtlib-add-rpath[add -rpath with architecture-specific resource directory to the linker flags]'
    '-frtti-data[rtti data]'
    '-frwpi[generate read-write position independent code (ARM only)]'
    '-fsanitize-address-destructor-kind=[set destructor type used in ASan instrumentation]:kind'
    '-fsanitize-address-field-padding=[level of field padding for AddressSanitizer]:arg'
    '-fsanitize-address-globals-dead-stripping[enable linker dead stripping of globals in AddressSanitizer]'
    '-fsanitize-address-poison-custom-array-cookie[enable poisoning array cookies when using custom operator new in AddressSanitizer]'
    '-fsanitize-address-use-after-scope[enable use-after-scope detection in AddressSanitizer]'
    '-fsanitize-address-use-odr-indicator[enable ODR indicator globals]'
    '-fsanitize-blacklist=[path to blacklist file for sanitizers]:arg'
    '-fsanitize-cfi-canonical-jump-tables[make the jump table addresses canonical in the symbol table]'
    '-fsanitize-cfi-cross-dso[enable control flow integrity (CFI) checks for cross-DSO calls]'
    '-fsanitize-cfi-icall-generalize-pointers[generalize pointers in CFI indirect call type signature checks]'
    '-fsanitize-coverage-allowlist=[sanitize coverage allowlist]:arg'
    '-fsanitize-coverage-blacklist=[disable sanitizer coverage instrumentation]:arg'
    '-fsanitize-coverage-blocklist=[sanitize coverage blocklist]:arg'
    '-fsanitize-coverage=[specify the type of coverage instrumentation for Sanitizers]:arg'
    '-fsanitize-coverage-whitelist=[restrict sanitizer coverage instrumentation]:arg'
    '-fsanitize-hwaddress-abi=[select the HWAddressSanitizer ABI to target]:arg'
    '-fsanitize-link-c\+\+-runtime[sanitize link c++ runtime]'
    '-fsanitize-link-runtime[sanitize link runtime]'
    '-fsanitize-memory-track-origins=[enable origins tracking in MemorySanitizer]::arg'
    '-fsanitize-memory-use-after-dtor[enable use-after-destroy detection in MemorySanitizer]'
    '-fsanitize-minimal-runtime[sanitize minimal runtime]'
    '-fsanitize-recover=[enable recovery for specified sanitizers]::arg'
    '-fsanitize-stats[enable sanitizer statistics gathering]'
    '-fsanitize-system-blacklist[path to system blacklist file for sanitizers]:file:_files'
    '-fsanitize-thread-atomics[enable atomic operations instrumentation in ThreadSanitizer (default)]'
    '-fsanitize-thread-func-entry-exit[enable function entry/exit instrumentation in ThreadSanitizer]'
    '-fsanitize-thread-memory-access[enable memory access instrumentation in ThreadSanitizer]'
    '-fsanitize-trap=[enable trapping for specified sanitizers]::arg'
    '-fsanitize-undefined-strip-path-components=[strip a given number of path components when emitting check metadata]:number'
    '-fsanitize-undefined-trap-on-error[equivalent to -fsanitize-trap=undefined]'
    '-fsave-optimization-record=[generate an optimization record file in a specific format]::format'
    '-fsecond-underscore[second underscore]'
    '-fseh-exceptions[use SEH style exceptions]'
    '-fsemantic-interposition[semantic interposition]'
    '-fshow-column[show the column]'
    '-fshow-overloads=[which overload candidates to show when overload resolution fails]:arg'
    '-fshow-source-location[show source location]'
    '-fsignaling-math[signaling math]'
    '-fsign-zero[sign zero]'
    '-fsized-deallocation[enable C++14 sized global deallocation functions]'
    '-fsjlj-exceptions[use SjLj style exceptions]'
    '-fslp-vectorize[enable the superword-level parallelism vectorization passes]'
    '-fspell-checking-limit=[spell checking limit]:arg'
    '-fspell-checking[spell checking]'
    '-fsplit-dwarf-inlining[provide minimal debug info in the object]'
    '-fsplit-lto-unit[enables splitting of the LTO unit]'
    '-fsplit-machine-functions[enable late function splitting using profile information]'
    '-fstack-arrays[stack arrays]'
    '-fstack-clash-protection[enable stack clash protection]'
    '-fstack-size-section[emit section containing metadata on function stack sizes]'
    '-fstandalone-debug[emit full debug info for all types used by the program]'
    '-fstrict-float-cast-overflow[assume that overflowing float-to-int casts are undefined]'
    '-fstrict-return[strict return]'
    '-fstrict-vtable-pointers[enable optimizations based on the strict vtables]'
    '-fstruct-path-tbaa[struct path tbaa]'
    '-fsycl[enable SYCL kernels compilation for device]'
    '-fsymbol-partition=[symbol partition]:arg'
    '-fsystem-module[build this module as a system module. only used with -emit-module]'
    '-ftemplate-backtrace-limit=[template backtrace limit]:arg'
    '-ftemplate-depth--[template depth]:arg'
    '-ftemplate-depth=[template depth]:arg'
    '-fterminated-vtables[terminated vtables]'
    '-fthin-link-bitcode=[write minimized bitcode to <file>]:file:_files'
    '-fthinlto-index=[perform ThinLTO importing using provided index]:arg'
    '-fthreadsafe-statics[threadsafe statics]'
    '-ftime-trace-granularity=[minimum time granularity traced by time profiler]:microseconds'
    '-ftime-trace[turn on time profiler]'
    '-ftrap-function=[issue call to specified function rather than a trap instruction]:function name'
    '-ftrapv-handler=[specify the function to be called on overflow]:function name'
    '-ftrigraphs[process trigraph sequences]'
    '-ftrivial-auto-var-init=[initialize trivial automatic stack variables]:arg'
    '-ftrivial-auto-var-init-stop-after=[stop initializing trivial automatic stack variables after the specified number of instances]:arg'
    '-funderscoring[underscoring]'
    '-funique-basic-block-section-names[use unique names for basic block sections]'
    '-funique-internal-linkage-names[uniqueify Internal Linkage Symbol Names]'
    '-funique-section-names[unique section names]'
    '-funit-at-a-time[unit at a time]'
    '-fuse-cuid=[method to generate ids for compilation units for single source offloading languages CUDA and HIP]:argument'
    '-fuse-cxa-atexit[use cxa atexit]'
    '-fuse-init-array[use init array]'
    '-fuse-line-directives[use #line in preprocessed output]'
    '-fvalidate-ast-input-files-content[compute and store the hash of input files used to build an AST]'
    '-fveclib=[use the given vector functions library]:arg'
    '-fvectorize[enable the loop vectorization passes]'
    '-fvirtual-function-elimination[enables dead virtual function elimination optimization]'
    '-fvisibility-dllexport=[the visibility for dllexport defintions]:arg'
    '-fvisibility-externs-dllimport=[the visibility for dllimport external declarations]:arg'
    '-fvisibility-externs-nodllstorageclass=[the visibility for external declarations without an explicit DLL dllstorageclass]:arg'
    '-fvisibility-from-dllstorageclass[set the visiblity of symbols in the generated code from their DLL storage class]'
    '-fvisibility-global-new-delete-hidden[give global C++ operator new and delete declarations hidden visibility]'
    '-fvisibility-inlines-hidden[give inline C++ member functions hidden visibility by default]'
    '-fvisibility-inlines-hidden-static-local-var[visibility inlines hidden static local var]'
    '-fvisibility-ms-compat[give global types and functions a specific visibility]'
    '-fvisibility-nodllstorageclass=[the visibility for defintiions without an explicit DLL export class]:arg'
    '-fwasm-exceptions[use WebAssembly style exceptions]'
    '-fwhole-file[whole file]'
    '-fwhole-program-vtables[enables whole-program vtable optimization]'
    '-fwritable-strings[store string literals as writable data]'
    '-fxl-pragma-pack[enable IBM XL #pragma pack handling]'
    '-fxor-operator[enable .XOR. as a synonym of .NEQV.]'
    '-fxray-always-emit-customevents[always emit xray customevent calls]'
    '-fxray-always-emit-typedevents[always emit xray typedevents calls]'
    '-fxray-always-instrument=[file defining xray always instrument]:file:_files'
    '-fxray-attr-list=[file defining the list of xray attributes]:file:_files'
    '-fxray-function-groups=[only instrument 1 of N groups]:arg'
    '-fxray-function-index[xray function index]'
    "-fxray-ignore-loops[don't instrument functions with loops unless they also meet the minimum function size]"
    '-fxray-instruction-threshold=[sets the minimum function size to instrument with XRay]:arg'
    '-fxray-instrumentation-bundle=[select which XRay instrumentation points to emit]:arg'
    '-fxray-instrument[generate XRay instrumentation sleds on function entry and exit]'
    '-fxray-link-deps[tells clang to add the link dependencies for XRay]'
    '-fxray-modes=[list of modes to link in by default into XRay instrumented binaries]:arg'
    '-fxray-never-instrument=[file defining the whitelist for Xray attributes]:file:_files'
    '-fxray-selected-function-group=[select which group of functions to instrument]:arg'
    '-fzvector[enable System z vector language extension]'
    {-gcc-toolchain=,--gcc-toolchain=}'[use the gcc toolchain at the given directory]:directory:_files -/'
    '-gcodeview[generate CodeView debug information]'
    {-gcodeview-ghash,-gno-codeview-ghash}'[emit type record hashes is a .debug section]'
    '-gcolumn-info[column info]'
    '-gdwarf-aranges[DWARF aranges]'
    '-gembed-source[embed source text in DWARF debug sections]'
    '-gfull[emit debugging information for all symbols and types]'
    {-G-,-G=-,-msmall-data-limit=,-msmall-data-threshold}'[put objects of at most size bytes into small data section]:size'
    '-ggnu-pubnames[gnu pubnames]'
    '-ginline-line-tables[inline line tables]'
    '-gline-directives-only[emit debug line info directives only]'
    '-gline-tables-only[line tables only]'
    '-glldb[lldb]'
    '-gmlt[emit debug line number tables only]'
    '-gmodules[generate debug info with external references]'
    '-gno-column-info[no column info]'
    '-gno-embed-source[no embed source]'
    '-gno-gnu-pubnames[no gnu pubnames]'
    '-gno-inline-line-tables[no inline line tables]'
    '-gno-record-command-line[no record command line]'
    '--gpu-instrument-lib=[instrument device library for HIP]:argument'
    '--gpu-max-threads-per-block=[default max threads per block for kernel launch bounds for HIP]'
    '-grecord-command-line[record command line]'
    '-gsce[sce]'
    '-gused[emit debugging information for symbols that are used]'
    '-gz=[DWARF debug sections compression type]::arg'
    '-headerpad_max_install_names[headerpad max install names]:argument'
    '-help[display this information]'
    '--help-hidden[display help for hidden options]'
    '--hip-device-lib=[hIP device library]:arg'
    '--hip-device-lib-path=[hip device lib path]:arg'
    '--hip-link[link clang-offload-bundler bundles for HIP]'
    '--hip-version=[HIP version in the format of major.minor.patch]'
    '-ibuiltininc[enable builtin #include directories even when -nostdinc is used before or after -ibuiltininc]'
    '-iframework[add directory to SYSTEM framework search path]:directory:_files -/'
    '-iframeworkwithsysroot[add directory to SYSTEM framework search path, absolute paths are relative to -isysroot]:directory:_files -/'
    '-image_base[image base]:argument'
    '-include-pch[include precompiled header file]:file:_files'
    '-index-header-map[make the next included directory (-I or -F) an indexer header map]'
    '-init[init]:arg'
    '-install_name[install name]:arg'
    '-integrated-as[integrated as]'
    '-interface-stub-version=[interface stub version]:arg'
    '-isystem-after[add directory to end of the SYSTEM include search path]:directory:_files -/'
    '-ivfsoverlay[overlay the virtual filesystem described by file over the real file system]:arg'
    '-iwithsysroot[add directory to SYSTEM include search path]:directory:_files -/'
    '-J[this option specifies where to put .mod files for compiled modules]:arg'
    '-keep_private_externs[keep private externs]'
    '*-lazy_framework[lazy framework]:framework:->framework'
    '*-lazy_library[lazy library]:arg'
    '--ld-path=[ld path]:arg'
    '--libomptarget-amdgcn-bc-path=[path to libomptarget-amdgcn bitcode library]:arg'
    '--libomptarget-nvptx-bc-path=[path to libomptarget-nvptx bitcode library]:arg'
    '--library-directory=[add directory to library search path]:directory:_files -/'
    '-maix-struct-return[return all structs in memory]'
    "-malign-branch-boundary=[specify the boundary's size to align branches]:size"
    '-malign-branch=[specify types of branches to align]:arg'
    '-mappletvos-version-min=[appletvos version min]:arg'
    '-mappletvsimulator-version-min=[appletvsimulator version min]:arg'
    '-mbackchain[link stack frames through backchain on System Z]'
    '-mbig-endian[big endian]'
    '-mbranches-within-32B-boundaries[align selected branches within 32-byte boundary]'
    '-mbranch-protection=[enforce targets of indirect branches and function returns]:arg'
    '-mcode-object-v3[legacy option to specify code object ABI V3]'
    '-mcode-object-version=[specify code object ABI version]:version'
    '-mconsole[console]:arg'
    '-mcrc[allow use of CRC instructions]'
    '-mdefault-build-attributes[default build attributes]:arg'
    '-mdll[dll]:arg'
    '-mdouble=[force double to be 32 bits or 64 bits]:arg'
    '-mdynamic-no-pic[dynamic no pic]:arg'
    '-meabi[set EABI type]:arg'
    '-menable-experimental-extensions[enable use of experimental RISC-V extensions]'
    '-menable-unsafe-fp-math[allow unsafe floating-point math optimizations which may decrease precision]'
    '-mfix-cortex-a53-835769[workaround Cortex-A53 erratum 835769]'
    '-mfloat-abi=[float abi]:arg'
    '-mfpu=[fpu]:arg'
    '-mglobal-merge[enable merging of globals]'
    '-mharden-sls=[select straight-line speculation hardening scope]:arg'
    '--mhwdiv=[hwdiv]:arg'
    '-mhwdiv=[hwdiv]:arg'
    '-mhwmult=[hwmult]:arg'
    '-mignore-xcoff-visibility[do not emit the visibility attribute for asm]'
    '--migrate[run the migrator]'
    '-mimplicit-float[implicit float]'
    '-mimplicit-it=[implicit it]:arg'
    '-mincremental-linker-compatible[emit an object file which can be used with an incremental linker]'
    '-mios-simulator-version-min=[ios simulator version min]:arg'
    '-mios-version-min=[ios version min]:arg'
    '-miphoneos-version-min=[iphoneos version min]:arg'
    '-miphonesimulator-version-min=[iphonesimulator version min]:arg'
    '-mkernel[kernel]'
    '-mlinker-version=[linker version]:arg'
    '-mlittle-endian[little endian]'
    "-mllvm[additional arguments to forward to LLVM's option processing]:arg"
    '-mlong-calls[generate branches with extended addressability]'
    '-mlvi-cfi[enable only control-flow mitigations for Load Value Injection]'
    '-mlvi-hardening[enable all mitigations for Load Value Injection]'
    '-mmacos-version-min=[set Mac OS X deployment target]:arg'
    '-mmacosx-version-min=[macosx version min]:arg'
    '-mmcu=[mcu]:arg'
    '-module-dependency-dir[directory to dump module dependencies to]:arg'
    '-module-dir[odule dir]:dir'
    '-module-file-info[provide information about a particular module file]'
    '-moslib=[oslib]:arg'
    '-moutline-atomics[generate local calls to out-of-line atomic operations]'
    '-mpacked-stack[use packed stack layout]'
    '-mpad-max-prefix-size=[specify maximum number of prefixes to use for padding]:arg'
    '-mpie-copy-relocations[pie copy relocations]'
    '-mprefer-vector-width=[specifies preferred vector width]:arg'
    '-mqdsp6-compat[enable hexagon-qdsp6 backward compatibility]'
    '-mrelax-all[relax all machine instructions]'
    '-mrelax[enable linker relaxation]'
    '-mretpoline[retpoline]'
    '-mseses[enable speculative execution side effect suppression (SESES)]'
    '-msign-return-address=[select return address signing scope]:arg'
    '-msim[sim]'
    '-mspeculative-load-hardening[speculative load hardening]'
    '-mstack-alignment=[set the stack alignment]:arg'
    '-mstack-probe-size=[set the stack probe size]:size'
    '-mstack-protector-guard-offset=[use the given offset for addressing the stack-protector guard]:arg'
    '-mstack-protector-guard-reg=[use the given reg for addressing the stack-protector guard]:reg'
    '-msvr4-struct-return[return small structs in registers]'
    '-mthread-model[the thread model to use]:arg'
    '-mthumb[thumb]'
    '-mtls-size=[specify bit size of immediate TLS offsets]:arg'
    '-mtvos-simulator-version-min=[tvos simulator version min]:arg'
    '-mtvos-version-min=[tvos version min]:arg'
    '-multi_module[multi module]'
    '-multiply_defined[multiply defined]:arg'
    '-multiply_defined_unused[multiply defined unused]:arg'
    '-municode[unicode]:arg'
    '-munsafe-fp-atomics[enable unsafe floating point atomic instructions]'
    '-mv55[equivalent to -mcpu=hexagonv55]'
    '-mv5[equivalent to -mcpu=hexagonv5]'
    '-mv60[equivalent to -mcpu=hexagonv60]'
    '-mv62[equivalent to -mcpu=hexagonv62]'
    '-mv65[equivalent to -mcpu=hexagonv65]'
    '-mv66[equivalent to -mcpu=hexagonv66]'
    '-mv67[equivalent to -mcpu=hexagonv67]'
    '-mv67t[equivalent to -mcpu=hexagonv67t]'
    '-mv68[equivalent to -mcpu=hexagonv68]'
    '-mvx[vx]'
    '-mwarn-nonportable-cfstrings[warn nonportable cfstrings]'
    '-mwatchos-simulator-version-min=[watchos simulator version min]:arg'
    '-mwatchos-version-min=[watchos version min]:arg'
    '-mwatchsimulator-version-min=[watchsimulator version min]:arg'
    '-mwavefrontsize64[specify wavefront size 64 mode]'
    '-mwindows[windows]:arg'
    '-mzvector[zvector]'
    '-nobuiltininc[do not search builtin directory for include files]'
    '-nocpp[no cpp]'
    '-nocudainc[do not add include paths for CUDA/HIP and do not include the default CUDA/HIP wrapper headers]'
    '*--no-cuda-include-ptx=[do not include ptx for the following gpu architecture]:argument'
    '-nocudalib[do not link device library for CUDA/HIP device compilation]'
    '--no-cuda-noopt-device-debug[disable device-side debug info generation]'
    "--no-cuda-version-check[don't error out if the detected version of the CUDA install is too low for the requested CUDA gpu architecture]"
    '-no_dead_strip_inits_and_terms[no dead strip inits and terms]'
    '-nofixprebinding[no fixprebinding]'
    '-nogpuinc[no gpuinc]'
    '-nogpulib[no gpulib]'
    '--no-integrated-cpp[no integrated cpp]'
    '-no-integrated-cpp[no integrated cpp]'
    '-nolibc[no libc]'
    '-nomultidefs[no multidefs]'
    '--no-offload-arch=[no offload arch]:arg'
    '-no-pie[no pie]'
    '-nopie[no pie]'
    '-noprebind[no prebind]'
    '-noprofilelib[no profilelib]'
    '-no-pthread[no pthread]'
    '-noseglinkedit[no seglinkedit]'
    '--no-standard-libraries[no standard libraries]'
    '-nostdinc\+\+[disable standard #include directories for the C++ standard library]'
    '-nostdlibinc[do not search standard system directories for include files]'
    '-nostdlib\+\+[no stdlib++]'
    '--no-system-header-prefix=[no system header prefix]:prefix'
    '--no-undefined[no undefined]'
    '-objcmt-atomic-property[make migration to atomic properties]'
    '-objcmt-migrate-all[enable migration to modern ObjC]'
    '-objcmt-migrate-annotation[enable migration to property and method annotations]'
    '-objcmt-migrate-designated-init[enable migration to infer NS_DESIGNATED_INITIALIZER for initializer methods]'
    '-objcmt-migrate-instancetype[enable migration to infer instancetype for method result type]'
    '-objcmt-migrate-literals[enable migration to modern ObjC literals]'
    '-objcmt-migrate-ns-macros[enable migration to NS_ENUM/NS_OPTIONS macros]'
    '-objcmt-migrate-property-dot-syntax[enable migration of setter/getter messages to property-dot syntax]'
    '-objcmt-migrate-property[enable migration to modern ObjC property]'
    '-objcmt-migrate-protocol-conformance[enable migration to add protocol conformance on classes]'
    '-objcmt-migrate-readonly-property[enable migration to modern ObjC readonly property]'
    '-objcmt-migrate-readwrite-property[enable migration to modern ObjC readwrite property]'
    '-objcmt-migrate-subscripting[enable migration to modern ObjC subscripting]'
    "-objcmt-ns-nonatomic-iosonly[enable migration to use NS_NONATOMIC_IOSONLY macro for setting property's atomic attribute]"
    '-objcmt-returns-innerpointer-property[enable migration to annotate property with NS_RETURNS_INNER_POINTER]'
    '-objcmt-whitelist-dir-path=[objcmt whitelist dir path]:arg'
    '-objcmt-white-list-dir-path=[only modify files with a filename contained in the provided directory path]:arg'
    '-ObjC[treat source files as Objective-C]'
    '-ObjC\+\+[treat source files as Objective-C++]'
    '-object[object]'
    '--offload-arch=[offload arch]:arg'
    '--output-class-directory=[output class directory]:arg'
    '-pagezero_size[pagezero size]:arg'
    '-pg[enable mcount instrumentation]'
    {-p,--profile}'[enable function profiling for prof]'
    '-prebind_all_twolevel_modules[prebind all twolevel modules]'
    '-prebind[prebind]'
    '--precompile[only precompile the input]'
    '-preload[preload]'
    '--print-diagnostic-categories[print diagnostic categories]'
    '-print-effective-triple[print effective triple]'
    '--print-effective-triple[print the effective target triple]'
    '--print-file-name=[print the full library path of <file>]:file:_files'
    '-print-ivar-layout[enable Objective-C Ivar layout bitmap print trace]'
    '--print-libgcc-file-name[print the library path for the currently used compiler runtime library]'
    '--print-multi-directory[print multi directory]'
    '--print-multi-lib[print multi lib]'
    '--print-prog-name=[print the full program path of <name>]:name'
    '-print-resource-dir[print resource dir]'
    '--print-resource-dir[print the resource directory pathname]'
    '--print-search-dirs[print the paths used for finding libraries and programs]'
    '--print-supported-cpus[print supported cpus]'
    '-print-supported-cpus[print supported cpus]'
    '-print-targets[print targets]'
    '--print-targets[print the registered targets]'
    '-print-target-triple[print target triple]'
    '--print-target-triple[print the normalized target triple]'
    '-private_bundle[private bundle]'
    '--profile-blocks[undocumented option]'
    '-pthreads[pthreads]'
    '-pthread[support POSIX threads in generated code]'
    '--ptxas-path=[path to ptxas (used for compiling CUDA code)]:arg'
    "-Qunused-arguments[don't emit warning for unused driver arguments]"
    '-read_only_relocs[read only relocs]:arg'
    '-relocatable-pch[relocatable pch]'
    '--relocatable-pch[whether to build a relocatable precompiled header]'
    '-R[enable the specified remark]:remark'
    '--resource=[resource]:arg'
    '-rewrite-legacy-objc[rewrite Legacy Objective-C source to C++]'
    '-rewrite-objc[rewrite Objective-C source to C++]'
    '--rocm-device-lib-path=[rOCm device library path]:arg'
    '--rocm-path=[rOCm installation path]:arg'
    '-Rpass-analysis=[report transformation analysis from optimization passes]:regex'
    '-Rpass-missed=[report missed transformations by optimization passes]:arg'
    '-Rpass=[report transformations performed by optimization passes]:arg'
    '-rpath[rpath]:arg'
    '-r[product a relocatable object as output]'
    '--rtlib=[compiler runtime library to use]:arg'
    '-rtlib=[rtlib]:arg'
    '--save-stats=[save llvm statistics]:arg'
    '-sectalign[sectalign]:arg'
    '-sectcreate[sectcreate]:arg'
    '-sectobjectsymbols[sectobjectsymbols]:arg'
    '-sectorder[sectorder]:arg'
    '-seg1addr[seg1addr]:arg'
    '-segaddr[segaddr]:arg'
    '-seg_addr_table_filename[seg addr table filename]:arg'
    '-seg_addr_table[seg addr table]:arg'
    '-segcreate[segcreate]:arg'
    '-seglinkedit[seglinkedit]'
    '-segprot[segprot]:arg'
    '-segs_read_only_addr[segs read only addr]:arg'
    '-segs_read_[segs read]:arg'
    '-segs_read_write_addr[segs read write addr]:arg'
    '--serialize-diagnostics[serialize compiler diagnostics to a file]:arg'
    '-serialize-diagnostics[serialize diagnostics]:arg'
    '-shared-libasan[dynamically link the sanitizer runtime]'
    '-shared-libsan[shared libsan]'
    '--shared[shared]'
    '--signed-char[signed char]'
    '-single_module[single module]'
    '--specs=[specs]:arg'
    '-static-libgfortran[static libgfortran]'
    '-static-libsan[statically link the sanitizer runtime]'
    '-static-libstdc\+\+[static libstdc++]'
    '-static-openmp[use the static host OpenMP runtime while linking.]'
    '-static-pie[static pie]'
    '--static[static]'
    '-std-default=[std default]:arg'
    '--stdlib=[c++ standard library to use]:arg'
    '-stdlib\+\+-isystem[use directory as the C++ standard library include path]:directory:_files -/'
    '-stdlib=[stdlib]:arg'
    '-sub_library[sub library]:arg'
    '-sub_umbrella[sub umbrella]:arg'
    '-sycl-std=[SYCL language standard to compile for]:standard'
    '--system-header-prefix=[treat all #include paths starting with <prefix> as including a system header]:prefix'
    '-target[generate code for the given target]:arg'
    '--target=[target]:arg'
    '-Tbss[set starting address of BSS to <addr>]:addr'
    '-Tdata[set starting address of DATA to <addr>]:addr'
    '--traditional[traditional]'
    '-traditional[traditional]'
    '-Ttext[set starting address of TEXT to <addr>]:addr'
    '-t[undocumented option]'
    '-twolevel_namespace_hints[twolevel namespace hints]'
    '-twolevel_namespace[twolevel namespace]'
    '-umbrella[umbrella]:arg'
    '-undefined[undefined]:arg'
    '-unexported_symbols_list[unexported symbols list]:arg'
    '--unsigned-char[unsigned char]'
    '--unwindlib=[unwind library to use]:arg'
    '-unwindlib=[unwindlib]:arg'
    '--verify-debug-info[verify the binary representation of debug output]'
    '-verify-pch[load and verify that a pre-compiled header file is not stale]'
    '--warn-=-[enable the specified warning]:warning:->warning'
    '*-weak_framework[weak framework]:framework:->framework'
    '*-weak_library[weak library]:arg'
    '-weak-l[weak l]:arg'
    '-weak_reference_mismatches[weak reference mismatches]:arg'
    '-whatsloaded[whatsloaded]'
    '-whyload[whyload]'
    '-working-directory=[resolve file paths relative to the specified directory]:arg'
    '-Xanalyzer[pass <arg> to the static analyzer]:arg'
    '-Xarch_device[pass arg to CUDA/HIP device compilation]:argument'
    '-Xarch_host[pass arg to CUDA/HIP host compilation]:argument'
    '-Xclang[pass <arg> to the clang compiler]:arg'
    '-Xcuda-fatbinary[pass arg to fatbinary invocation]:argument'
    '-Xcuda-ptxas[pass arg to the ptxas assemler]:argument'
    '-Xflang[pass <arg> to the flang compiler]:arg'
    '-Xopenmp-target[pass arg to the the target offloading toolchain]:argument'
    '-y[the action to perform on the input]:arg'
    '-Z-[undocumented option]:argument'
  )
else
  args+=(
    '--dump=[dump information]:argument'
    '-flto=-[enable link-time optimization]::jobs:'
    '*--help=-[display this information]:class:->help'
  )
fi

local -a sanitizers
sanitizers=(
  address alignment bool bounds enum float-cast-overflow float-divide-by-zero
  integer-divide-by-zero memory nonnull-attribute null nullability-arg
  nullability-assign nullability-return object-size pointer-overflow return
  unsigned-integer-overflow returns-nonnull-attribute shift signed-integer-overflow
  unreachable vla-bound vptr
)

local -a languages
languages=(
  c c-header cpp-output c++ c++-header c++-cpp-output objective-c objective-c-header
  objective-c-cpp-output objective-c++ objective-c++-header objective-c++-cpp-output
  assembler assembler-with-cpp ada f77 f77-cpp-input f95 f95-cpp-input go java
  brig none
)

# warnings (from --help=warnings), note some -W options are listed by --help=common instead
warnings+=(
  '-Wabi-tag[warn if a subobject has an abi_tag attribute that the complete object type does not have]'
  '-Wabi[warn about things that will change when compiling with an ABI-compliant compiler]::'
  '-Waddress[warn about suspicious uses of memory addresses]'
  '-Waggregate-return[warn about returning structures, unions or arrays]'
  '-Waggressive-loop-optimizations[warn if a loop with constant number of iterations triggers undefined behavior]'
  '-Waliasing[warn about possible aliasing of dummy arguments]'
  '-Walign-commons[warn about alignment of COMMON blocks]'
  '-Waligned-new=[warn even if '\'new\'' uses a class member allocation function]:none|global|all: '
  '-Wall[enable most warning messages]'
  '-Walloca-larger-than=[warn on unbounded uses of alloca, and on bounded uses of alloca whose bound can be larger than <number> bytes]:bytes: '
  '-Walloca[warn on any use of alloca]'
  '-Walloc-size-larger-than=[warn for calls to allocation functions that attempt to allocate objects larger than the specified number of bytes]:bytes: '
  '-Walloc-zero[warn for calls to allocation functions that specify zero bytes]'
  '-Wampersand[warn about missing ampersand in continued character constants]'
  '-Wargument-mismatch[warn about type and rank mismatches between arguments and parameters]'
  '-Warray-bounds[warn if an array is accessed out of bounds]'
  '-Warray-bounds=[warn if an array is accessed out of bounds]:level:(1 2)'
  '-Warray-temporaries[warn about creation of array temporaries]'
  '-Wassign-intercept[warn whenever an Objective-C assignment is being intercepted by the garbage collector]'
  '-Wattributes[warn about inappropriate attribute usage]'
  '-Wbad-function-cast[warn about casting functions to incompatible types]'
  '-Wbool-compare[warn about boolean expression compared with an integer value different from true/false]'
  '-Wbool-operation[warn about certain operations on boolean expressions]'
  '-Wbuiltin-declaration-mismatch[warn when a built-in function is declared with the wrong signature]'
  '-Wbuiltin-macro-redefined[warn when a built-in preprocessor macro is undefined or redefined]'
  '-Wc++0x-compat[deprecated in favor of -Wc++11-compat]'
  '-Wc++11-compat[warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 2011]'
  '-Wc++14-compat[warn about C++ constructs whose meaning differs between ISO C++ 2011 and ISO C++ 2014]'
  '-Wc++1z-compat[warn about C++ constructs whose meaning differs between ISO C++ 2014 and (forthcoming) ISO C++ 201z(7?)]'
  '-Wc90-c99-compat[warn about features not present in ISO C90, but present in ISO C99]'
  '-Wc99-c11-compat[warn about features not present in ISO C99, but present in ISO C11]'
  '-Wcast-align[warn about pointer casts which increase alignment]'
  '-Wcast-qual[warn about casts which discard qualifiers]'
  '-Wc-binding-type[warn if the type of a variable might be not interoperable with C]'
  '-Wc++-compat[warn about C constructs that are not in the common subset of C and C++]'
  '-Wcharacter-truncation[warn about truncated character expressions]'
  '-Wchar-subscripts[warn about subscripts whose type is "char"]'
  '-Wchkp[warn about memory access errors found by Pointer Bounds Checker]'
  '-Wclobbered[warn about variables that might be changed by "longjmp" or "vfork"]'
  '-Wcomments[synonym for -Wcomment]'
  '-Wcomment[warn about possibly nested block comments, and C++ comments spanning more than one physical line]'
  '-Wcompare-reals[warn about equality comparisons involving REAL or COMPLEX expressions]'
  '-Wconditionally-supported[warn for conditionally-supported constructs]'
  '-Wconversion-extra[warn about most implicit conversions]'
  '-Wconversion-null[warn for converting NULL from/to a non-pointer type]'
  '-Wconversion[warn for implicit type conversions that may change a value]'
  '-Wcoverage-mismatch[warn in case profiles in -fprofile-use do not match]'
  '-Wcpp[warn when a #warning directive is encountered]'
  '-Wctor-dtor-privacy[warn when all constructors and destructors are private]'
  '-Wdangling-else[warn about dangling else]'
  '-Wdate-time[warn about __TIME__, __DATE__ and __TIMESTAMP__ usage]'
  '-Wdeclaration-after-statement[warn when a declaration is found after a statement]'
  '-Wdelete-incomplete[warn when deleting a pointer to incomplete type]'
  '-Wdelete-non-virtual-dtor[warn about deleting polymorphic objects with non- virtual destructors]'
  '-Wdeprecated-declarations[warn about uses of __attribute__((deprecated)) declarations]'
  '-Wdeprecated[warn if a deprecated compiler feature, class, method, or field is used]'
  '-Wdesignated-init[warn about positional initialization of structs requiring designated initializers]'
  '-Wdisabled-optimization[warn when an optimization pass is disabled]'
  '-Wdiscarded-array-qualifiers[warn if qualifiers on arrays which are pointer targets are discarded]'
  '-Wdiscarded-qualifiers[warn if type qualifiers on pointers are discarded]'
  '-Wdiv-by-zero[warn about compile-time integer division by zero]'
  '-Wdouble-promotion[warn about implicit conversions from "float" to "double"]'
  '-Wduplicated-branches[warn about duplicated branches in if-else statements]'
  '-Wduplicated-cond[warn about duplicated conditions in an if-else-if chain]'
  '-Wduplicate-decl-specifier[warn when a declaration has duplicate const, volatile, restrict or _Atomic specifier]'
  '-Weffc\+\+[warn about violations of Effective C++ style rules]'
  '-Wempty-body[warn about an empty body in an if or else statement]'
  '-Wendif-labels[warn about stray tokens after #else and #endif]'
  '-Wenum-compare[warn about comparison of different enum types]'
  # '-Werror-implicit-function-declaration[this switch is deprecated; use -Werror=implicit-fun]' # this still exists but makes completing -Werror= less convenient
  '-Wexpansion-to-defined[warn if "defined" is used outside #if]'
  '-Wextra[print extra (possibly unwanted) warnings]'
  '-Wfloat-conversion[warn for implicit type conversions that cause loss of floating point precision]'
  '-Wfloat-equal[warn if testing floating point numbers for equality]'
  '-Wformat-contains-nul[warn about format strings that contain NUL bytes]'
  '-Wformat-extra-args[warn if passing too many arguments to a function for its format string]'
  '-Wformat-nonliteral[warn about format strings that are not literals]'
  '-Wformat-overflow[warn about function calls with format strings that write past the end of the destination region]'
  '-Wformat-overflow=[warn about function calls with format strings that write past the end of the destination region]:level:(1 2)'
  '-Wformat-security[warn about possible security problems with format functions]'
  '-Wformat-signedness[warn about sign differences with format functions]'
  '-Wformat-truncation[warn about calls to snprintf and similar functions that truncate output. Same as -Wformat- truncation=1.  Same as -Wformat-truncation=]'
  '-Wformat-truncation=[warn about calls to snprintf and similar functions that truncate output]:level:(1 2)'
  '-Wformat=[warn about printf/scanf/strftime/strfmon format string anomalies]::level:(1 2)'
  '-Wformat-y2k[warn about strftime formats yielding 2-digit years]'
  '-Wformat-zero-length[warn about zero-length formats]'
  '-Wframe-address[warn when __builtin_frame_address or __builtin_return_address is used unsafely]'
  '-Wframe-larger-than=[warn if a function'\''s stack frame requires more than <number> bytes]:bytes: '
  '-Wfree-nonheap-object[warn when attempting to free a non-heap object]'
  '-Wfunction-elimination[warn about function call elimination]'
  '-Whsa[warn when a function cannot be expanded to HSAIL]'
  '-Wignored-attributes[warn whenever attributes are ignored]'
  '-Wignored-qualifiers[warn whenever type qualifiers are ignored]'
  '-Wimplicit-fallthrough=[warn when a switch case falls through]:level:(1 2 3 4 5)'
  '-Wimplicit-function-declaration[warn about implicit function declarations]'
  '-Wimplicit-interface[warn about calls with implicit interface]'
  '-Wimplicit-int[warn when a declaration does not specify a type]'
  '-Wimplicit-procedure[warn about called procedures not explicitly declared]'
  '-Wimplicit[warn about implicit declarations]'
  '-Wimport[warn about imports]'
  '-Wincompatible-pointer-types[warn when there is a conversion between pointers that have incompatible types]'
  '-Winherited-variadic-ctor[warn about C++11 inheriting constructors when the base has a variadic constructor]'
  '-Winit-self[warn about variables which are initialized to themselves]'
  '-Winline[warn when an inlined function cannot be inlined]'
  '-Wint-conversion[warn about incompatible integer to pointer and pointer to integer conversions]'
  '-Winteger-division[warn about constant integer divisions with truncated results]'
  '-Wint-in-bool-context[warn for suspicious integer expressions in boolean context]'
  '-Wintrinsic-shadow[warn if a user-procedure has the same name as an intrinsic]'
  '-Wintrinsics-std[warn on intrinsics not part of the selected standard]'
  '-Wint-to-pointer-cast[warn when there is a cast to a pointer from an integer of a different size]'
  '-Winvalid-memory-model[warn when an atomic memory model parameter is known to be outside the valid range]'
  '-Winvalid-offsetof[warn about invalid uses of the "offsetof" macro]'
  '-Winvalid-pch[warn about PCH files that are found but not used]'
  '-Wjump-misses-init[warn when a jump misses a variable initialization]'
  '-Wlarger-than=[warn if an object is larger than <number> bytes]:bytes: '
  '-Wline-truncation[warn about truncated source lines]'
  '-Wliteral-suffix[warn when a string or character literal is followed by a ud-suffix which does not begin with an underscore]'
  '-Wlogical-not-parentheses[warn when logical not is used on the left hand side operand of a comparison]'
  '-Wlogical-op[warn when a logical operator is suspiciously always evaluating to true or false]'
  '-Wlong-long[do not warn about using "long long" when -pedantic]'
  '-Wlto-type-mismatch[during link time optimization warn about mismatched types of global declarations]'
  '-Wmain[warn about suspicious declarations of "main"]'
  '-Wmaybe-uninitialized[warn about maybe uninitialized automatic variables]'
  '-Wmemset-elt-size[warn about suspicious calls to memset where the third argument contains the number of elements not multiplied by the element size]'
  '-Wmemset-transposed-args[warn about suspicious calls to memset where the third argument is constant literal zero and the second is not]'
  '-Wmisleading-indentation[warn when the indentation of the code does not reflect the block structure]'
  '-Wmissing-braces[warn about possibly missing braces around initializers]'
  '-Wmissing-declarations[warn about global functions without previous declarations]'
  '-Wmissing-field-initializers[warn about missing fields in struct initializers]'
  '-Wmissing-include-dirs[warn about user-specified include directories that do not exist]'
  '-Wmissing-parameter-type[warn about function parameters declared without a type specifier in K&R-style functions]'
  '-Wmissing-prototypes[warn about global functions without prototypes]'
  '-Wmudflap[warn about constructs not instrumented by -fmudflap]'
  '-Wmultichar[warn about use of multi-character character constants]'
  '-Wmultiple-inheritance[warn on direct multiple inheritance]'
  '-Wnamespaces[warn on namespace definition]'
  '-Wnarrowing[warn about narrowing conversions within { } that are ill-formed in C++11]'
  '-Wnested-externs[warn about "extern" declarations not at file scope]'
  '-Wnoexcept-type[warn if C++1z noexcept function type will change the mangled name of a symbol]'
  '-Wnoexcept[warn when a noexcept expression evaluates to false even though the expression can''t actually throw]'
  '-Wnonnull-compare[warn if comparing pointer parameter with nonnull attribute with NULL]'
  '-Wnonnull[warn about NULL being passed to argument slots marked as requiring non-NULL]'
  '-Wnonportable-cfstrings[warn on CFStrings containing nonportable characters]'
  '-Wnon-template-friend[warn when non-templatized friend functions are declared within a template]'
  '-Wnon-virtual-dtor[warn about non-virtual destructors]'
  '-Wnormalized=-[warn about non-normalised Unicode strings]:normalization:((id\:allow\ some\ non-nfc\ characters\ that\ are\ valid\ identifiers nfc\:only\ allow\ NFC nfkc\:only\ allow\ NFKC none\:allow\ any\ normalization)): '
  '-Wnull-dereference[warn if dereferencing a NULL pointer may lead to erroneous or undefined behavior]'
  '-Wodr[warn about some C++ One Definition Rule violations during link time optimization]'
  '-Wold-style-cast[warn if a C-style cast is used in a program]'
  '-Wold-style-declaration[warn for obsolescent usage in a declaration]'
  '-Wold-style-definition[warn if an old-style parameter definition is used]'
  '-Wopenmp-simd[warn if a simd directive is overridden by the vectorizer cost model]'
  '-Woverflow[warn about overflow in arithmetic expressions]'
  '-Woverlength-strings[warn if a string is longer than the maximum portable length specified by the standard]'
  '-Woverloaded-virtual[warn about overloaded virtual function names]'
  '-Woverride-init-side-effects[warn about overriding initializers with side effects]'
  '-Woverride-init[warn about overriding initializers without side effects]'
  '-Wpacked-bitfield-compat[warn about packed bit-fields whose offset changed in GCC 4.4]'
  '-Wpacked[warn when the packed attribute has no effect on struct layout]'
  '-Wpadded[warn when padding is required to align structure members]'
  '-Wparentheses[warn about possibly missing parentheses]'
  '-Wpedantic[issue warnings needed for strict compliance to the standard]'
  '-Wplacement-new=[warn for placement new expressions with undefined behavior]::level:(1 2)'
  '-Wpmf-conversions[warn when converting the type of pointers to member functions]'
  '-Wpointer-arith[warn about function pointer arithmetic]'
  '-Wpointer-compare[warn when a pointer is compared with a zero character constant]'
  '-Wpointer-sign[warn when a pointer differs in signedness in an assignment]'
  '-Wpointer-to-int-cast[warn when a pointer is cast to an integer of a different size]'
  '-Wpoison-system-directories[warn for -I and -L options using system directories if cross compiling]'
  '-Wpragmas[warn about misuses of pragmas]'
  '-Wproperty-assign-default[warn if a property for an Objective-C object has no assign semantics specified]'
  '-Wprotocol[warn if inherited methods are unimplemented]'
  '-Wpsabi[warn about psabi]'
  '-Wrealloc-lhs-all[warn when a left-hand-side variable is reallocated]'
  '-Wrealloc-lhs[warn when a left-hand-side array variable is reallocated]'
  '-Wreal-q-constant[warn about real-literal-constants with '\'q\'' exponent-letter]'
  '-Wredundant-decls[warn about multiple declarations of the same object]'
  '-Wregister[warn about uses of register storage specifier]'
  '-Wreorder[warn when the compiler reorders code]'
  '-Wrestrict[warn when an argument passed to a restrict- qualified parameter aliases with another argument]'
  '-Wreturn-local-addr[warn about returning a pointer/reference to a local or temporary variable]'
  '-Wreturn-type[warn whenever a function'\''s return type defaults to "int" (C), or about inconsistent return types (C++)]'
  '-Wscalar-storage-order[warn on suspicious constructs involving reverse scalar storage order]'
  '-Wselector[warn if a selector has multiple methods]'
  '-Wsequence-point[warn about possible violations of sequence point rules]'
  '-Wshadow-ivar[warn if a local declaration hides an instance variable]'
  '-Wshadow[warn when one variable shadows another.  Same as  -Wshadow=global]'
  '-Wshift-count-negative[warn if shift count is negative]'
  '-Wshift-count-overflow[warn if shift count >= width of type]'
  '-Wshift-negative-value[warn if left shifting a negative value]'
  '-Wshift-overflow[warn if left shift of a signed value overflows.  Same as -Wshift-overflow=]'
  '-Wshift-overflow=[warn if left shift of a signed value overflows]:level:(1 2)'
  '-Wsign-compare[warn about signed-unsigned comparisons]'
  '-Wsign-conversion[warn for implicit type conversions between signed and unsigned integers]'
  '-Wsign-promo[warn when overload promotes from unsigned to signed]'
  '-Wsized-deallocation[warn about missing sized deallocation functions]'
  '-Wsizeof-array-argument[warn when sizeof is applied on a parameter declared as an array]'
  '-Wsizeof-pointer-memaccess[warn about suspicious length parameters to certain string functions if the argument uses sizeof]'
  '-Wstack-protector[warn when not issuing stack smashing protection for some reason]'
  '-Wstack-usage=[warn if stack usage might be larger than specified amount]:bytes: '
  '-Wstrict-aliasing[warn about code which might break strict aliasing rules]'
  '-Wstrict-aliasing=-[warn about code which might break strict aliasing rules]:level of checking (higher is more accurate):(1 2 3)'
  '-Wstrict-null-sentinel[warn about uncasted NULL used as sentinel]'
  '-Wstrict-overflow[warn about optimizations that assume that signed overflow is undefined]'
  '-Wstrict-overflow=-[warn about optimizations that assume that signed overflow is undefined]:level of checking (higher finds more cases):(1 2 3 4 5)'
  '-Wstrict-prototypes[warn about unprototyped function declarations]'
  '-Wstrict-selector-match[warn if type signatures of candidate methods do not match exactly]'
  '-Wstringop-overflow=[under the control of Object Size type, warn about buffer overflow in string manipulation functions like memcpy and strcpy]:level:(1 2 3 4)'
  '-Wstringop-overflow[warn about buffer overflow in string manipulation functions like memcpy and strcpy.  Same as  -Wstringop-overflow=]'
  '-Wsubobject-linkage[warn if a class type has a base or a field whose type uses the anonymous namespace or depends on a type with no linkage]'
  '*-Wsuggest-attribute=-[warn about functions that might be candidates for attributes]:attribute:(pure const noreturn format)'
  '-Wsuggest-final-methods[warn about C++ virtual methods where adding final keyword would improve code quality]'
  '-Wsuggest-final-types[warn about C++ polymorphic types where adding final keyword would improve code quality]'
  '-Wsuggest-override[suggest that the override keyword be used when the declaration of a virtual function overrides another]'
  '-Wsurprising[warn about "suspicious" constructs]'
  '-Wswitch-bool[warn about switches with boolean controlling expression]'
  '-Wswitch-default[warn about enumerated switches missing a "default-" statement]'
  '-Wswitch-enum[warn about all enumerated switches missing a specific case]'
  '-Wswitch-unreachable[warn about statements between switch'\''s controlling expression and the first case]'
  '-Wswitch[warn about enumerated switches, with no default, missing a case]'
  '-Wsync-nand[warn when __sync_fetch_and_nand and __sync_nand_and_fetch built-in functions are used]'
  '-Wsynth[deprecated. This switch has no effect]'
  '-Wsystem-headers[do not suppress warnings from system headers]'
  '-Wtabs[permit nonconforming uses of the tab character]'
  '-Wtarget-lifetime[warn if the pointer in a pointer assignment might outlive its target]'
  '-Wtautological-compare[warn if a comparison always evaluates to true or false]'
  '-Wtemplates[warn on primary template declaration]'
  '-Wterminate[warn if a throw expression will always result in a call to terminate()]'
  '-W[this switch is deprecated; use -Wextra instead]'
  '-Wtraditional-conversion[warn of prototypes causing type conversions different from what would happen in the absence of prototype]'
  '-Wtraditional[warn about features not present in traditional C]'
  '-Wtrampolines[warn whenever a trampoline is generated]'
  '-Wtrigraphs[warn if trigraphs are encountered that might affect the meaning of the program]'
  '-Wtype-limits[warn if a comparison is always true or always false due to the limited range of the data type]'
  '-Wundeclared-selector[warn about @selector()s without previously declared methods]'
  '-Wundefined-do-loop[warn about an invalid DO loop]'
  '-Wundef[warn if an undefined macro is used in an #if directive]'
  '-Wunderflow[warn about underflow of numerical constant expressions]'
  '-Wuninitialized[warn about uninitialized automatic variables]'
  '-Wunknown-pragmas[warn about unrecognized pragmas]'
  '-Wunsafe-loop-optimizations[warn if the loop cannot be optimized due to nontrivial assumptions]'
  '-Wunsuffixed-float-constants[warn about unsuffixed float constants]'
  '-Wunused-but-set-parameter[warn when a function parameter is only set, otherwise unused]'
  '-Wunused-but-set-variable[warn when a variable is only set, otherwise unused]'
  '-Wunused-const-variable[warn when a const variable is unused.  Same as  -Wunused-const-variable=]'
  '-Wunused-const-variable=[warn when a const variable is unused]:level:(1 2)'
  '-Wunused-dummy-argument[warn about unused dummy arguments]'
  '-Wunused[enable all -Wunused- warnings]'
  '-Wunused-function[warn when a function is unused]'
  '-Wunused-label[warn when a label is unused]'
  '-Wunused-local-typedefs[warn when typedefs locally defined in a function are not used]'
  '-Wunused-macros[warn about macros defined in the main file that are not used]'
  '-Wunused-parameter[warn when a function parameter is unused]'
  '-Wunused-result[warn if a caller of a function, marked with attribute warn_unused_result, does not use its return value]'
  '-Wunused-value[warn when an expression value is unused]'
  '-Wunused-variable[warn when a variable is unused]'
  '-Wuseless-cast[warn about useless casts]'
  '-Wuse-without-only[warn about USE statements that have no ONLY qualifier]'
  '-Wvarargs[warn about questionable usage of the macros used to retrieve variable arguments]'
  '-Wvariadic-macros[warn about using variadic macros]'
  '-Wvector-operation-performance[warn when a vector operation is compiled outside the SIMD]'
  '-Wvirtual-inheritance[warn on direct virtual inheritance]'
  '-Wvirtual-move-assign[warn if a virtual base has a non-trivial move assignment operator]'
  '-Wvla-larger-than=[warn on unbounded uses of variable-length arrays, and on bounded uses of variable-length arrays whose bound can be larger than <number> bytes]:bytes: ' 
  '-Wvla[warn if a variable length array is used]'
  '-Wvolatile-register-var[warn when a register variable is declared volatile]'
  '-Wwrite-strings[in C++, nonzero means warn about deprecated conversion from string literals to '\''char *'\''.  In C, similar warning, except that the conversion is]'
  '-Wzero-as-null-pointer-constant[warn when a literal '\''0'\'' is used as null pointer]'
  '-Wzerotrip[warn about zero-trip DO loops]'
)

# clang specific warnings
if [[ "$service" = clang* ]]; then
  warnings+=(
    '-Wlarge-by-value-copy=[warn on large by value copy]:argument'
    '-Wunreachable-code-aggressive[controls -Wunreachable-code, -Wunreachable-code-break, -Wunreachable-code-return]'
    '-Wunreachable-code-break[warn when break will never be executed]'
    '-Wunreachable-code-loop-increment[warn when loop will be executed only once]'
    '-Wunreachable-code-return[warn when return will not be executed]'
    '-Wunreachable-code[warn on code that will not be executed]'
  )
else
  warnings+=(
    '-Wunreachable-code[does nothing. Preserved for backward compatibility]'
  )
fi

args+=(
  {'*-A-','*--assert='}'[make an assertion]:define assertion:'
  '--all-warnings[display all warnings]'
  {-ansi,--ansi}'[same as -std=c89 or -std=c++98]'
  '-aux-info[emit declaration information into <file>]:file:_files'
  {'-B-','--prefix='}'[add <prefix> to the compiler'\''s search paths]:executable prefix:_files -/'
  '-b[specify target machine to compile to]:target machine:'
  {-CC,--comments-in-macros}'[do not discard comments, including macro expansion]'
  {-C,--comments}'[do not discard comments during preprocess]'
  {-c,--compile}'[compile and assemble, but do not link]'
  {'*-D-','*--define-macro='}'[define a macro]:define macro:'
  '-d-[dump the state of the preprocessor]:dump:->dump'
  '--dependencies[generate Makefile dependencies]'
  '-dumpbase[set the file basename to be used for dumps]:file:_files'
  '-dumpdir[set the directory name to be used for dumps]:file:_files -/'
  '-dumpmachine[display the compiler'\''s target processor]'
  '-dumpspecs[display all of the built in spec strings]'
  '-dumpversion[display the version of the compiler]'
  '+e-[control how virtual function definitions are used]:virtual function definitions in classes:((0\:only\ interface 1\:generate\ code))'
  {-e,--entry}'[specify program entry point is entry]:entry'
  {-E,--preprocess}'[preprocess only; do not compile, assemble or link]'
  '-fabi-version=-[use version <n> of the C++ ABI (default: 2)]:ABI version:(1 2 3 4 5 6)'
  '-fada-spec-parent=[dump Ada specs as child units of given parent]'
  '-faggressive-loop-optimizations[aggressively optimize loops using language constraints]'
  '-falign-functions[align the start of functions]'
  '-falign-jumps[align labels which are only reached by jumping]'
  '-falign-labels[align all labels]'
  '-falign-loops[align the start of loops]'
  '-fallow-parameterless-variadic-functions[allow variadic functions without named parameter]'
  '-fasm[recognize the asm keyword]'
  '-fassociative-math[allow optimization for floating-point arithmetic which may change the result of the operation due to rounding]'
  '-fasynchronous-unwind-tables[generate unwind tables that are exact at each instruction boundary]'
  '-fauto-inc-dec[generate auto-inc/dec instructions]'
  '-fbounds-check[generate code to check bounds before indexing arrays]'
  '-fbranch-count-reg[replace add, compare, branch with branch on count register]'
  '-fbranch-probabilities[use profiling information for branch probabilities]'
  '-fbranch-target-load-optimize2[perform branch target load optimization after prologue / epilogue threading]'
  '-fbranch-target-load-optimize[perform branch target load optimization before prologue / epilogue threading]'
  '-fbtr-bb-exclusive[restrict target load migration not to re-use registers in any basic block]'
  '-fbuilding-libgcc[specify building libgcc]'
  '-fbuiltin[recognize builtin functions]'
  '-fcaller-saves[save registers around function calls]'
  '-fcall-saved--[mark <register> as being preserved across functions]:register'
  '-fcall-used--[mark <register> as being corrupted by function calls]:register'
  '-fcanonical-system-headers[where shorter use canonicalized paths to system headers]'
  '-fcheck-data-deps[compare the results of several data dependence analyzers]'
  '-fcheck-pointer-bounds[add pointer bounds checker instrumentation]'
  '-fchkp-check-incomplete-type[generate pointer bounds check for variables with incomplete type]'
  '-fchkp-check-read[generate checks for all read accesses to memory]'
  '-fchkp-check-write[generate checks for all write accesses to memory]'
  '-fchkp-first-field-has-own-bounds[forces checker to use narrowed bounds for address of the first field]'
  '-fchkp-instrument-calls[generate bounds passing for calls]'
  '-fchkp-instrument-marked-only[instrument only functions marked with bnd_instrument attribute]'
  '-fchkp-narrow-bounds[control how checker handle pointers to object fields]'
  '-fchkp-narrow-to-innermost-array[forces checker to use bounds of the innermost arrays in case of nested static array access]'
  '-fchkp-optimize[allow checker optimizations]'
  '-fchkp-store-bounds[generate bounds stores for pointer writes]'
  '-fchkp-treat-zero-dynamic-size-as-infinite[with this option zero size obtained dynamically for objects with incomplete type will be treated as infinite]'
  '-fchkp-use-fast-string-functions[allow to use *_nobnd versions of string functions]'
  '-fchkp-use-nochk-string-functions[allow to use *_nochk versions of string functions]'
  '-fchkp-use-static-bounds[use statically initialized variable for vars bounds instead of generating them each time it is required]'
  '-fchkp-use-static-const-bounds[use statically initialized variable for constant bounds]'
  '-fchkp-use-wrappers[transform instrumented builtin calls into calls to wrappers]'
  '-fchkp-zero-input-bounds-for-main[use zero bounds for all incoming arguments in main function]'
  '-fcilkplus[enable Cilk Plus]'
  '-fcode-hoisting[enable code hoisting]'
  '-fcombine-stack-adjustments[looks for opportunities to reduce stack adjustments and stack references]'
  '-fcommon[do not put uninitialized globals in the common section]'
  '-fcompare-debug=-[compile with and without e.g. -gtoggle, and compare the final-insns dump]:opts:' # TODO: complete gcc options here
  '-fcompare-debug-second[run only the second compilation of -fcompare-debug]'
  '-fcompare-elim[perform comparison elimination after register allocation has finished]'
  '-fcond-mismatch[allow the arguments of the ? operator to have different types]'
  '-fconserve-stack[do not perform optimizations increasing noticeably stack usage]'
  '-fcprop-registers[perform a register copy-propagation optimization pass]'
  '-fcrossjumping[perform cross-jumping optimization]'
  '-fcse-follow-jumps[when running CSE, follow jumps to their targets]'
  '-fcx-fortran-rules[complex multiplication and division follow Fortran rules]'
  '-fcx-limited-range[omit range reduction step when performing complex division]'
  '-fdata-sections[place data items into their own section]'
  '-fdbg-cnt=-[,<counter>-<limit>,...) Set the debug counter limit]:counter\:limit,...: ' # TODO: gcc -fdbg-cnt-list -x c /dev/null -o /dev/null -c
  '-fdbg-cnt-list[list all available debugging counters with their limits and counts]'
  '-fdce[use the RTL dead code elimination pass]'
  '-fdebug-cpp[emit debug annotations during preprocessing]'
  '-fdebug-prefix-map=-[map one directory name to another in debug information]:/old/dir=/new/dir:->dirtodir'
  '-fdebug-types-section[output .debug_types section when using DWARF v4 debuginfo]'
  '-fdefer-pop[defer popping functions args from stack until later]'
  '-fdelayed-branch[attempt to fill delay slots of branch instructions]'
  '-fdelete-dead-exceptions[delete dead instructions that may throw exceptions]'
  '-fdelete-null-pointer-checks[delete useless null pointer checks]'
  '-fdevirtualize-speculatively[perform speculative devirtualization]'
  '-fdevirtualize[try to convert virtual calls to direct ones]'
  '-fdiagnostics-color=-[colorize diagnostics]::color:(never always auto)'
  '-fdiagnostics-generate-patch[print fix-it hints to stderr in unified diff format]'
  '-fdiagnostics-parseable-fixits[print fixit hints in machine-readable form]'
  '-fdiagnostics-show-caret[show the source line with a caret indicating the column]'
  '-fdiagnostics-show-location=-[how often to emit source location at the beginning of line-wrapped diagnostics]:source location:(once every-line)'
  '-fdiagnostics-show-option[amend appropriate diagnostic messages with the command line option that controls them]'
  '-fdirectives-only[preprocess directives only]'
  '-fdollars-in-identifiers[permit $ as an identifier character]'
  '-fdse[use the RTL dead store elimination pass]'
  '-fdump-ada-spec-slim[write all declarations as Ada code for the given file only]'
  '-fdump-ada-spec[write all declarations as Ada code transitively]'
  '-fdump-final-insns=-[dump to filename the insns at the end of translation]:filename:_files'
  '-fdump-go-spec=-[write all declarations to file as Go code]:filename:_files'
  '-fdump-noaddr[suppress output of addresses in debugging dumps]'
  '-fdump-passes[dump optimization passes]'
  '-fdump-unnumbered-links[suppress output of previous and next insn numbers in debugging dumps]'
  '-fdump-unnumbered[suppress output of instruction numbers, line number notes and addresses in debugging dumps]'
  '-fdwarf2-cfi-asm[enable CFI tables via GAS assembler directives]'
  '-fearly-inlining[perform early inlining]'
  '-feliminate-dwarf2-dups[perform DWARF2 duplicate elimination]'
  '-feliminate-unused-debug-symbols[perform unused type elimination in debug info]'
  '-feliminate-unused-debug-types[perform unused type elimination in debug info]'
  '-femit-class-debug-always[do not suppress C++ class debug information]'
  '-femit-struct-debug-baseonly[aggressive reduced debug info for structs]'
  '-femit-struct-debug-detailed=[detailed reduced debug info for structs]:spec list'
  '-femit-struct-debug-reduced[conservative reduced debug info for structs]'
  '-fexceptions[enable exception handling]'
  '-fexcess-precision=-[specify handling of excess floating-point precision]:precision handling:(fast standard)'
  '-fexec-charset=[convert all strings and character constants to character set]:character set'
  '-fexpensive-optimizations[perform a number of minor, expensive optimizations]'
  '-fextended-identifiers[permit universal character names in identifiers]'
  '-ffast-math[sets -fno-math-errno, -funsafe-math-optimizations, -ffinite-math-only, -fno-rounding-math, -fno-signaling-nans and -fcx-limited-range]'
  '-ffat-lto-objects[output lto objects containing both the intermediate language and binary output]'
  '-ffinite-math-only[assume no NaNs or infinities are generated]'
  '-ffixed--[mark <register> as being unavailable to the compiler]:register'
  '-ffloat-store[don'\''t allocate floats and doubles in extended- precision registers]'
  '-fforward-propagate[perform a forward propagation pass on RTL]'
  '-ffp-contract=-[perform floating- point expression contraction (default: fast)]:style:(on off fast)'
  '-ffp-contract=[perform floating-point expression contraction]:style:(off on fast)'
  '-ffp-int-builtin-inexact[allow built-in functions ceil, floor, round, trunc to raise "inexact" exceptions]'
  '-ffreestanding[do not assume that standard C libraries and main exist]'
  '-ffunction-cse[allow function addresses to be held in registers]'
  '-ffunction-sections[place each function into its own section]'
  '-fgcse-after-reload[perform global common subexpression elimination after register allocation has finished]'
  '-fgcse-las[perform redundant load after store elimination in global common subexpression elimination]'
  '-fgcse-lm[perform enhanced load motion during global common subexpression elimination]'
  '-fgcse[perform global common subexpression elimination]'
  '-fgcse-sm[perform store motion after global common subexpression elimination]'
  '-fgnu89-inline[use traditional GNU semantics for inline functions]'
  '-fgnu-tm[enable support for GNU transactional memory]'
  '-fgraphite[enable in and out of Graphite representation]'
  '-fgraphite-identity[enable Graphite Identity transformation]'
  '-fguess-branch-probability[enable guessing of branch probabilities]'
  '-fhoist-adjacent-loads[enable hoisting adjacent loads to encourage generating conditional move instructions]'
  '-fhosted[assume normal C execution environment]'
  '-fif-conversion2[perform conversion of conditional jumps to conditional execution]'
  '-fif-conversion[perform conversion of conditional jumps to branchless equivalents]'
  '-findirect-inlining[perform indirect inlining]'
  '-finhibit-size-directive[do not generate .size directives]'
  '-finline-atomics[inline __atomic operations when a lock free instruction sequence is available]'
  '-finline[enable inlining of function declared "inline", disabling disables all inlining]'
  '-finline-functions-called-once[integrate functions only required by their single caller]'
  '-finline-functions[integrate functions not declared "inline" into their callers when profitable]'
  '-finline-limit=-[limit the size of inlined functions to <number>]:number: '
  '-finline-small-functions[integrate functions into their callers when code size is known not to grow]'
  '-finput-charset=[specify the default character set for source files]:character set'
  '-finstrument-functions-exclude-file-list=-[do not instrument functions listed in files]:comma-separated file list:->commafiles'
  '-finstrument-functions-exclude-function-list=-[do not instrument listed functions]:comma-separated list of syms: '
  '-finstrument-functions[instrument function entry and exit with profiling calls]'
  '-fipa-bit-cp[perform interprocedural bitwise constant propagation]'
  '-fipa-cp-clone[perform cloning to make Interprocedural constant propagation stronger]'
  '-fipa-cp[perform interprocedural constant propagation]'
  '-fipa-icf-functions[perform Identical Code Folding for functions]'
  '-fipa-icf[perform Identical Code Folding for functions and read-only variables]'
  '-fipa-icf-variables[perform Identical Code Folding for variables]'
  '-fipa-profile[perform interprocedural profile propagation]'
  '-fipa-pta[perform interprocedural points-to analysis]'
  '-fipa-pure-const[discover pure and const functions]'
  '-fipa-ra[use caller save register across calls if possible]'
  '-fipa-reference[discover readonly and non addressable static variables]'
  '-fipa-sra[perform interprocedural reduction of aggregates]'
  '-fipa-vrp[perform IPA Value Range Propagation]'
  '-fira-algorithm=[set the used IRA algorithm]:algorithm:(cb priority)'
  '-fira-hoist-pressure[use IRA based register pressure calculation in RTL hoist optimizations]'
  '-fira-loop-pressure[use IRA based register pressure calculation in RTL loop optimizations]'
  '-fira-region=-[set regions for IRA]:region:(all mixed one)'
  '-fira-region=[set regions for IRA]:region:(one all mixed)'
  '-fira-share-save-slots[share slots for saving different hard registers]'
  '-fira-share-spill-slots[share stack slots for spilled pseudo-registers]'
  '-fira-verbose=-[control IRA'\''s level of diagnostic messages]:verbosity: '
  '-fisolate-erroneous-paths-attribute[detect paths that trigger erroneous or undefined behavior due to a null value being used in a way forbidden by a returns_nonnull or]'
  '-fisolate-erroneous-paths-dereference[detect paths that trigger erroneous or undefined behavior due to dereferencing a null pointer.  Isolate those paths from the main]'
  '-fivopts[optimize induction variables on trees]'
  '-fjump-tables[use jump tables for sufficiently large switch statements]'
  '-fkeep-inline-functions[generate code for functions even if they are fully inlined]'
  '-fkeep-static-consts[emit static const variables even if they are not used]'
  '-flax-vector-conversions[allow implicit conversions between vectors with differing numbers of subparts and/or differing element types]'
  '-fleading-underscore[give external symbols a leading underscore]'
  '-flifetime-dse[tell DSE that the storage for a C++ object is dead when the constructor starts and when the destructor finishes]'
  '-flive-range-shrinkage[relief of register pressure through live range shrinkage]'
  '-floop-nest-optimize[enable the loop nest optimizer]'
  '-floop-parallelize-all[mark all loops as parallel]'
  '-flra-remat[do CFG-sensitive rematerialization in LRA]'
  '-flto-compression-level=-[use specified zlib compression level for IL]:compression level: '
  '-flto-odr-type-merging[merge C++ types using One Definition Rule]'
  '-flto-partition=-[partition symbols and vars at linktime based on object files they originate from]:partitioning algorithm:(1to1 balanced max one none)'
  '-flto-report[report various link-time optimization statistics]'
  '-fmath-errno[set errno after built-in math functions]'
  '-fmax-errors=-[maximum number of errors to report]:errors: '
  '-fmem-report[report on permanent memory allocation]'
  '-fmem-report-wpa[report on permanent memory allocation in WPA only]'
  '-fmerge-all-constants[attempt to merge identical constants and constant variables]'
  '-fmerge-constants[attempt to merge identical constants across compilation units]'
  '-fmerge-debug-strings[attempt to merge identical debug strings across compilation units]'
  '-fmessage-length=-[limit diagnostics to <number> characters per line.  0 suppresses line-wrapping]:length: '
  '-fmodulo-sched-allow-regmoves[perform SMS based modulo scheduling with register moves allowed]'
  '-fmodulo-sched[perform SMS based modulo scheduling before the first scheduling pass]'
  '-fmove-loop-invariants[move loop invariant computations out of loops]'
  "-fms-extensions[don't warn about uses of Microsoft extensions]"
  '-fmudflapir[this switch lacks documentation]'
  '-fmudflap[this switch lacks documentation]'
  '-fmudflapth[this switch lacks documentation]'
  '-fnon-call-exceptions[support synchronous non-call exceptions]'
  '-fno-stack-limit[do not limit the size of the stack]'
  '-fno-threadsafe-statics[do not generate thread-safe code for initializing local statics]'
  '-fnothrow-opt[treat a throw() exception specification as noexcept to improve code size]'
  '-fomit-frame-pointer[when possible do not generate stack frames]'
  '-fopenacc[enable OpenACC]'
  '-fopenmp[enable OpenMP (implies -frecursive in Fortran)]'
  "-fopenmp-simd[enable OpenMP's SIMD directives]"
  '-foptimize-sibling-calls[optimize sibling and tail recursive calls]'
  '-foptimize-strlen[enable string length optimizations on trees]'
  '-fopt-info[enable all optimization info dumps on stderr]'
  '-fopt-info-type=-[dump compiler optimization details]:filename:_files'
  '-fpack-struct[pack structure members together without holes]'
  '-fpack-struct=[set initial maximum structure member alignment]:alignment (power of 2): '
  '-fpartial-inlining[perform partial inlining]'
  '-fpcc-struct-return[return small aggregates in memory, not registers]'
  '-fpch-deps[this switch lacks documentation]'
  '-fpch-preprocess[look for and use PCH files even when preprocessing]'
  '-fpeel-loops[perform loop peeling]'
  '-fpeephole2[enable an RTL peephole pass before sched2]'
  '-fpeephole[enable machine specific peephole optimizations]'
  '-fPIC[generate position-independent code if possible (large mode)]'
  '-fpic[generate position-independent code if possible (small mode)]'
  '-fPIE[generate position-independent code for executables if possible (large mode)]'
  '-fpie[generate position-independent code for executables if possible (small mode)]'
  '-fplan9-extensions[enable Plan 9 language extensions]'
  '-fplt[use PLT for PIC calls (-fno-plt- load the address from GOT at call site)]'
  '-fplugin-arg--[specify argument <key>=<value> for plugin <name>]:-fplugin-arg-name-key=value: ' #TODO
  '-fplugin=-[specify a plugin to load]:plugin: ' # TODO: complete plugins?
  '-fpost-ipa-mem-report[report on memory allocation before interprocedural optimization]'
  '-fpredictive-commoning[run predictive commoning optimization]'
  '-fprefetch-loop-arrays[generate prefetch instructions, if available, for arrays in loops]'
  '-fpre-ipa-mem-report[report on memory allocation before interprocedural optimization]'
  '-fpreprocessed[treat the input file as already preprocessed]'
  '-fprintf-return-value[treat known sprintf return values as constants]'
  '-fprofile-arcs[insert arc-based program profiling code]'
  '-fprofile-correction[enable correction of flow inconsistent profile data input]'
  '-fprofile-dir=-[set the top-level directory for storing the profile data]:profile directory:_files -/'
  '-fprofile[enable basic program profiling code]'
  '-fprofile-generate[enable common options for generating profile info for profile feedback directed optimizations]'
  '-fprofile-report[report on consistency of profile]'
  '-fprofile-use[enable common options for performing profile feedback directed optimizations]'
  '-fprofile-values[insert code to profile values of expressions]'
  '-frandom-seed=-[use <string> as random seed]:seed: '
  '-freciprocal-math[same as -fassociative-math for expressions which include division]'
  '-frecord-gcc-switches[record gcc command line switches in the object file]'
  '-free[turn on Redundant Extensions Elimination pass]'
  '-freg-struct-return[return small aggregates in registers]'
  '-frename-registers[perform a register renaming optimization pass]'
  '-freorder-blocks-algorithm=[set the used basic block reordering algorithm]:algorithm:(simple stc)'
  '-freorder-blocks-and-partition[reorder basic blocks and partition into hot and cold sections]'
  '-freorder-blocks[reorder basic blocks to improve code placement]'
  '-freorder-functions[reorder functions to improve code placement]'
  '-frequire-return-statement[functions which return values must end with return statements]'
  '-frerun-cse-after-loop[add a common subexpression elimination pass after loop optimizations]'
  '-freschedule-modulo-scheduled-loops[enable/disable the traditional scheduling in loops that already passed modulo scheduling]'
  '-frounding-math[disable optimizations that assume default FP rounding behavior]'
  '-frtti[generate run time type descriptor information]'
  "-fsanitize=-[enable AddressSanitizer, a memory error detector]:style:($sanitizers)"
  '-fsched2-use-superblocks[if scheduling post reload, do superblock scheduling]'
  '-fsched-critical-path-heuristic[enable the critical path heuristic in the scheduler]'
  '-fsched-dep-count-heuristic[enable the dependent count heuristic in the scheduler]'
  '-fsched-group-heuristic[enable the group heuristic in the scheduler]'
  '-fsched-interblock[enable scheduling across basic blocks]'
  '-fsched-last-insn-heuristic[enable the last instruction heuristic in the scheduler]'
  '-fsched-pressure[enable register pressure sensitive insn scheduling]'
  '-fsched-rank-heuristic[enable the rank heuristic in the scheduler]'
  '-fsched-spec[allow speculative motion of non-loads]'
  '-fsched-spec-insn-heuristic[enable the speculative instruction heuristic in the scheduler]'
  '-fsched-spec-load[allow speculative motion of some loads]'
  '-fsched-spec-load-dangerous[allow speculative motion of more loads]'
  '-fsched-stalled-insns[allow premature scheduling of queued insns]'
  '-fsched-stalled-insns-dep[set dependence distance checking in premature scheduling of queued insns]'
  '-fsched-stalled-insns-dep=[set dependence distance checking in premature scheduling of queued insns]:insns:'
  '-fsched-stalled-insns-dep=-[set dependence distance checking in premature scheduling of queued insns]:instructions: '
  '-fsched-stalled-insns=[set number of queued insns that can be prematurely scheduled]:insns:'
  '-fsched-stalled-insns=-[set number of queued insns that can be prematurely scheduled]:instructions: '
  '-fschedule-fusion[perform a target dependent instruction fusion optimization pass]'
  '-fschedule-insns2[reschedule instructions after register allocation]'
  '-fschedule-insns[reschedule instructions before register allocation]'
  '-fsched-verbose=-[set the verbosity level of the scheduler]:verbosity: '
  '-fsection-anchors[access data in the same section from shared anchor points]'
  '-fselective-scheduling2[run selective scheduling after reload]'
  '-fselective-scheduling[schedule instructions using selective scheduling algorithm]'
  '-fsel-sched-pipelining-outer-loops[perform software pipelining of outer loops during selective scheduling]'
  '-fsel-sched-pipelining[perform software pipelining of inner loops during selective scheduling]'
  '-fsel-sched-reschedule-pipelined[reschedule pipelined regions without pipelining]'
  '-fshort-double[use the same size for double as for float]'
  '-fshort-enums[use the narrowest integer type possible for enumeration types]'
  '-fshort-wchar[force the underlying type for "wchar_t" to be "unsigned short"]'
  '-fshow-column[show column numbers in diagnostics, when available]'
  '-fshrink-wrap[emit function prologues only before parts of the function that need it, rather than at the top of the function]'
  '-fshrink-wrap-separate[shrink-wrap parts of the prologue and epilogue separately]'
  '-fsignaling-nans[disable optimizations observable by IEEE signaling NaNs]'
  '-fsigned-bitfields[when signed or unsigned is not given make the bitfield signed]'
  '-fsigned-char[make char signed by default]'
  '-fsigned-zeros[disable floating point optimizations that ignore the IEEE signedness of zero]'
  '-fsimd-cost-model=[specifies the vectorization cost model for code marked with a simd directive]:model:(unlimited dynamic cheap)'
  '-fsingle-precision-constant[convert floating point constants to single precision constants]'
  '-fsplit-ivs-in-unroller[split lifetimes of induction variables when loops are unrolled]'
  '-fsplit-loops[perform loop splitting]'
  '-fsplit-paths[split paths leading to loop backedges]'
  '-fsplit-stack[generate discontiguous stack frames]'
  '-fsplit-wide-types[split wide types into independent registers]'
  '-fssa-backprop[enable backward propagation of use properties at the SSA level]'
  '-fssa-phiopt[optimize conditional patterns using SSA PHI nodes]'
  '-fstack-check=-[insert stack checking code into the program.  -fstack-check=specific if to argument given]:type:(none generic specific)'
  '-fstack-limit-register=-[trap if the stack goes past <register>]:register: '
  '-fstack-limit-symbol=-[trap if the stack goes past symbol <name>]:name: '
  '-fstack-protector-all[use a stack protection method for every function]'
  '-fstack-protector-explicit[use stack protection method only for functions with the stack_protect attribute]'
  '-fstack-protector-strong[use a smart stack protection method for certain functions]'
  '-fstack-protector[use propolice as a stack protection method]'
  '-fstack-reuse=[set stack reuse level for local variables]:level:(all named_vars none)'
  '-fstack-reuse=-[set stack reuse level for local variables]:reuse-level:(all named_vars none)'
  '-fstack-usage[output stack usage information on a per-function basis]'
  '-fstdarg-opt[optimize amount of stdarg registers saved to stack at start of function]'
  '-fstore-merging[merge adjacent stores]'
  '-fstrict-aliasing[assume strict aliasing rules apply]'
  '-fstrict-enums[assume that values of enumeration type are always within the minimum range of that type]'
  '-fstrict-overflow[treat signed overflow as undefined]'
  '-fstrict-volatile-bitfields[force bitfield accesses to match their type width]'
  '-fsync-libcalls[implement __atomic operations via libcalls to legacy __sync functions]'
  '-fsyntax-only[check for syntax errors, then stop]'
  '-ftabstop=[distance between tab stops for column reporting]:number'
  '-ftest-coverage[create data files needed by "gcov"]'
  '-fthread-jumps[perform jump threading optimizations]'
  '-ftime-report[report the time taken by each compiler pass]'
  '-ftls-model=-[set the default thread-local storage code generation model]:TLS model:(global-dynamic local-dynamic initial-exec local-exec)'
  '-ftracer[perform superblock formation via tail duplication]'
  '-ftrack-macro-expansion=[track locations of tokens coming from macro expansion and display them in error messages]::argument'
  '-ftrapping-math[assume floating-point operations can trap]'
  '-ftrapv[trap for signed overflow in addition, subtraction and multiplication]'
  '-ftree-bit-ccp[enable SSA-BIT-CCP optimization on trees]'
  '-ftree-builtin-call-dce[enable conditional dead code elimination for builtin calls]'
  '-ftree-ccp[enable SSA-CCP optimization on trees]'
  '-ftree-ch[enable loop header copying on trees]'
  '-ftree-coalesce-vars[enable SSA coalescing of user variables]'
  '-ftree-copy-prop[enable copy propagation on trees]'
  '-ftree-cselim[transform condition stores into unconditional ones]'
  '-ftree-dce[enable SSA dead code elimination optimization on trees]'
  '-ftree-dominator-opts[enable dominator optimizations]'
  '-ftree-dse[enable dead store elimination]'
  '-ftree-forwprop[enable forward propagation on trees]'
  '-ftree-fre[enable Full Redundancy Elimination (FRE) on trees]'
  '-ftree-loop-distribute-patterns[enable loop distribution for patterns transformed into a library call]'
  '-ftree-loop-distribution[enable loop distribution on trees]'
  '-ftree-loop-if-convert[convert conditional jumps in innermost loops to branchless equivalents]'
  '-ftree-loop-im[enable loop invariant motion on trees]'
  '-ftree-loop-ivcanon[create canonical induction variables in loops]'
  '-ftree-loop-linear[enable loop interchange transforms.  Same as  -floop-interchange]'
  '-ftree-loop-optimize[enable loop optimizations on tree level]'
  '-ftree-loop-vectorize[enable loop vectorization on trees]'
  '-ftree-lrs[perform live range splitting during the SSA- >normal pass]'
  '-ftree-parallelize-loops=[enable automatic parallelization of loops]'
  '-ftree-parallelize-loops=-[enable automatic parallelization of loops]:threads: '
  '-ftree-partial-pre[in SSA-PRE optimization on trees, enable partial- partial redundancy elimination]'
  '-ftree-phiprop[enable hoisting loads from conditional pointers]'
  '-ftree-pre[enable SSA-PRE optimization on trees]'
  '-ftree-pta[perform function-local points-to analysis on trees]'
  '-ftree-reassoc[enable reassociation on tree level]'
  '-ftree-scev-cprop[enable copy propagation of scalar-evolution information]'
  '-ftree-sink[enable SSA code sinking on trees]'
  '-ftree-slp-vectorize[enable basic block vectorization (SLP) on trees]'
  '-ftree-slsr[perform straight-line strength reduction]'
  '-ftree-sra[perform scalar replacement of aggregates]'
  '-ftree-switch-conversion[perform conversions of switch initializations]'
  '-ftree-tail-merge[enable tail merging on trees]'
  '-ftree-ter[replace temporary expressions in the SSA->normal pass]'
  '-ftree-vectorize[enable vectorization on trees]'
  '-ftree-vrp[perform Value Range Propagation on trees]'
  '-funconstrained-commons[assume common declarations may be overridden with ones with a larger trailing array]'
  '-funroll-all-loops[perform loop unrolling for all loops]'
  '-funroll-loops[perform loop unrolling when iteration count is known]'
  '-funsafe-loop-optimizations[allow loop optimizations to assume that the loops behave in normal way]'
  '-funsafe-math-optimizations[allow math optimizations that may violate IEEE or ISO standards]'
  '-funsigned-bitfields[when signed or unsigned is not given make the bitfield unsigned]'
  '-funsigned-char[make char unsigned by default]'
  '-funswitch-loops[perform loop unswitching]'
  '-funwind-tables[just generate unwind tables for exception handling]'
  '-fuse-ld=-[use the specified linker instead of the default linker]:linker:(bfd gold)'
  '-fuse-linker-plugin[use linker plugin during link-time optimization]'
  '-fvariable-expansion-in-unroller[apply variable expansion when loops are unrolled]'
  '-fvar-tracking-assignments[perform variable tracking by annotating assignments]'
  '-fvar-tracking-assignments-toggle[toggle -fvar-tracking-assignments]'
  '-fvar-tracking[perform variable tracking]'
  '-fvar-tracking-uninit[perform variable tracking and also tag variables that are uninitialized]'
  '-fvect-cost-model=[specifies the cost model for vectorization]:model:(unlimited dynamic cheap)'
  '-fverbose-asm[add extra commentary to assembler output]'
  '-fvisibility=-[set the default symbol visibility]:visibility:(default internal hidden protected)'
  '-fvpt[use expression value profiles in optimizations]'
  '-fweb[construct webs and split unrelated uses of single variable]'
  '-fwhole-program[perform whole program optimizations]'
  '-fwide-exec-charset=[convert all wide strings and character constants to character set]:character set'
  '-fworking-directory[generate a #line directive pointing at the current working directory]'
  '-fwrapv[assume signed arithmetic overflow wraps around]'
  '-fzero-initialized-in-bss[put zero initialized data in the bss section]'
  {-g-,--debug=}'[generate debug information]::debugging information type or level:(0 1 2 3 gdb gdb0 gdb1 gdb2 gdb3 coff stabs stabs+ dwarf dwarf+ dwarf-2 dwarf-3 dwarf-4 dwarf-5 dwarf32 dwarf64 xcoff xcoff+)'
  '-gno-pubnames[don'\''t generate DWARF pubnames and pubtypes sections]'
  '-gno-record-gcc-switches[don'\''t record gcc command line switches in DWARF DW_AT_producer]'
  '-gno-split-dwarf[don'\''t generate debug information in separate .dwo files]'
  '-gno-strict-dwarf[emit DWARF additions beyond selected version]'
  '-gpubnames[generate DWARF pubnames and pubtypes sections]'
  '-grecord-gcc-switches[record gcc command line switches in DWARF DW_AT_producer]'
  '-gsplit-dwarf[generate debug information in separate .dwo files]'
  '-gstrict-dwarf[don'\''t emit DWARF additions beyond selected version]'
  '-gtoggle[toggle debug information generation]'
  '-gvms[generate debug information in VMS format]'
  '--help[display this information]'
  {-H,--trace-includes}'[print name of each header file used]'
  {'*-idirafter','*--include-directory-after='}'[add directory after include search path]:second include path directory:_files -/'
  {'*-I-','*--include-directory='}'[add directory to include search path]:header file search path:_files -/'
  {'*-imacros','*--imacros='}'[include macros from file before parsing]:macro input file:_files -g \*.h\(-.\)'
  '-imultiarch[set <dir> to be the multiarch include subdirectory]:directory:_files -/' #XXX not in manpage
  '-imultilib=[set dir to be the multilib include subdirectory]:dir:_files -/'
  '--include-barrier[restrict all prior -I flags to double-quoted inclusion and remove current directory from include path]'
  {'*-include=','*--include='}'[include file before parsing]:include file:_files -g \*.h\(-.\)'
  '-iplugindir=-[set <dir> to be the default plugin directory]:directory:_files -/'
  {'*-iprefix','*--include-prefix='}'[set the -iwithprefix prefix]:prefix:_files'
  '-iquote=[add dir to the end of the quote include path]:dir:_files -/'
  '-isysroot=[set dir to be the system root directory]:dir:_files -/'
  '*-isystem[add directory to system include search path]:second include path directory (system):_files -/'
  {'*-iwithprefixbefore','*--include-with-prefix-before='}'[set directory to include search path with prefix]:main include path directory:_files -/'
  {'*-iwithprefix','*--include-with-prefix=','*--include-with-prefix-after='}'[set directory to system include search path with prefix]:second include path directory:_files -/'
  '*-L-[add directory to library search path]:library search path:_files -/'
  '-lang-asm[set lang asm]'
  '*-l+[include library found in search path]:library:->library'
  '-MF[write dependency output to the given file]:file:_files'
  '-MJ[write a compilation database entry per input]'
  '-MQ[add a make-quoted target]:target'
  '*-M-[set flags for generating Makefile dependencies]::output dependencies:->dependencies'
  '-MT[add an unquoted target]:target'
  '-no-canonical-prefixes[do not canonicalize paths when building relative prefixes to other gcc components]'
  '-nodefaultlibs[do not use the standard system libraries when linking]'
  '-nostartfiles[do not use the standard system startup files when linking]'
  {-nostdinc,--no-standard-includes}'[do not search standard system directories or compiler builtin directories for include files]'
  '-nostdlib[do not use standard system startup files or libraries when linking]'
  {-O-,--optimize=-}'[control the optimization]::optimization level:((0 1 2 3 g\:optimize\ for\ debugging\ experience s\:optimize\ for\ space fast\:optimize\ for\ speed\ disregarding\ exact\ standards\ compliance))'
  {-o,--output=}'[write output to file]:output file:_files -g "^*.(c|h|cc|C|cxx|cpp|hpp)(-.)"'
  '--output-pch=[output pch]'
  '--param[set parameter <param> to value.  See manpage for a complete list of parameters]:name=value'
  '-pass-exit-codes[exit with highest error code from a phase]'
  {-pedantic-errors,--pedantic-errors}'[like -pedantic but issue them as errors]'
  {-pedantic,--pedantic}'[issue all mandatory diagnostics in the C standard]'
  '(-pg)-p[enable function profiling for prof]'
  '-pie[create a position independent executable]'
  {-pipe,--pipe}'[use pipes rather than intermediate files]'
  {-P,--no-line-commands}'[inhibit generation of linkemakers during preprocess]'
  '(-p)-pg[enable function profiling for gprof]'
  '-###[print commands to run this compilation]'
  '-print-file-name=-[display the full path to library <library>]:library:->library'
  '-print-libgcc-file-name[display the name of the compiler'\''s companion library]'
  '--print-missing-file-dependencies[print missing file dependencies]'
  '-print-multiarch[display the target'\''s normalized GNU triplet, used as a component in the library path]'
  '-print-multi-directory[display the root directory for versions of libgcc]'
  '-print-multi-lib[display the mapping between command line options and multiple library search directories]'
  '-print-multi-os-directory[display the relative path to OS libraries]'
  '-print-prog-name=-[display the full path to compiler component <program>]:program:'
  '-print-search-dirs[display the directories in the compiler'\''s search path]'
  '-print-sysroot[display the target libraries directory]'
  '-print-sysroot-headers-suffix[display the sysroot suffix used to find headers]'
  {-Qn,-fno-ident}'[do not emit metadata containing compiler name and version]'
  '-quiet[do not display functions compiled or elapsed time]'
  {-Qy,-fident}'[emit metadata containing compiler name and version]'
  '-rdynamic[pass the flag -export-dynamic to the ELF linker, on targets that support it]'
  '-remap[remap file names when including files]'
  {-S,--assemble}'[compile only; do not assemble or link]'
  '-save-stats=-[save code generation statistics]:location:(cwd obj)'
  '-save-temps[do not delete intermediate files]'
  '-shared[create a shared library]'
  '-shared-libgcc[force shared libgcc]'
  '*-specs=-[override built-in specs with the contents of <file>]:file:_files'
  '-s[remove all symbol table and relocation information from the executable]'
  '-static-libgcc[force static libgcc]'
  '-static[on systems that support dynamic linking, this prevents linking with the shared libraries]'
  {'-std=-','--std='}'[assume that the input sources are for specified standard]:standard:(c90 c89 iso9899\:1990 iso9899\:199409 c99 iso9899\:1999 c11 iso9899\:2011 gnu90 gnu89 gnu99 gnu11 c++98 c++03 gnu++98 gnu++03 c++11 gnu++11 c++1y gnu++1y c++14 gnu++14 c++1z gnu++1z c++17 iso9899\:2017 gnu++17 c++2a gnu++2a)'
  '-symbolic[bind references to global symbols when building a shared object]'
  '--sysroot=-[use <directory> as the root directory for headers and libraries]:directory:_files -/'
  '--target-help[display target specific command line options]'
  '-time[time the execution of each subprocess]'
  {-traditional-cpp,--traditional-cpp}'[use traditional preprocessor]'
  {-trigraphs,--trigraphs}'[process trigraph sequences]'
  '-T[specify linker script]:linker script:_files'
  '-undef[do not predefine system specific and gcc specific macros]'
  '*-u[pretend symbol to be undefined]:symbol:'
  '--user-dependencies[print user dependencies]'
  {'*-U-','*--undefine-macro='}'[undefine a macro]:undefine macro:'
  '-version[display the compiler'\''s version]'
  '--version[display version information]'
  '-V[specify compiler version]:compiler version:'
  {-v,--verbose}'[enable verbose output]'
  '*-Wa,-[pass arguments to the assembler]:assembler option:'
  '--warn--[enable the specified warning]:warning:->warning'
  '*-Werror=-[treat specified warning as error (or all if none specified)]::warning:->warning'
  '-Wfatal-errors[exit on the first error occurred]'
  '*-Wl,-[pass arguments to the linker]:linker option:'
  {-w,--no-warnings}'[suppress warnings]'
  '*-Wp,-[pass arguments to the preprocessor]:preprocessor option:'
  '--write-dependencies[write a depfile containing user and system dependencies]'
  '--write-user-dependencies[write a depfile containing user dependencies]'
  '*-Xassembler[pass argument to the assembler]:assembler option:'
  '*-Xlinker[pass argument to the linker]:linker option:'
  '*-Xpreprocessor[pass argument to the preprocessor]:preprocessor option:'
  '-x[specify the language of the following input files]:input file language:('"$languages"')'
)

# not meant for end users
#'-fdisable--pass=-[disables an optimization pass]:range1+range2: '
#'-fdisable-[disables an optimization pass]'
#'-fenable--pass=-[enables an optimization pass]:range1+range2: '
#'-fenable-[enables an optimization pass]'
#'-fdump-<type>[dump various compiler internals to a file]'

args+=($warnings)

# How to mostly autogenerate the above stuff:
# joinhelplines() { sed '$!N;s/^\(  -.*\)\n  \s*\([^-]\)/\1 \2/;P;D' }
# gcc-x86() { gcc --help=target,\^undocumented | joinhelplines | joinhelplines }
# compdef _gnu_generic gcc-x86
# printf '%s\n' ${(onq-)_args_cache_gcc_x86}

# TODO: -fno-<TAB> and -mno-<TAB> match lots of non-existent options.
#_arguments -C -M 'L:|-{fWm}no-=-{fWm} r:|[_-][^-]=* r:|=*'
_arguments -C -M 'L:|-{fWm}no-=-{fWm} r:[^-]|[_-]=* r:|=*' \
  "$args[@]" \
  "$args2[@]" && ret=0

case "$state" in
dump)
  local -a dump_values=(
    'A[verbose assembly output]'
    'D[macro definitions and normal output]'
    'I[include directives and normal output]'
    'J[after last jump optimization]'
    'L[after loop optimization]'
    'M[only macro definitions]'
    'N[macro names]'
    'R[after second instruction scheduling pass]'
    'S[after first instruction scheduling pass]'
    'a[all dumps]'
    'c[after instruction combination]'
    'd[after delayed branch scheduling]'
    'f[after flow analysis]'
    'g[after global register allocation]'
    'j[after jump optimization]'
    'k[after conversion from registers to stack]'
    'l[after local register allocation]'
    'm[print memory usage statistics]'
    'p[annotate assembler output]'
    'r[after RTL generation]'
    's[after CSE]'
    't[after second CSE pass]'
    'x[only generate RTL]'
    'y[debugging information during parsing]'
  )
  _values -s '' 'dump information' $dump_values && ret=0
  ;;
dependencies)
  local -a dependencies=(
    'D:generate make dependencies and compile'
    'G:treat missing header files as generated'
    'M:only user header files'
    'MD:output to file'
    'P:generate phony targets for all headers'
    'V:use NMake/Jom format for the depfile'
  )
  _describe dependencies dependencies && ret=0
  ;;
library)
  # TODO: improve defaults for library_path (e.g., use output of clang -Wl,-v)
  local -a library_path=( /usr/lib /usr/local/lib )
  case $OSTYPE in
    (darwin*)
      library_path+=( $(xcrun --show-sdk-path)/usr/lib )
      ;;
    (linux-gnu)
      local tmp
      tmp=$(_call_program library-paths $words[1] -print-multiarch)
      if [[ $tmp != '' && -d /usr/lib/$tmp ]]; then
	library_path+=( /usr/lib/$tmp )
      elif [[ -d /usr/lib64 ]]; then
	library_path+=( /usr/lib64 )
      fi
      ;;
  esac
  # Add directories from -L options
  for ((i = 2; i < $#words; i++)); do
    if [[ "$words[i]" = -L ]]; then
      library_path+=("$words[++i]")
    elif [[ "$words[i]" = -L* ]]; then
      library_path+=("${words[i]##-L}")
    fi
  done
  _wanted libraries expl library \
      compadd - $library_path/lib*.(a|so*|dylib)(:t:fr:s/lib//) && ret=0
  ;;
rundir)
  compset -P '*:'
  compset -S ':*'
  _files -/ -S/ -r '\n\t\- /:' "$@" && ret=0
  ;;
help)
  _values -s , 'help' \
    optimizers warnings target params common \
    c c++ objc objc++ lto ada adascil adawhy fortran go java \
    {\^,}undocumented {\^,}joined {\^,}separate \
  && ret=0
  ;;
dirtodir)
  compset -P '*='
  _files -/ && ret=0
  ;;
commafiles)
  compset -P '*,'
  _files && ret=0
  ;;
framework)
  local -a framework_path=()
  case $OSTYPE in
    darwin*)
      framework_path=( $(xcrun --show-sdk-path)/System/Library/Frameworks ) ;;
  esac
  # Add directories from -F options
  for ((i = 2; i < $#words; i++)); do
    if [[ "$words[i]" = -F ]]; then
      framework_path+=("$words[++i]")
    elif [[ "$words[i]" = -F* ]]; then
      framework_path+=("${words[i]##-F}")
    fi
  done
  _wanted frameworks expl framework \
      compadd -- $framework_path/*.framework(:t:r) && ret=0
  ;;
warning)
  local -a warning_names
  for warning in $warnings; do
    if [[ "$warning" = (#b)-W([^=\[]##)[^\[]#\[(*)\]* ]]; then
      warning_names+=("$match[1]:$match[2]")
    fi
  done
  _describe warning warning_names && ret=0
  ;;
arch)
  _wanted cputypes expl "CPU type" compadd -a arch && ret=0
  ;;
archgeneric)
  arch+=(generic)
  _wanted cputypes expl "CPU type" compadd -a arch && ret=0
  ;;
esac

return ret

  reply	other threads:[~2021-03-31 14:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12  4:07 Jacob Gelbman
2021-03-19  3:51 ` Jun T
2021-03-22  2:28   ` Jacob Gelbman
2021-03-22  2:29     ` Jacob Gelbman
2021-03-22 15:18     ` Jun. T
2021-03-31 12:31       ` Oliver Kiddle
2021-03-31 14:53         ` Jun. T [this message]
2021-03-31 15:06           ` Jun. T
2021-03-31 18:37             ` two anchor forms of matching control (was Re: Improvements to the gcc completion script) Oliver Kiddle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B2339163-0F79-483A-88EF-D6DDAB202587@kba.biglobe.ne.jp \
    --to=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).