about summary refs log tree commit diff
path: root/Completion/Unix/Command/_gcc
diff options
context:
space:
mode:
authorEitan Adler <lists@eitanadler.com>2018-06-19 23:54:55 +0000
committerOliver Kiddle <okiddle@yahoo.co.uk>2018-06-21 15:01:28 +0200
commit03b2cd1bb013212d1f6c2b897156ac87b455c2ee (patch)
treef3b00dc189279b39b0e04f0174214f79e667354e /Completion/Unix/Command/_gcc
parentc919fa7f691fc18af1a9beb60b8426ebc2fc7eac (diff)
downloadzsh-03b2cd1bb013212d1f6c2b897156ac87b455c2ee.tar.gz
zsh-03b2cd1bb013212d1f6c2b897156ac87b455c2ee.tar.xz
zsh-03b2cd1bb013212d1f6c2b897156ac87b455c2ee.zip
43074: Completion for additional linker options for clang and sanitizers for gcc
Diffstat (limited to 'Completion/Unix/Command/_gcc')
-rw-r--r--Completion/Unix/Command/_gcc21
1 files changed, 11 insertions, 10 deletions
diff --git a/Completion/Unix/Command/_gcc b/Completion/Unix/Command/_gcc
index 9690df79f..5817318f6 100644
--- a/Completion/Unix/Command/_gcc
+++ b/Completion/Unix/Command/_gcc
@@ -338,7 +338,6 @@ h8/300)
   ;;
 esac
 
-local -a sanitizers
 if [[ "$service" = clang* ]]; then
     args=(
         $args
@@ -349,21 +348,23 @@ if [[ "$service" = clang* ]]; then
         -fshow-column -fshow-source-location -fcaret-diagnostics -fdiagnostics-fixit-info
         -fdiagnostics-parseable-fixits -fdiagnostics-print-source-range-info
         -fprint-source-range-info -fdiagnostics-show-option -fmessage-length
-    )
-    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
+        "-nostdinc[Do not search standard system directories or compiler builtin directories for include files]"
+        "-nostdlibinc[Do not search standard system directories for include files]"
+        "-nobuiltininc[Do not search builtin directory for include files]"
     )
 else
     args=(
       '-flto=-[Enable link-time optimization]::jobs:'
     )
+fi
+
+local -a sanitizers
     sanitizers=(
-        address memory
+        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
     )
-fi
 
 local -a languages
 languages=(
@@ -965,7 +966,7 @@ args+=(
 args+=(
   '-nostartfiles[Do not use the standard system startup files when linking]'
   '-nodefaultlibs[Do not use the standard system libraries when linking]'
-  '-nostdlib[Do not use the standard system startup files or libraries when linking]'
+  '-nostdlib[Do not use standard system startup files or libraries when linking]'
   '-rdynamic[Pass the flag -export-dynamic to the ELF linker, on targets that support it]'
   '-s[Remove all symbol table and relocation information from the executable]'
   '-static[On systems that support dynamic linking, this prevents linking with the shared libraries]'