[PATCH] D144179: [Clang] Added functionality to provide config file name via env variable

Jolanta Jensen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 27 03:36:24 PST 2023


jolanta.jensen added a comment.

In D144179#4146599 <https://reviews.llvm.org/D144179#4146599>, @MaskRay wrote:

> This looks like introducing a footgun (when something behaves differently from an upstream Clang, it would be difficult for toolchain maintainers to know why).
> Why can't your user specify `CLANG_CONFIG_FILE_SYSTEM_DIR`?

Because I don't want the user to be specifying any flags compiling. The feature is intended to be used by a system administrator who will configure the system for the user so no compile flags are necessary. That way the machines can be configured the same way for all users.
Since there were concerns about visibility of what configuration is used, I checked the driver crash report generated when a configuration file set via an environmental variable is used. The crash report will print the configuration file used and the flags specified in the configuration file will be appended to the driver args in the crash reproducer.
And finally, you already use an env variable, CLANG_NO_DEFAULT_CONFIG, to disable use of default configuration so it isn't really an introduction but rather an extension of what is already used.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144179



More information about the cfe-commits mailing list