Fix compilation failure issue when compiling for armv7k architecture

Summary: @​public
Fix issues when compiling for armv7k architecture, replacing it with armv7;
Removing also unsupported flags `-fembed-bitcode-marker`, `-mwatchos-version-min` that cause compilation failures.

Reviewed By: @akotulski, @jvillard

Differential Revision: D2507687
master
martinoluca 9 years ago committed by facebook-github-bot-1
parent 76d2f66001
commit 9db0648cb1

@ -13,17 +13,24 @@ if [ "${0%++}" != "$0" ]; then XX="++"; else XX=""; fi
COMMAND=("${CLANG_COMPILER}${XX}") 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.
PREV=""
for X in "$@" for X in "$@"
do do
if [ "$X" == "-fapplication-extension" ]; then if [ "$X" == "-fapplication-extension" ] \
|| [ "$X" == "-fembed-bitcode-marker" ] \
|| [[ "$X" =~ "-mwatchos-version-min" ]]; then
continue continue
elif [ "$X" == "-gmodules" ]; then elif [ "$X" == "-gmodules" ]; then
# gmodules is an alias for "-g -fmodule-format=obj -dwarf-ext-refs" # gmodules is an alias for "-g -fmodule-format=obj -dwarf-ext-refs"
# but "-fmodule-format" is not available, so skip it for now. # but "-fmodule-format" is not available, so skip it for now.
COMMAND+=("-g" "-dwarf-ext-refs") COMMAND+=("-g" "-dwarf-ext-refs")
elif [ "$X" == "armv7k" ] && [ "$PREV" == "-arch" ]; then
# replace armv7k arch with armv7
COMMAND+=("armv7")
else else
COMMAND+=("$X") COMMAND+=("$X")
fi fi
PREV="$X"
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.

Loading…
Cancel
Save