-
Notifications
You must be signed in to change notification settings - Fork 60
Fix building NativeShims on OSX #109
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
At one point we used custom toolchain files. It had set the
CMAKE_OSX_ARCHITECTURE
option among others. We probably unintentionally stopped using them when we started using VCPKG.I'd recommend taking a look at the ones we have in the
cmake/
subfolder. We should probably either start using them as overlays (I think that's the term vcpkg uses) or get rid of them.Either way - would probably be good to check to see if there are other settings that were used once upon a time that might be worth reintroducing.
I'd also double check to see if
VCPKG_TARGET_TRIPLET
doesn't already set/implyCMAKE_OSX_ARCHITECTURES
if you haven't done so already.Uh oh!
There was an error while loading. Please reload this page.
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.
Good points! I did some investigations here and this is what I found out:
Although the triplets set
VCPKG_OSX_ARCHITECTURES
to correct values, those are not used at all on OSX leavingCMAKE_OSX_ARCHITECTURES
undefined, which will fail linkage for specific build/host/target combinations. Explicitly defining the value for each target platform fixes the issue.I was not aware of the
cmake/osx*cmake
files, currently they are not used and in the original commit they served as the main toolchain files. They could be reused throughVCPKG_CHAINLOAD_TOOLCHAIN_FILE
but I don’t see any advantage to just using-DCMAKE_OSX_ARCHITECTURES
as vcpkg is used now.See also that the
cmake/osx*cmake
files do cache the specificCMAKE_OSX_ARCHITECTURES
value (functionally same effect as using the explicit-D
).My way forward would be to use
-DCMAKE_OSX_ARCHITECTURES=arch
and delete the unused cmake files. What do you think?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.
Yes, that sounds quite reasonable to me. Thanks Adam!
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.
+1 for simplifying and deleting unused files. Thanks @AdamVe !