X-Git-Url: https://git.saurik.com/apple/ld64.git/blobdiff_plain/599556ff3dd31aab68bb9685f1ed7fc4867803e7..bee7e226299dacc6d80d9cf6f1585c3d5d0645e0:/src/ld/InputFiles.h?ds=sidebyside diff --git a/src/ld/InputFiles.h b/src/ld/InputFiles.h index 608ce39..21f878a 100644 --- a/src/ld/InputFiles.h +++ b/src/ld/InputFiles.h @@ -60,7 +60,7 @@ public: InputFiles(Options& opts, const char** archName); // implementation from ld::dylib::File::DylibHandler - virtual ld::dylib::File* findDylib(const char* installPath, const char* fromPath); + virtual ld::dylib::File* findDylib(const char* installPath, const ld::dylib::File* fromDylib, bool speculative); // iterates all atoms in initial files void forEachInitialAtom(ld::File::AtomHandler&, ld::Internal& state); @@ -72,6 +72,8 @@ public: // copy dylibs to link with in command line order void dylibs(ld::Internal& state); + void archives(ld::Internal& state); + bool inferredArch() const { return _inferredArch; } void addLinkerOptionLibraries(ld::Internal& state, ld::File::AtomHandler& handler); @@ -91,13 +93,14 @@ private: ld::File* makeFile(const Options::FileInfo& info, bool indirectDylib); ld::File* addDylib(ld::dylib::File* f, const Options::FileInfo& info); void logTraceInfo (const char* format, ...) const; - void logDylib(ld::File*, bool indirect); + void logDylib(ld::File*, bool indirect, bool speculative); void logArchive(ld::File*) const; void markExplicitlyLinkedDylibs(); void checkDylibClientRestrictions(ld::dylib::File*); void createOpaqueFileSections(); bool libraryAlreadyLoaded(const char* path); - + bool frameworkAlreadyLoaded(const char* path, const char* frameworkName); + // for pipelined linking void waitForInputFiles(); static void waitForInputFiles(InputFiles *inputFiles); @@ -112,6 +115,7 @@ private: const Options& _options; std::vector _inputFiles; mutable std::set _archiveFilesLogged; + mutable std::vector _archiveFilePaths; InstallNameToDylib _installPathToDylibs; std::set _allDylibs; ld::dylib::File* _bundleLoader; @@ -144,9 +148,9 @@ private: LibraryInfo(ld::dylib::File* dylib) : _lib(dylib), _isDylib(true) {}; LibraryInfo(ld::archive::File* dylib) : _lib(dylib), _isDylib(false) {}; - bool isDylib() { return _isDylib; } - ld::dylib::File *dylib() { return (ld::dylib::File*)_lib; } - ld::archive::File *archive() { return (ld::archive::File*)_lib; } + bool isDylib() const { return _isDylib; } + ld::dylib::File *dylib() const { return (ld::dylib::File*)_lib; } + ld::archive::File *archive() const { return (ld::archive::File*)_lib; } }; std::vector _searchLibraries; };