Skip to content

Commit 3e00209

Browse files
author
Craig Ringer
committed
bashenv support pgbuild CLANG
1 parent 68daba6 commit 3e00209

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

misc/bashenv/bash_aliases

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,17 @@ function pgbuild() {
1818
local destname="${1:-"$(basename $(pwd))"}"
1919
local variant="${2:-}"
2020
local configure_args
21+
local CC=/usr/lib64/ccache/gcc
2122
case "${variant:-}" in
2223
"")
2324
configure_args="--enable-debug --enable-cassert --enable-tap-tests --enable-dtrace"
2425
;;
2526
"NDEBUG")
2627
configure_args=""
2728
;;
29+
"CLANG")
30+
configure_args="--enable-debug --enable-cassert --enable-tap-tests --enable-dtrace CC=/usr/lib64/ccache/clang"
31+
;;
2832
*)
2933
echo "unrecognised build variant $variant"
3034
return
@@ -89,6 +93,9 @@ function pgbuildall() {
8993
echo "building NDEBUG variant"
9094
pgbuild "$(basename $(pwd))" "NDEBUG"
9195
echo "NDEBUG variant built"
96+
echo "building NDEBUG variant"
97+
pgbuild "$(basename $(pwd))" "CLANG"
98+
echo "CLANG variant built"
9299
ls -d build*
93100
}
94101

@@ -214,7 +221,7 @@ function regress_psql() {
214221
# automatically.
215222
function gdblast() {
216223
c=$(cd ~/core/ && ls -c *.core | tail -1 );
217-
p=$(echo $c | awk -F . '{ gsub("!","/",$2); print $2;}');
224+
p=$(echo "$c" | awk -F - '{ gsub("!","/",$2); print $2;}');
218225
gdb -q $p ~/core/"$c" -ex 'info inferiors' -ex 'info sharedlibrary \(pglogical\|bdr\)';
219226
}
220227

0 commit comments

Comments
 (0)