Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] Further improve _gcc
- X-seq: zsh-workers 43074
- From: Eitan Adler <lists@xxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] Further improve _gcc
- Date: Tue, 19 Jun 2018 23:54:55 +0000
- Cc: Eitan Adler <lists@xxxxxxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=from:to:cc:subject:date:message-id; bh=yNYclk+C4C1F9+GXa42kMkq4klsvqLFrjjOdZkNu/nc=; b=PrENWTzOYqSnTPRXYdFLgj267vMfh43wClKRM0DtPcoXbECE8sI9GF8ek+4iIoLswM ZuqogKWCsQa6zWiTUBoz6r6l+3UF4z589UFbkvLmquf33Im9ZLc05lNSp6jrMC3htc3I X9CP0xdMQN7snvmngFhMiEA4/HO8SURfnLoz0=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- gcc supports more sanitizers that previously thought (from mikachu)
- add additional linker options for clang
Signed-off-by: Eitan Adler <lists@xxxxxxxxxxxxxx>
---
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author