Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
junjiemars committed Nov 15, 2024
1 parent 350e218 commit d2d4a56
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 5 additions & 5 deletions auto/cc/conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@ CC=${CC:-cc}
CFLAGS=${CFLAGS}

# predefined to c compiler
ASM="\${ASM}"
LINK="\${LINK}"
ASM="\$(CC)"
LINK="\$(CC)"

# c preprocessor
CPP=${CPP}
# extra flags to c preprocessor
CPPFLAGS=${CPPFLAGS}

# assembler
AS=${AS:-as}
AS=${AS}
# extra flags to assembler
ASFLAGS=${ASFLAGS}

# archiver
AR=${AR:-ar}
AR=${AR}
# extra flags to archiver
ARFLAGS=${ARFLAGS}


INC=${INC}

# linker
LD=${LD:-$CC}
# LD=${LD:-$CC}

# extra flags to compiler for linker
# such as -L
Expand Down
5 changes: 4 additions & 1 deletion auto/cc/name
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,20 @@ else
printf "${nm_found}\n"
fi

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

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

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

else
CC_NAME=unknown
printf " + using ${CC_NAME} compiler\n"
fi

Expand Down

0 comments on commit d2d4a56

Please sign in to comment.