File tree 3 files changed +13
-2
lines changed 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 109
109
110
110
PLATFORM=` sed -n ' /^PLATFORM\b/p' Makefile.config | sed ' s:[^=]*= ::' `
111
111
MACHINE=` sed -n ' /^MACHINE\b/p' Makefile.config | sed ' s:[^=]*= ::' `
112
+ COMPILER=` sed -n ' /^COMPILER\b/p' Makefile.config | sed ' s:[^=]*= ::' `
112
113
113
114
cross_target=" $PLATFORM "
114
115
if [ " $PLATFORM " = ' abs32le' ]; then
@@ -118,10 +119,18 @@ if [ "$MACHINE" = 'bmalta' ]; then
118
119
cross_target=' mips32eb'
119
120
fi
120
121
122
+ if [ " $COMPILER " = ' clang' ]; then
123
+ cross_target=" ${cross_target} _clang"
124
+ fi
125
+
121
126
cross_def=" ${SOURCE_DIR} /meson/cross/${cross_target} "
122
127
cc_arch=` sed -n " s:cc_arch = '\(.*\)':\1:p" " $cross_def " `
123
128
124
- compname=" $cc_arch -helenos-gcc"
129
+ if [ " $COMPILER " = ' clang' ]; then
130
+ compname=" $cc_arch -helenos-clang"
131
+ else
132
+ compname=" $cc_arch -helenos-gcc"
133
+ fi
125
134
unset compprefix
126
135
127
136
if which " $compname " > /dev/null 2> /dev/null; then
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ kernel_c_args = arch_kernel_c_args + kernel_defs + [
116
116
117
117
if not CONFIG_LINE_DEBUG
118
118
# Keep the debug info needed to get file names for kernel stack traces.
119
- kernel_c_args += [ ' -gdwarf-5' , ' -g1' , ' -gno-statement-frontiers' ]
119
+ kernel_c_args += cc.get_supported_arguments( [ ' -gdwarf-5' , ' -g1' , ' -gno-statement-frontiers' ])
120
120
endif
121
121
122
122
if CONFIG_LTO
Original file line number Diff line number Diff line change @@ -511,9 +511,11 @@ install_pkg() {
511
511
link_clang () {
512
512
# Symlink clang and lld to the install path.
513
513
CLANG=" ` which clang 2> /dev/null || echo " /usr/bin/clang" ` "
514
+ CLANGPP=" ` which clang++ 2> /dev/null || echo " /usr/bin/clang++" ` "
514
515
LLD=" ` which ld.lld 2> /dev/null || echo " /usr/bin/ld.lld" ` "
515
516
516
517
ln -s $CLANG " ${INSTALL_DIR}${CROSS_PREFIX} /bin/${TARGET} -clang"
518
+ ln -s $CLANGPP " ${INSTALL_DIR}${CROSS_PREFIX} /bin/${TARGET} -clang++"
517
519
ln -s $LLD " ${INSTALL_DIR}${CROSS_PREFIX} /bin/${TARGET} -ld.lld"
518
520
}
519
521
You can’t perform that action at this time.
0 commit comments