This is an archive of the discontinued LLVM Phabricator instance.

Emit warning if response file is not found
Needs ReviewPublic

Authored by sepavloff on Aug 7 2017, 11:19 AM.

Details

Reviewers
rnk
rsmith
Summary

If construct @foo is specified in command line, CommandLine library
tries to consider foo as a name of response file and read options
from it. If file foo is not found, it tries to open file @foo.
This behavior is compatible with libiberty, used in GCC and other
utilities.

On the other hand, if user specifies @foo, it almost certainly
means a response file named foo. If foo was not found, it is
some error like misspelling or wrong current directory but not a file
with name @foo. With this change CommandLine issues warning
response file 'foo' not found and continues execution as before.

Construct @file is a possible way to load configuration files
(see https://reviews.llvm.org/D24933). If it will be accepted,
CommandLibrary will not search for file @file, instead it will
try to load configuration file file.cfg. This warning could help
in identifying compatibility problems.

Event Timeline

sepavloff created this revision.Aug 7 2017, 11:19 AM