[libcxx] Fix default argument for merge_archives.py -L flag
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Wed, 22 Jul 2020 17:32:34 +0000 (18:32 +0100)
committerAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Wed, 22 Jul 2020 17:32:34 +0000 (18:32 +0100)
If we use the default of None, we get a python exception in
find_and_diagnose_missing() instead of printing a sensible error message.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D84342

libcxx/utils/merge_archives.py

index cc96cb2..d751526 100755 (executable)
@@ -93,7 +93,7 @@ def main():
     parser.add_argument(
         '-L', dest='search_paths',
         help='Paths to search for the libraries along', action='append',
-        nargs=1)
+        nargs=1, default=[])
     parser.add_argument(
         '--ar', dest='ar_exe', required=False,
         help='The ar executable to use, finds \'ar\' in the path if not given',