-
Notifications
You must be signed in to change notification settings - Fork 833
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
Don't attempt to include system headers when not required #7813
Conversation
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 believe this would be solved with SINGLE_THREADED
and NO_FILESYSTEM
. Which headers were being included? What use case is this solving? Is it tied to a support ticket?
For example I still see:
types.h:
#else /* fallback to architecture size_t for pointer size */
#include <stddef.h> /* included for getting size_t type */
typedef size_t wc_ptr_t;
types.h:
#else
#include <stdio.h>
#define XSNPRINTF snprintf
Also had to add -DWOLFSSL_NO_ATOMICS
to get rid of atomics #include <stdatomic.h>
.
Just to name a few. I was able to use -save-temps=obj
to see the headers getting pulled in.
The customer didn't open a PR, it is part of the Dilithium work. My concern was that we include other system headers in the alternate branches that aren't related to threading and filesystem. Excluding all system headers is what they want to do. Would you rahter I changed the condition to single threaded and no filesyetem? |
The else case at the bottom already guards on single_threaded and no_filesystem. Are you seeing something besides the else case like USE_WINDOWS_API? If so I think you should just change it to gate this section on those two macros instead of introducing a new macro. |
a449727
to
2aedfc9
Compare
Changed code to not try to include header files when single threaded and no filesystem. |
2aedfc9
to
b4aee7c
Compare
Some builds don't require system headers: no filesystem and single threaded.
b4aee7c
to
0e0c363
Compare
Description
Some builds don't require system headers: no filesystem and single threaded.
Testing
./configure '--disable-shared' '--disable-filesystem' '--enable-singlethreaded'
Checklist