summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-11-27 23:56:04 +0100
committerMarek Olšák <[email protected]>2012-11-29 00:07:27 +0100
commit3d59cde92e22ffc651ef41f29056b7d7284bf121 (patch)
tree92efb03f85fa86c46d79d0d8d16e9d112266378f
parent9b67a347f683cec909acbe1f76345a4def3e80e6 (diff)
configure.ac: look for whole words in LLVM flags, not prefixes
Reviewed-by: Tom Stellard <[email protected]>
-rw-r--r--configure.ac11
1 files changed, 6 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index ec06d379b2c..c5cc2495d6c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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'
}