Fix to prevent is_win flag setting with clang on macOS#867
Merged
devinamatthews merged 2 commits intoflame:masterfrom May 1, 2025
Merged
Fix to prevent is_win flag setting with clang on macOS#867devinamatthews merged 2 commits intoflame:masterfrom
devinamatthews merged 2 commits intoflame:masterfrom
Conversation
isuruf
reviewed
Apr 30, 2025
| "C compiler" "yes" found_cc | ||
|
|
||
| # Also check the compiler to see if we are (cross-)compiling for Windows | ||
| if "${found_cc}" -dM -E - < /dev/null 2> /dev/null | grep -q _WIN32; then |
Contributor
There was a problem hiding this comment.
I would suggest using grep -q "#define _WIN32" instead of checking os_name
Contributor
Author
There was a problem hiding this comment.
Thank you for the suggestion. I have updated it following your idea: 618afd3
isuruf
approved these changes
May 1, 2025
Member
devinamatthews
pushed a commit
that referenced
this pull request
Jun 7, 2025
Details: - In some cases, macOS was improperly detected as Windows due to a builtin preprocessor definition `#define TARGET_OS_WINDOWS 0`. - Update the detection to specifically look for `#define _WIN32` which more robustly detects Windows. (cherry picked from commit ec5b572)
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
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.
This pull request fixes an issue where
libblis.dylibis not created when built with clang on macOS. My execution environment and the observed problem are as follows:The cause of the problem is that the
is_winflag is incorrectly set toyesin the configure script, leading to an incorrect filename being used. On macOS with clang, whether the environment is Windows or not is indicated by the value of theTARGET_OS_WIN32macro:The configure script determines the
is_winflag by checking for the presence of the string"WIN32". This caused a false positive in the case of clang on macOS. This pull request modifies it so that the determination is made based on the value ofTARGET_OS_WIN32.