-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Switch to putenv to fix compilation with llvm-mingw #6101
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
Conversation
Replaces `setenv` with `putenv` because `setenv` is not available on some toolchains (e.g., llvm-mingw, clang-cl), leading to compilation errors.
|
The binary size change of libncnn.so (bytes)
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6101 +/- ##
=======================================
Coverage 95.70% 95.70%
=======================================
Files 827 827
Lines 270161 270161
=======================================
Hits 258562 258562
Misses 11599 11599 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull Request Overview
This PR replaces POSIX setenv calls with putenv to resolve build errors on toolchains lacking setenv (e.g., llvm-mingw, clang-cl).
- Swaps two
setenvinvocations forputenvin the OpenMP environment initializer. - Ensures environment variables
KMP_AFFINITYandKMP_DUPLICATE_LIB_OKare set on startup.
|
Thanks for your contribution ! |
Replaces
setenvwithputenvbecausesetenvis not available on some toolchains (e.g., llvm-mingw, clang-cl), leading to compilation errors.