summaryrefslogtreecommitdiff
path: root/bashrc
diff options
context:
space:
mode:
authorDavid <dbphillipsnz@gmail.com>2016-09-02 20:15:11 +1200
committerDavid <dbphillipsnz@gmail.com>2016-09-02 20:15:11 +1200
commit26f6f50589a86680ae73f2c6116f25b4fb7314f8 (patch)
treeb45ae2efc38df67aea1eb328cb3398ef865cb5b5 /bashrc
parentace3d98c85955ac1364de8a7edba864d1e096015 (diff)
downloaddotfiles-26f6f50589a86680ae73f2c6116f25b4fb7314f8.tar.xz
Prefer clang over gcc, fall back on tcc if no gcc
Diffstat (limited to 'bashrc')
-rw-r--r--bashrc3
1 files changed, 3 insertions, 0 deletions
diff --git a/bashrc b/bashrc
index e4c4d1f..884e72b 100644
--- a/bashrc
+++ b/bashrc
@@ -28,9 +28,12 @@ PS1="${BYellow}\
###############
export GPG_TTY=$(tty)
export EDITOR=/usr/bin/vim
+
if [ $(which clang 2>/dev/null) ]; then
export CC=clang
export CXX=clang
+elif [[ $(which tcc 2>/dev/null) && !$(which gcc 2>/dev/null) ]]; then
+ export CC=tcc
fi
alias sudo="sudo "