Skip to content

Commit

Permalink
reduce compiler checking output
Browse files Browse the repository at this point in the history
  • Loading branch information
junjiemars committed Jan 10, 2025
1 parent c7bcb06 commit 66a31c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions auto/cc/name
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ nm_feature_run=dumb
nm_feature_h=
nm_feature_flags=
nm_feature_test=
. ${NORE_ROOT}/auto/feature
source ${NORE_ROOT}/auto/feature

if [ ".no" = ".$nm_found" ]; then
printf "${nm_found}\n"
Expand All @@ -24,23 +24,23 @@ fi

if $($CC -v 2>&1 | grep -q 'gcc version'); then
CC_NAME=gcc
printf " + using GNU ${CC_NAME} compiler\n"
CC_BAND="GNU"

elif $($CC -v 2>&1 | grep -q '\(clang\|LLVM\) version'); then
CC_NAME=clang
printf " + using ${CC_NAME} compiler\n"
CC_BAND=""

elif $($CC 2>&1 | grep -q 'Microsoft .* C\/C++'); then
CC_NAME=msvc
printf " + using Microsoft ${CC_NAME} compiler\n"
CC_BAND="Microsoft"

elif $($CC -v 2>&1 | grep -q 'tcc version'); then
CC_NAME=tcc
printf " + using Tiny ${CC_NAME} compiler\n"
CC_BAND="Tiny"

else
CC_NAME=unknown
printf " ! unsupport ${CC} compiler\n"
CC_BAND=unknown
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion auto/summary
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ echo "Configuration summary"

cat << END
platform: $NM_PLATFORM
compiler: $NM_COMPILER
compiler: ${CC_BAND:+ }${NM_COMPILER}
symbol-table= $NM_SYMBOL_FILE
prefix= $NM_PREFIX
out= $NM_OUT
Expand Down

0 comments on commit 66a31c2

Please sign in to comment.