zsh-workers
 help / color / mirror / code / Atom feed
From: Eitan Adler <lists@eitanadler.com>
To: zsh-workers@zsh.org
Cc: Eitan Adler <lists@eitanadler.com>
Subject: [PATCH] Further improve _gcc
Date: Tue, 19 Jun 2018 23:54:55 +0000	[thread overview]
Message-ID: <20180619235455.32674-1-lists@eitanadler.com> (raw)

- gcc supports more sanitizers that previously thought (from mikachu)
- add additional linker options for clang

Signed-off-by: Eitan Adler <lists@eitanadler.com>
---
 Completion/Unix/Command/_gcc | 21 +++++++++++----------
 1 file 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
+        "-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 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
     )
-else
-    args=(
-      '-flto=-[Enable link-time optimization]::jobs:'
-    )
-    sanitizers=(
-        address memory
-    )
-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]'
-- 
2.17.1


                 reply	other threads:[~2018-06-20  1:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20180619235455.32674-1-lists@eitanadler.com \
    --to=lists@eitanadler.com \
    --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).