The verbose output is below. If I run the two commands on the command line, 
they both succeed, but when I run them through build.py, the link command is 
failing. I suspect that the process that gets created through python doesn't 
inherit the environment with the PATH set, so it can't find the linker.


compiling main.c -> exec-next-instruction.test.tmp-main.o
  Command Line: /vstsdrive/_work/42/b/LLVMBuild/bin/clang++ -m64 -g -O0 
-nostdinc -static -c -o 
/vstsdrive/_work/42/b/LLVMBuild/tools/lldb/lit/tools/lldb-mi/exec/Output/exec-next-instruction.test.tmp-main.o
 /vstsdrive/_work/42/s/llvm/tools/lldb/lit/tools/lldb-mi/exec/inputs/main.c
  Env:
  STDOUT:




linking exec-next-instruction.test.tmp-main.o -> exec-next-instruction.test.tmp
  Command Line: /vstsdrive/_work/42/b/LLVMBuild/bin/clang++ -m64 -nostdlib 
-static -Wl,-e,main -o 
/vstsdrive/_work/42/b/LLVMBuild/tools/lldb/lit/tools/lldb-mi/exec/Output/exec-next-instruction.test.tmp
 
/vstsdrive/_work/42/b/LLVMBuild/tools/lldb/lit/tools/lldb-mi/exec/Output/exec-next-instruction.test.tmp-main.o
  Env:
  STDOUT:

  STDERR:
    clang-8: error: unable to execute command: Executable "ld" doesn't exist!
    clang-8: error: linker command failed with exit code 1 (use -v to see 
invocation)



-----Original Message-----
From: Pavel Labath <pa...@labath.sk> 
Sent: Friday, December 14, 2018 11:48 AM
To: reviews+d55430+public+4cf420cdda71e...@reviews.llvm.org; 
ztur...@google.com; Stella Stamenova <sti...@microsoft.com>
Cc: llvm-comm...@lists.llvm.org; joker....@gmail.com; dexonsm...@apple.com; 
lldb-commits@lists.llvm.org
Subject: Re: [PATCH] D55430: build.py: Implement "gcc" builder

On 14/12/2018 20:32, Stella Stamenova via Phabricator wrote:
> stella.stamenova added a comment.
> 
> I am trying to use the new builder to build the lldb-mi tests, so that they 
> can start consistently passing on Windows, so they're now using the gcc 
> builder on Linux and failing:

Interesting. Can you run the script in verbose mode so I can see the exact 
commands it executes?

Not being able to find the linker is weird. Can you check whether you have 
/usr/bin/ld on your system? Maybe we need to add something to the PATH? Is that 
clang binary capable of producing executables when you run it manually?
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to