Skip to content
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

Remove special s2n-bignum symbol handling sauce from build #1903

Merged

Conversation

torben-hansen
Copy link
Contributor

@torben-hansen torben-hansen commented Oct 2, 2024

Description of changes:

Symbols from s2n-bignum needed special build shenanigans because they essentially are "third-party" (although still AWS owned) in the context of what code AWS-LC repository can touch. Therefore they didn't have the special "prefix" header files. This corrupts the prefix build in two ways that needed to be handled:

  • references to s2n-bignum files are prefixed, but the definitions are not. Obviously, this doesn't work...
  • when we test the prefix build, we must take care to not assume s2n-bignum symbols are prefixed...

Removing these two corruptions, means it's now a bit easier to import s2n-bignum code. A small step closer to maybe switching to a submodule.

Should also make the rust build easier. Hopefully...

Call-outs:

Originally I went with a method that required s2n-bignum source code changes. Essentially, one can define a path to prefix symbols and inject into the pre-processor we run s2n-bignum files through. The benefit is that we don't have to reason about tooling. It's just simple macro gymnastics.

Andrew suggested --include flag as a way to not do s2n-bignum code changes. That seems a bit easier for now. We can revert to another more portable method if required. Having more AWS-LC special sauce in s2n-bignum is not the preferred for sure.

Testing:

CI has several test suites for the prefix build.

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.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.46%. Comparing base (ff56e55) to head (8199465).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1903   +/-   ##
=======================================
  Coverage   78.45%   78.46%           
=======================================
  Files         585      585           
  Lines       99517    99517           
  Branches    14241    14243    +2     
=======================================
+ Hits        78077    78084    +7     
+ Misses      20806    20797    -9     
- Partials      634      636    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@torben-hansen torben-hansen marked this pull request as ready for review October 2, 2024 23:51
@torben-hansen torben-hansen requested a review from a team as a code owner October 2, 2024 23:51
@torben-hansen torben-hansen merged commit 8e14018 into aws:main Oct 3, 2024
109 of 111 checks passed
torben-hansen added a commit that referenced this pull request Oct 8, 2024
Accidentally added the same option twice in #1903 when invoking the pre-processor. Not fatal, but also not necessary... So, remove the duplicate option.
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.

4 participants