[Lldb-commits] [PATCH] D24591: [LIT] First pass of LLDB LIT support
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 14 16:33:14 PDT 2016
zturner added a comment.
One more question: Is there a way in lit that we can append command line flags to the run lines even if the user doesn't specify them? For example in the substitution?
For example, if someone writes `# RUN: %cxx %p/Inputs/call-function.cpp -g -o %t && %lldb -b -s %s -- %t | FileCheck %s` then this is always going to run `clang function.cpp -g -o`. But we need to manipulate the command line on different platforms. Like on Windows we will need to add `-fms-compatibility` `-fuse-ld=lld`, and various other things. And on other platforms there are other specific things that always have to be added. Is this possible somehow?
(You don't have to address it in this patch, just curious)
Comment at: lit/CMakeLists.txt:14
@@ -13,1 +13,3 @@
+option(LLDB_TEST_CLANG "Use in-tree clang when testing lldb" Off)
> Disallowing setting both seems reasonable to me. I'm not entirely sure how to connect `LLDB_TEST_COMPILER` up into the lit suite because we really want something that more matches the CMake style of `..._<LANG>_COMPILER` so that we could override multiple compilers.
What if you added a parallel of `LLDB_TEST_COMPILER` directly in this file, that is used specifically for lit tests? Like `LLDB_LIT_TEST_COMPILER` or `LLDB_LIT_CLANG_PATH`?
The only reason I'm harping on this is because as it stands, this won't work on windows. (The host compiler is MSVC, which uses a completely different command line syntax, and the in-tree clang is going to be a debug one when doing a debug build, which is going to be unacceptably slow).
More information about the lldb-commits