Conversation
Also avoids opening the same file a second time to check arm64ec.
include/vcpkg/base/files.h
Outdated
| int getc() const noexcept { return ::fgetc(m_fs); } | ||
| }; | ||
|
|
||
| struct PositionedReadPointerU32 |
There was a problem hiding this comment.
To other reviewers: should we make ReadFilePointer always act like this? I would want to cut down on the number of available seeks if so.
There was a problem hiding this comment.
Is there a problem with just using ftell to create the error message instead of tracking it here?
There was a problem hiding this comment.
I was worried about 64 bit hell but that seems less hell than duplicating stuff. Done!
|
|
||
| virtual ReadFilePointer open_for_read(const Path& file_path, std::error_code& ec) const = 0; | ||
| ReadFilePointer open_for_read(const Path& file_path, LineInfo li) const; | ||
| ExpectedL<ReadFilePointer> try_open_for_read(const Path& file_path) const; |
There was a problem hiding this comment.
I think I should prepare another change that gets rid of all non-ExpectedLs here but that's for another time.
include/vcpkg/base/cofffilereader.h
Outdated
| }; | ||
|
|
||
| std::vector<MachineType> read_lib_machine_types(const ReadFilePointer& fs); | ||
| ExpectedL<DllMetadata> try_read_dll_metadata(PositionedReadPointerU32& f); |
There was a problem hiding this comment.
Perhaps this should accept an interface rather than only PositionedReadPointerU32 accept no substitutes? What do other folks think?
There was a problem hiding this comment.
I think this is fine for now; making an interface seems premature.
include/vcpkg/base/files.h
Outdated
| int getc() const noexcept { return ::fgetc(m_fs); } | ||
| }; | ||
|
|
||
| struct PositionedReadPointerU32 |
There was a problem hiding this comment.
Is there a problem with just using ftell to create the error message instead of tracking it here?
include/vcpkg/base/cofffilereader.h
Outdated
| }; | ||
|
|
||
| std::vector<MachineType> read_lib_machine_types(const ReadFilePointer& fs); | ||
| ExpectedL<DllMetadata> try_read_dll_metadata(PositionedReadPointerU32& f); |
There was a problem hiding this comment.
I think this is fine for now; making an interface seems premature.
# Conflicts: # include/vcpkg/base/messages.h # src/vcpkg/postbuildlint.cpp
|
Thanks for your contribution @dan-shaw :D. Sorry for the runaround with the parts I wrote! |
Fixes post build checks to determine whether a library is arm64ec from the load configuration table. Based off of @BillyONeal work on
applocal.