File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -1036,10 +1036,21 @@ prepare_build()
10361036 $" Check $build_dir for more information."
10371037 done
10381038
1039- if [[ -e $kernel_source_dir /.config ]]; then
1040- cc=$( sed -n ' s|^CONFIG_CC_VERSION_TEXT="\([^ ]*\) .*"|\1|p' $kernel_source_dir /.config)
1041- if command -v " $cc " > /dev/null; then
1042- export CC=" $cc "
1039+ if [[ -e " ${kernel_config} " ]]; then
1040+ if grep -q ' CONFIG_CC_IS_CLANG=y' " ${kernel_config} " ; then
1041+ local cc=clang
1042+ if command -v " $cc " > /dev/null; then
1043+ export CC=" $cc "
1044+ export KERNEL_CC=" $cc "
1045+ fi
1046+ fi
1047+
1048+ if grep -q ' CONFIG_LD_IS_LLD=y' " ${kernel_config} " ; then
1049+ local ld=ld.lld
1050+ if command -v " $ld " > /dev/null; then
1051+ export LD=" $ld "
1052+ export KERNEL_LD=" $ld "
1053+ fi
10431054 fi
10441055 fi
10451056
You can’t perform that action at this time.
0 commit comments