[llvm-commits] [llvm] r117701 - /llvm/trunk/utils/not/not.cpp

Frits van Bommel fvbommel at gmail.com
Fri Oct 29 15:10:37 PDT 2010


On Fri, Oct 29, 2010 at 10:20 PM, Dan Gohman <gohman at apple.com> wrote:
> Author: djg
> Date: Fri Oct 29 15:20:29 2010
> New Revision: 117701
>
> URL: http://llvm.org/viewvc/llvm-project?rev=117701&view=rev
> Log:
> not is testing for a normal exit with a non-zero value. It shouldn't
> return success if the child process is killed with a signal.
>
> Modified:
>    llvm/trunk/utils/not/not.cpp
>
> Modified: llvm/trunk/utils/not/not.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/not/not.cpp?rev=117701&r1=117700&r2=117701&view=diff
> ==============================================================================
> --- llvm/trunk/utils/not/not.cpp (original)
> +++ llvm/trunk/utils/not/not.cpp Fri Oct 29 15:20:29 2010
> @@ -9,9 +9,19 @@
>
>  #include "llvm/System/Path.h"
>  #include "llvm/System/Program.h"
> +#include "llvm/Support/raw_ostream.h"

This commit seems to have broken the CMake build because not didn't
use to depend on the LLVMSupport library. The linker errors are these:

/usr/bin/ld: CMakeFiles/not.dir/not.cpp.o: in function
main:not.cpp(.text+0xd1): error: undefined reference to 'llvm::errs()'
/usr/bin/ld: CMakeFiles/not.dir/not.cpp.o: in function
main:not.cpp(.text+0x105): error: undefined reference to
'llvm::raw_ostream::write(char const*, unsigned long)'
/usr/bin/ld: CMakeFiles/not.dir/not.cpp.o: in function
main:not.cpp(.text+0x140): error: undefined reference to
'llvm::raw_ostream::write(char const*, unsigned long)'
/usr/bin/ld: CMakeFiles/not.dir/not.cpp.o: in function
main:not.cpp(.text+0x160): error: undefined reference to
'llvm::raw_ostream::write(char const*, unsigned long)'
collect2: ld returned 1 exit status


The fix is simple though: just add LLVMSupport in front of LLVMSystem
in the accompanying CMakeLists.txt (see patch in attachment).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-cmake-not.patch
Type: text/x-diff
Size: 389 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101030/1237b894/attachment.patch>


More information about the llvm-commits mailing list