@ -15,14 +15,19 @@ COMMAND=("${CLANG_COMPILER}${XX}")
# Remove command line options not supported by the opensource compiler or the plugins.
# Remove command line options not supported by the opensource compiler or the plugins.
for X in "$@"
for X in "$@"
do
do
if [ "$X" != "-fapplication-extension" ]
if [ "$X" == "-fapplication-extension" ]; then
then
continue
elif [ "$X" == "-gmodules" ]; then
# gmodules is an alias for "-g -fmodule-format=obj -dwarf-ext-refs"
# but "-fmodule-format" is not available, so skip it for now.
COMMAND+=("-g" "-dwarf-ext-refs")
else
COMMAND+=("$X")
COMMAND+=("$X")
fi
fi
done
done
# Never error on warnings. Clang is often more strict than Apple's version.
# Never error on warnings. Clang is often more strict than Apple's version.
# These arguments are appended to override previous opposite settings.
# These arguments are appended to override previous opposite settings.
COMMAND+=(-Wno-error -Qunused-arguments)
COMMAND+=(" -Wno-error" " -Qunused-arguments" )
"${COMMAND[@]}"
"${COMMAND[@]}"