[libcxx-commits] [PATCH] D61039: [libcxx] Use relative path for libc++ library when generating script

Petr Hosek via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 23 15:53:25 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rCXX359045: [libcxx] Use relative path for libc++ library when generating script (authored by phosek, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D61039?vs=196327&id=196350#toc

Repository:
  rCXX libc++

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61039/new/

https://reviews.llvm.org/D61039

Files:
  utils/gen_link_script.py


Index: utils/gen_link_script.py
===================================================================
--- utils/gen_link_script.py
+++ utils/gen_link_script.py
@@ -29,11 +29,14 @@
                         help="List of libraries libc++ depends on")
     args = parser.parse_args()
 
+    # Use the relative path for the libc++ library.
+    libcxx = os.path.relpath(args.input, os.path.dirname(args.output))
+
     # Prepare the list of public libraries to link.
     public_libs = ['-l%s' % l for l in args.libraries]
 
     # Generate the linker script contents.
-    contents = "INPUT(%s)" % ' '.join([args.input] + public_libs)
+    contents = "INPUT(%s)" % ' '.join([libcxx] + public_libs)
     print("GENERATING SCRIPT: '%s' as file %s" % (contents, args.output))
 
     if args.dryrun:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61039.196350.patch
Type: text/x-patch
Size: 791 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190423/b4734581/attachment.bin>


More information about the libcxx-commits mailing list