llvm-build: Add --configure-target-def-file option.

- Can be used to generate the substitution values we currently use for the various target related .def files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144345 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar
2011-11-11 00:24:00 +00:00
parent 5ed5506f18
commit b7f3bfc559
3 changed files with 115 additions and 9 deletions

View File

@ -1,16 +1,9 @@
import inspect
import os
import sys
def _write_message(kind, message):
# Get the file/line where this message was generated.
f = inspect.currentframe()
# Step out of _write_message, and then out of wrapper.
f = f.f_back.f_back
file,line,_,_,_ = inspect.getframeinfo(f)
location = '%s:%d' % (os.path.basename(file), line)
print >>sys.stderr, '%s: %s: %s' % (location, kind, message)
program = os.path.basename(sys.argv[0])
print >>sys.stderr, '%s: %s: %s' % (program, kind, message)
note = lambda message: _write_message('note', message)
warning = lambda message: _write_message('warning', message)