]> git.ipfire.org Git - thirdparty/libtool.git/commit
libtool: Discard "-mllvm $arg" options when linking.
authorBrooks Moses <bmoses@google.com>
Wed, 9 Oct 2013 19:32:48 +0000 (12:32 -0700)
committerBrooks Moses <bmoses@google.com>
Wed, 9 Oct 2013 19:32:48 +0000 (12:32 -0700)
commitd9a35fe9d3508b5c0d56e7f2ec80fc05e8415fa3
tree829a935820a219f567102f82e208dbc665ab41c0
parentf7e760d7386ac5938fab0a8fddf25ca501608c18
libtool: Discard "-mllvm $arg" options when linking.

Clang accepts options of the form "-mllvm $arg", and passes the
argument as an option to LLVM.  These options caused problems
for Libtool when linking; in some cases, the -mllvm option is
passed through but the corresponding argument is dropped.  (See
for example http://llvm.org/bugs/show_bug.cgi?id=14716.)

This patch resolves the issue by explicitly matching -mllvm and
taking an argument.  Since Clang never uses LLVM for linking,
the matched "-mllvm $arg" option is irrelevant for the link
step, and we can simply discard it once we've recognized it.

Co-authored-by: Johannes Obermayr <johannesobermayr@gmx.de>
Copyright-paperwork-exempt: Yes
build-aux/ltmain.in