Replace the gmodules flag of Xcode's clang with equivalent ones

Summary:
See D2465673, replacing `-gmodule` with equivalent flags, as per http://reviews.llvm.org/D11958
The `-fmodule-format` is not available on Xcode's clang, so skip it for now.
master
martinoluca 9 years ago
parent b810ae68b4
commit 6553ba2379

@ -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[@]}"

Loading…
Cancel
Save