[libcxx-commits] [libcxx] r369757 - libcxx: Make gen_link_script.py print contents only in --dryrun mode

Nico Weber via libcxx-commits libcxx-commits at lists.llvm.org
Fri Aug 23 06:40:54 PDT 2019


Author: nico
Date: Fri Aug 23 06:40:54 2019
New Revision: 369757

URL: http://llvm.org/viewvc/llvm-project?rev=369757&view=rev
Log:
libcxx: Make gen_link_script.py print contents only in --dryrun mode

The build should generally be quiet if there are no errors,
and this script has been around long enough that we can remove
the log output. If we ever need to debug something with this script,
we can put back the logging then.

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

Modified:
    libcxx/trunk/utils/gen_link_script.py

Modified: libcxx/trunk/utils/gen_link_script.py
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/gen_link_script.py?rev=369757&r1=369756&r2=369757&view=diff
==============================================================================
--- libcxx/trunk/utils/gen_link_script.py (original)
+++ libcxx/trunk/utils/gen_link_script.py Fri Aug 23 06:40:54 2019
@@ -24,7 +24,8 @@ def main():
     parser.add_argument("--rename", action="store_true", default=False,
                         help="Rename the output as input so we can replace it")
     parser.add_argument("--input", help="Path to libc++ library", required=True)
-    parser.add_argument("--output", help="Path to libc++ linker script", required=True)
+    parser.add_argument("--output", help="Path to libc++ linker script",
+                        required=True)
     parser.add_argument("libraries", nargs="+",
                         help="List of libraries libc++ depends on")
     args = parser.parse_args()
@@ -37,9 +38,9 @@ def main():
 
     # Generate the linker script contents.
     contents = "INPUT(%s)" % ' '.join([libcxx] + public_libs)
-    print("GENERATING SCRIPT: '%s' as file %s" % (contents, args.output))
 
     if args.dryrun:
+        print("GENERATING SCRIPT: '%s' as file %s" % (contents, args.output))
         return 0
 
     # Remove the existing libc++ symlink if it exists.




More information about the libcxx-commits mailing list