configure.ac: look for whole words in LLVM flags, not prefixes

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
This commit is contained in:
Marek Olšák 2012-11-27 23:56:04 +01:00
parent 9b67a347f6
commit 3d59cde92e

View File

@ -1644,13 +1644,14 @@ AC_ARG_WITH([llvm-prefix],
# Call this inside ` ` to get the return value.
# $1 is the llvm-config command with arguments.
strip_unwanted_llvm_flags() {
# Use \> (marks the end of the word)
echo `$1` | sed \
-e 's/-DNDEBUG\>//g' \
-e 's/-pedantic//g' \
-e 's/-Wcovered-switch-default//g' \
-e 's/-O.//g' \
-e 's/-g//g' \
-e 's/-Wall//g'
-e 's/-pedantic\>//g' \
-e 's/-Wcovered-switch-default\>//g' \
-e 's/-O.\>//g' \
-e 's/-g\>//g' \
-e 's/-Wall\>//g'
}