[PATCH] D116196: [clangd] Add CompileFlags.Compiler option to override argv0

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 4 01:35:45 PST 2022


kadircet accepted this revision.
kadircet added a comment.
This revision is now accepted and ready to land.

thanks!



================
Comment at: clang-tools-extra/clangd/ConfigFragment.h:140
+    /// The name can affect how flags are parsed (clang++ vs clang).
+    /// If the executable name is in the --query-driver allowlist, then it will
+    /// be invoked to extract include paths.
----------------
not sure if query-driver interactions is worth explaining here


================
Comment at: clang-tools-extra/clangd/ConfigFragment.h:143
+    ///
+    /// (Note that this simply replaces argv[0], and may mangle commands that
+    /// use more complicated drivers like ccache).
----------------
i am also afraid of this :/ in theory json compilation database already drops well-known wrappers and users that use another medium to communicate flags should be responsible of taking care of this, so hopefully it won't bite us badly


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116196



More information about the cfe-commits mailing list