[PATCH] D140167: [lld-macho] Don't rewrite -rpath arguments in response file
    Jez Ng via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Dec 15 13:56:13 PST 2022
    
    
  
int3 created this revision.
int3 added a reviewer: lld-macho.
Herald added projects: lld-macho, All.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
We only want to rewrite paths to files that the linker looks up. Files
under RPATH are looked up at runtime by dyld.
Repository:
  rG LLVM Github Monorepo
https://reviews.llvm.org/D140167
Files:
  lld/MachO/DriverUtils.cpp
  lld/test/MachO/reproduce.s
Index: lld/test/MachO/reproduce.s
===================================================================
--- lld/test/MachO/reproduce.s
+++ lld/test/MachO/reproduce.s
@@ -11,6 +11,7 @@
 # RUN:     -exported_symbols_list main.exports \
 # RUN:     -order_file main.order \
 # RUN:     -sectcreate __COMPLETELY __legit sectdata.txt \
+# RUN:     -rpath /usr/lib/swift \
 # RUN:     build1/foo.o -o bar --reproduce repro1.tar
 
 # RUN: tar tf repro1.tar | FileCheck -DPATH='%:t.dir' --check-prefix=LIST %s
@@ -30,6 +31,7 @@
 # RSP1-NEXT: -exported_symbols_list [[BASEDIR:.+]]/main.exports
 # RSP1-NEXT: -order_file [[BASEDIR]]/main.order
 # RSP1-NEXT: -sectcreate __COMPLETELY __legit [[BASEDIR]]/sectdata.txt
+# RSP1-NEXT: -rpath /usr/lib/swift
 # RSP1-NOT:  {{^}}repro1{{[/\\]}}
 # RSP1-NEXT: [[BASEDIR]]/build1/foo.o
 # RSP1-NEXT: -o bar
Index: lld/MachO/DriverUtils.cpp
===================================================================
--- lld/MachO/DriverUtils.cpp
+++ lld/MachO/DriverUtils.cpp
@@ -159,7 +159,6 @@
     case OPT_bundle_loader:
     case OPT_exported_symbols_list:
     case OPT_order_file:
-    case OPT_rpath:
     case OPT_syslibroot:
     case OPT_unexported_symbols_list:
       os << arg->getSpelling() << " " << quote(rewritePath(arg->getValue()))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140167.483333.patch
Type: text/x-patch
Size: 1272 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221215/80c76843/attachment.bin>
    
    
More information about the llvm-commits
mailing list