[all-commits] [llvm/llvm-project] 924996: [clang] [Driver] Disable default configs via envva...
Michał Górny via All-commits
all-commits at lists.llvm.org
Fri Sep 30 00:12:12 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 924996e0a011eb833a72d2a2cac9b40fa8a42e34
https://github.com/llvm/llvm-project/commit/924996e0a011eb833a72d2a2cac9b40fa8a42e34
Author: Michał Górny <mgorny at gentoo.org>
Date: 2022-09-30 (Fri, 30 Sep 2022)
Changed paths:
M clang/lib/Driver/Driver.cpp
M clang/test/Driver/config-file3.c
M clang/test/Driver/env.c
M clang/test/Unit/lit.cfg.py
M clang/test/lit.cfg.py
Log Message:
-----------
[clang] [Driver] Disable default configs via envvar during testing
Add support for a CLANG_NO_DEFAULT_CONFIG envvar that works like
the --no-default-config option when set to a non-empty value. Use it
to disable loading system configuration files during the test suite
runs.
Configuration files can change the driver behavior in extensive ways,
and it is neither really possible nor feasible to account for or undo
the effects of even the most common configuration uses. Therefore,
the most reasonable option seems to be to ignore configuration files
while running the majority of tests (with the notable exception of tests
for configuration file support).
Due to the diversity of ways that %clang is used in the test suite,
including using it to copy or symlink the clang executable, as well to
call -cc1 and -cc1as modes, it is not feasible to pass the explicit
options to disable config loading either. Using an environment variable
has the advantage of being easily applied across the test suite
and easily unset for default configuration file loading tests.
Differential Revision: https://reviews.llvm.org/D134905
More information about the All-commits
mailing list