-
Notifications
You must be signed in to change notification settings - Fork 118
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
Fix cross-compilation issues for aws-lc-sys #689
Merged
Merged
Conversation
This file contains 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
samuel40791765
force-pushed
the
pre-generate
branch
from
November 21, 2022 23:43
35e5dc2
to
a84d75b
Compare
samuel40791765
changed the title
Move bindgen out of aws-lc-sys
Fix cross-compilation issues for aws-lc-sys
Nov 22, 2022
skmcgrail
previously approved these changes
Nov 23, 2022
justsmth
reviewed
Nov 28, 2022
justsmth
requested changes
Nov 28, 2022
samuel40791765
force-pushed
the
pre-generate
branch
from
November 29, 2022 02:10
314b2fa
to
62e400b
Compare
samuel40791765
force-pushed
the
pre-generate
branch
from
November 29, 2022 02:12
62e400b
to
3d712c9
Compare
Verified against CMake3.0.0 and CMake3.10 that adding build options after the path work. AWS-LC requires a cmake version of at least 3.0.0 to build.
|
samuel40791765
force-pushed
the
pre-generate
branch
from
November 30, 2022 00:39
831bf45
to
daff023
Compare
justsmth
requested changes
Nov 30, 2022
Comment on lines
28
to
32
# Generate the bindings on the targetted platform as a fallback mechanism. | ||
native_bindings = ["bindgen"] | ||
# Pre-generate the bindings for crate publishing. Cannot be used simultaneously with the | ||
# native_bindings feature. This feature is only intended for internal usage. | ||
generate = ["bindgen"] |
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.
- For the feature that customers see, I think a name like "generate_bindings" would be more accurate. (The bindings will be "native" regardless.)
- Could we simply remove this "generate" feature from Cargo.toml prior to publishing the crate? Would that prevent its use?
- If we must keep this feature after publication, could we name it in a way that's more clearly internal-use-only -- like "internal_generate"?
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.
- Renamed to
generate_bindings
andinternal_generate
. - I guess we could use a removal script to remove mentions of the
generate
feature? That would provide additional complications though.
The best alternative IMO would be to place theinternal_generate
feature in a separate non-publishedgenerate
crate, like we were initially doing? Although there will be a bit of duplicate code, that would prevent us exposing this feature externally.
justsmth
previously approved these changes
Nov 30, 2022
samuel40791765
force-pushed
the
pre-generate
branch
from
December 1, 2022 17:54
2b411ca
to
9162a9a
Compare
samuel40791765
force-pushed
the
pre-generate
branch
from
December 1, 2022 17:56
9162a9a
to
91e1db4
Compare
justsmth
approved these changes
Dec 1, 2022
nebeid
approved these changes
Dec 1, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issues:
Addresses
CryptoAlg-1422
Description of changes:
bindgen
out ofaws-lc-sys
into the generation rust crate. Moved the originalbindgen
inaws-lc-sys
to a separate file under a feature flag as a fallback mechanismCall-outs:
Most of the cmake changes were backported from af25856. Added four lines of code to turn off build options
Testing:
Running the script
./generate.sh
. Tested the new aws-lc-sys crate with cross. Tests pass and call the correct bindings on the corresponding platform.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and
the ISC license.