aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Sabaté <mikisabate@gmail.com>2014-11-17 12:32:30 +0100
committerMiquel Sabaté <mikisabate@gmail.com>2014-11-17 12:32:30 +0100
commitc6202810071c2f38b9fb78bf899416810454cf15 (patch)
tree4040273e6aef65b73bda4ab84152e7c7af765b3d
parent82414ab5b569de2503a759f22ad88f66132d0ef3 (diff)
downloaddotfiles-c6202810071c2f38b9fb78bf899416810454cf15.tar.gz
dotfiles-c6202810071c2f38b9fb78bf899416810454cf15.zip
bash: let's use clang/clang++ as the default compiler.
But since some projects such as HHVM, do not compile under clang, we have to use gcc there. Since it's no fun to keep on writing "CC=..." and all that, I've created the `GCC` shortuct.
-rw-r--r--bashrc6
1 files changed, 6 insertions, 0 deletions
diff --git a/bashrc b/bashrc
index d70d547..5f7ad02 100644
--- a/bashrc
+++ b/bashrc
@@ -65,6 +65,12 @@ alias frameworks='source $KF5_SRC/kf5.sh'
# Alias bundle exec
alias be='bundle exec'
+# Set the CC and CXX variables to clang, but allow a fallback shortcut, since
+# some projects do not support clang yet (e.g. HHVM).
+alias GCC='CC=/usr/bin/gcc CXX=/usr/bin/g++'
+export CC=/usr/bin/clang
+export CXX=/usr/bin/clang++
+
# Go things
export GOROOT=$HOME/Projects/go
export GOPATH=$HOME/Projects/golang