[Chore](env) add error information when DORIS_GCC_HOME not set well (#14249)
This commit is contained in:
12
env.sh
12
env.sh
@ -161,8 +161,18 @@ if [[ -z "${DORIS_BIN_UTILS}" ]]; then
|
||||
export DORIS_BIN_UTILS='/usr/bin/'
|
||||
fi
|
||||
|
||||
if [[ -z "${DORIS_GCC_HOME}" ]]; then
|
||||
DORIS_GCC_HOME="$(dirname "$(which gcc)")/.."
|
||||
export DORIS_GCC_HOME
|
||||
fi
|
||||
|
||||
if [[ ! -f "${DORIS_GCC_HOME}/bin/gcc" ]]; then
|
||||
echo "Error: wrong directory DORIS_GCC_HOME=${DORIS_GCC_HOME}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# export CLANG COMPATIBLE FLAGS
|
||||
CLANG_COMPATIBLE_FLAGS="$(echo | "${DORIS_GCC_HOME:-"$(dirname "$(which gcc)")/.."}/bin/gcc" -Wp,-v -xc++ - -fsyntax-only 2>&1 |
|
||||
CLANG_COMPATIBLE_FLAGS="$(echo | "${DORIS_GCC_HOME}/bin/gcc" -Wp,-v -xc++ - -fsyntax-only 2>&1 |
|
||||
grep -E '^\s+/' | awk '{print "-I" $1}' | tr '\n' ' ')"
|
||||
export CLANG_COMPATIBLE_FLAGS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user