-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add post build check to verify that the libs on macOS have the right architecture #163
Add post build check to verify that the libs on macOS have the right architecture #163
Conversation
hmm can this be generalized to include apple and normal linux with objdump instead?
|
I don't know objdump very good, but it seems that it does not support universal binaries:
it also returns sometimes errors where lipo just works:
|
Here an example that shows that it works: Log
|
de502ef
to
8377d64
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good; we should also set up testing for arm64-osx I think.
src/vcpkg/postbuildlint.cpp
Outdated
return LintStatus::ERROR_DETECTED; | ||
} | ||
#elif defined(__APPLE__) | ||
std::vector<FileAndArch> binaries_with_invalid_architecture; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would be better implemented as a separate function unless it can actually share some of the implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the function name was very matching and it is doing the, but now for mac. If you want I can change it, but I would prefer the current solution.
842bd26
to
d28f208
Compare
What is the state of this PR? |
c074b8e
to
7c2a157
Compare
It looks like this has an infinite loop; can you take a look? |
7c2a157
to
3b2504d
Compare
Ready now. |
Any news? |
Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com>
I do want @ras0219-msft's review on this. |
c3e99cd
to
4caa455
Compare
Ping @ras0219-msft for review :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved after my comments are addressed. Thanks for the PR and happy holidays!
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Nicole poked Robert in person about taking another look at this one today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are still a few deficiencies, but I don't think this makes our current situation worse except perhaps cross-compiling from MacOS to Windows with MinGW, which according to my reading will now crash when lipo fails to understand the PE binaries.
I would like to see the hard crashes downgraded to warnings, but it's only a suggestion and I see no blocking issues for this PR.
... or mingw in general? #23450 |
Fixes microsoft/vcpkg#19623