ben.boeckel added inline comments.

================
Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:197
+llvm::cl::opt<std::string> P1689TargetedCommand(
+    "p1689-targeted-command", llvm::cl::Optional,
+    llvm::cl::desc("Only supported for P1689, the targeted command of which "
----------------
ben.boeckel wrote:
> ChuanqiXu wrote:
> > ben.boeckel wrote:
> > > ChuanqiXu wrote:
> > > > ben.boeckel wrote:
> > > > > Can this be something like `--` so that I don't have to figure out 
> > > > > how to quote the thing (for the shell and whatever parsing Clang does 
> > > > > internally)?
> > > > Yeah, it can. Both `-` and `--` are accepted. I've updated the test to 
> > > > disambiguate.
> > > I don't mean the flag using `--` as a prefix. I don't care about that. 
> > > What I *do* care about is having to quote everything I'd give to `clang` 
> > > here. I'd vastly prefer something like:
> > > 
> > > ```
> > > clang-scan-deps -p1689-targeted-file-name=… -p1689-use-command -- -flags 
> > > --for ---clang --go --here
> > > ```
> > I got your point. But I prefer the current style if it won't be a problem 
> > for you to quote the options. In my imagination, it would be easier for the 
> > build systems to quote the flags than we synthesis things here. I guess 
> > there should already be one existing command line in the build system. And 
> > I feel like the current style may be more convenient and friendly for other 
> > tools to use. Could you try to use the current style?
> I don't think CMake has a mechanism for that at all right now. The problem is 
> knowing how to quote things. Is it specified how Clang will parse this string 
> into arguments? Is it platform-dependent?
Ah, it is the same as the compilation database parsing.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137534/new/

https://reviews.llvm.org/D137534

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to