[PATCH] D93277: [lld-macho] Add implicit dylib support for frameworks

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 15 09:27:00 PST 2020


int3 added inline comments.


================
Comment at: lld/MachO/InputFiles.cpp:514
+
+  // Match /System/Library/Frameworks/$FOO.framework/**/$FOO
+  if (path.consume_front("/System/Library/Frameworks/")) {
----------------
thakis wrote:
> This matches `File<A>::isPublicLocation` in ld64 which lists a few special cases here https://github.com/apple-opensource/ld64/blob/fd3feabb0a1eb18ab5d7910f3c3a5eed99cef6ab/src/ld/parsers/generic_dylib_file.hpp#L490 that this code as-is doesn't quite get right yet I think:
> 
> ```
> 		// but only top level framework
> 		// /System/Library/Frameworks/Foo.framework/Versions/A/Foo                 ==> true
> 		// /System/Library/Frameworks/Foo.framework/Resources/libBar.dylib         ==> false
> 		// /System/Library/Frameworks/Foo.framework/Frameworks/Bar.framework/Bar   ==> false
> 		// /System/Library/Frameworks/Foo.framework/Frameworks/Xfoo.framework/XFoo ==> false
> ```
I think the code gets this right, but I'll extend the test to verify :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93277



More information about the llvm-commits mailing list