Fix llvm_tools_dir attribute access not to fail when the variable is not
present. This directory is not really necessary to run lit tests,
and the code already accounts for it being None.
The reference was added in r313407, and it breaks the stand-alone lit
package in Gentoo.
Differential Revision: https://reviews.llvm.org/D38442
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314620
91177308-0d34-0410-b5e6-
96231b3b80d8
config.available_features.add('windows')
# Add llvm tools directory if this config is being loaded indirectly
-if config.llvm_tools_dir is not None:
+if getattr(config, 'llvm_tools_dir', None) is not None:
path = os.path.pathsep.join((config.llvm_tools_dir, config.environment['PATH']))
config.environment['PATH'] = path