summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-shlib/gen-msvc-exports.py
diff options
context:
space:
mode:
authorSerge Guelton <sguelton@redhat.com>2019-03-19 09:14:09 +0000
committerSerge Guelton <sguelton@redhat.com>2019-03-19 09:14:09 +0000
commitd2f2f33ef2d071ba535e57b1637ebd9cc3206d51 (patch)
treea9261d343a1b887723aba723805181ead31dd2ca /llvm/tools/llvm-shlib/gen-msvc-exports.py
parentcd8a940b37b284bf827665c10bcb4351b6d2e1c6 (diff)
downloadbcm5719-llvm-d2f2f33ef2d071ba535e57b1637ebd9cc3206d51.tar.gz
bcm5719-llvm-d2f2f33ef2d071ba535e57b1637ebd9cc3206d51.zip
Use response file when generating LLVM-C.dll
As discovered in D56774 the command line gets to long, so use a response file to give the script the libs. This change has been tested and is confirmed working for me. Commited on behalf of Jakob Bornecrantz. Differential Revision: https://reviews.llvm.org/D56781 llvm-svn: 356443
Diffstat (limited to 'llvm/tools/llvm-shlib/gen-msvc-exports.py')
-rw-r--r--llvm/tools/llvm-shlib/gen-msvc-exports.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/llvm/tools/llvm-shlib/gen-msvc-exports.py b/llvm/tools/llvm-shlib/gen-msvc-exports.py
index 2b7291de28b..671faf11528 100644
--- a/llvm/tools/llvm-shlib/gen-msvc-exports.py
+++ b/llvm/tools/llvm-shlib/gen-msvc-exports.py
@@ -83,6 +83,10 @@ def main():
parser = argparse.ArgumentParser('gen-msvc-exports')
parser.add_argument(
+ '-i', '--libsfile', help='file with list of libs, new line separated',
+ action='store', default=None
+ )
+ parser.add_argument(
'-o', '--output', help='output filename', default='LLVM-C.exports'
)
parser.add_argument('-u', '--underscore',
@@ -93,12 +97,19 @@ def main():
'--nm', help='path to the llvm-nm executable', default='llvm-nm'
)
parser.add_argument(
- 'libs', metavar='LIBS', nargs='+', help='list of libraries to generate export from'
+ 'libs', metavar='LIBS', nargs='*', help='list of libraries to generate export from'
)
ns = parser.parse_args()
- gen_llvm_c_export(ns.output, ns.underscore, ns.libs, ns.nm)
+ libs = ns.libs
+
+ # Add if we where given a libsfile add it to the libs.
+ if ns.libsfile:
+ with open(ns.libsfile) as f:
+ libs.extend(f.read().splitlines())
+
+ gen_llvm_c_export(ns.output, ns.underscore, libs, ns.nm)
if __name__ == '__main__':
OpenPOWER on IntegriCloud