Skip to content

Adds arm64ec support#812

Merged
BillyONeal merged 12 commits intomicrosoft:mainfrom
dan-shaw:arm64ec-fix
Dec 8, 2022
Merged

Adds arm64ec support#812
BillyONeal merged 12 commits intomicrosoft:mainfrom
dan-shaw:arm64ec-fix

Conversation

@dan-shaw
Copy link
Copy Markdown
Contributor

Fixes post build checks to determine whether a library is arm64ec from the load configuration table. Based off of @BillyONeal work on applocal.

Copy link
Copy Markdown
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

int getc() const noexcept { return ::fgetc(m_fs); }
};

struct PositionedReadPointerU32
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a problem with just using ftell to create the error message instead of tracking it here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I should prepare another change that gets rid of all non-ExpectedLs here but that's for another time.

};

std::vector<MachineType> read_lib_machine_types(const ReadFilePointer& fs);
ExpectedL<DllMetadata> try_read_dll_metadata(PositionedReadPointerU32& f);
Copy link
Copy Markdown
Member

@BillyONeal BillyONeal Nov 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this should accept an interface rather than only PositionedReadPointerU32 accept no substitutes? What do other folks think?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine for now; making an interface seems premature.

int getc() const noexcept { return ::fgetc(m_fs); }
};

struct PositionedReadPointerU32
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a problem with just using ftell to create the error message instead of tracking it here?

};

std::vector<MachineType> read_lib_machine_types(const ReadFilePointer& fs);
ExpectedL<DllMetadata> try_read_dll_metadata(PositionedReadPointerU32& f);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine for now; making an interface seems premature.

@BillyONeal BillyONeal merged commit 8e85e65 into microsoft:main Dec 8, 2022
@BillyONeal
Copy link
Copy Markdown
Member

Thanks for your contribution @dan-shaw :D. Sorry for the runaround with the parts I wrote!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants