mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-22 03:09:22 +01:00
bashrc & zshrc: use clang when installed
clang sounds interesting and ZNC and WeeChat have automatic testing for it and I have successfully compiled Python with it. Setting bash/zshrc to use it seems like a good way to test what support it and what doesn't.
This commit is contained in:
parent
621f44daca
commit
b9c52c921d
15
bashrc
15
bashrc
@ -801,6 +801,21 @@ erase-mbr() {
|
||||
echo dd if=/dev/zero of=$1 bs=512 count=2
|
||||
}
|
||||
|
||||
# Use clang if installed. It seems interesting and this is probably good
|
||||
# way to test it. This might not be a function, but I don't have any better
|
||||
# place for this.
|
||||
if hash clang 2>/dev/null; then
|
||||
export CC=clang
|
||||
else
|
||||
unset CC
|
||||
fi
|
||||
|
||||
if hash clang++ 2>/dev/null; then
|
||||
export CXX=clang++
|
||||
else
|
||||
unset CXX
|
||||
fi
|
||||
|
||||
# .custom
|
||||
if [ -f ~/.custom ]; then
|
||||
source ~/.custom
|
||||
|
18
zshrc
18
zshrc
@ -10,7 +10,7 @@ UNAME=$(uname)
|
||||
|
||||
# enable terminal bell
|
||||
|
||||
if [ -f /usr/bin/xset ];
|
||||
if [[ -f /usr/bin/xset ]];
|
||||
then
|
||||
(xset b on&)
|
||||
fi
|
||||
@ -774,6 +774,22 @@ erase-mbr() {
|
||||
echo dd if=/dev/zero of=$1 bs=512 count=2
|
||||
}
|
||||
|
||||
# Use clang if installed. It seems interesting and this is probably good
|
||||
# way to test it. This might not be a function, but I don't have any better
|
||||
# place for this.
|
||||
if hash clang 2>/dev/null; then
|
||||
export CC=clang
|
||||
else
|
||||
unset CC
|
||||
fi
|
||||
|
||||
if hash clang++ 2>/dev/null; then
|
||||
export CXX=clang++
|
||||
else
|
||||
unset CXX
|
||||
fi
|
||||
|
||||
|
||||
# Source files for miscannellious modifications.
|
||||
|
||||
# .custom
|
||||
|
Loading…
Reference in New Issue
Block a user