Loading...
cache-builder/FileUtils.cpp dyld-1245.1 dyld-1042.1
--- dyld/dyld-1245.1/cache-builder/FileUtils.cpp
+++ dyld/dyld-1042.1/cache-builder/FileUtils.cpp
@@ -37,6 +37,8 @@
 #include <sys/mman.h>
 #include <dispatch/dispatch.h>
 #include <mach-o/dyld.h>
+#include <System/sys/csr.h>
+#include <rootless.h>
 
 #include <string>
 #include <fstream>
@@ -87,17 +89,6 @@
                 break;
             case DT_LNK:
                 // don't follow symlinks, dylib will be found through absolute path
-#if BUILDING_SIM_CACHE_BUILDER
-                // But special case simulator WebKit and related frameworks that are installed into Cryptex path with symlinks
-                if ( recurse && dirAndFile.starts_with("/System/Library/") && dirAndFile.ends_with(".framework") ) {
-                    char symlinkContent[2048];
-                    if ( readlink(fullDirAndFile.c_str(), symlinkContent, sizeof(symlinkContent)) > 0 ) {
-                        if ( strncmp(symlinkContent, "../../../System/Cryptexes/OS/System/Library/", 44) == 0 )  {
-                            iterateDirectoryTree(pathPrefix, dirAndFile, dirFilter, fileCallback, processFiles, true);
-                       }
-                    }
-                }
-#endif
                 break;
         }
     }