[PATCH] D69611: [update_cc_test_checks.py] Pass the builtin include dir to clang
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 31 04:21:39 PDT 2019
arichardson updated this revision to Diff 227261.
arichardson added a comment.
Improve commit message
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69611/new/
https://reviews.llvm.org/D69611
Files:
llvm/utils/update_cc_test_checks.py
Index: llvm/utils/update_cc_test_checks.py
===================================================================
--- llvm/utils/update_cc_test_checks.py
+++ llvm/utils/update_cc_test_checks.py
@@ -119,6 +119,18 @@
print('Please specify --llvm-bin or --clang', file=sys.stderr)
sys.exit(1)
+ # Determine the builtin includes directory so that we can update tests that
+ # depend on the builtin headers. See get_clang_builtin_include_dir() and
+ # use_clang() in llvm/utils/lit/lit/llvm/config.py.
+ try:
+ builtin_include_dir = subprocess.check_output(
+ [args.clang, '-print-file-name=include']).decode().strip()
+ SUBST['%clang_cc1'] = ['-cc1', '-internal-isystem', builtin_include_dir,
+ '-nostdsysteminc']
+ except subprocess.CalledProcessError:
+ common.warn('Could not determine clang builtins directory, some tests '
+ 'might not update correctly.')
+
if args.opt is None:
if args.llvm_bin is None:
args.opt = 'opt'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69611.227261.patch
Type: text/x-patch
Size: 1007 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191031/0e54fa47/attachment.bin>
More information about the llvm-commits
mailing list