Skip to content

Conversation

@quic-k
Copy link
Contributor

@quic-k quic-k commented Oct 28, 2025

fixes #164932

@github-actions
Copy link

github-actions bot commented Oct 28, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

Signed-off-by: Kushal Pal <kushpal@qti.qualcomm.com>

#if defined(__GNUC__) || defined(__clang__) || defined(_MSC_VER)

#if defined(__linux__) && __STDC_HOSTED__
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this limited to Linux?

Copy link
Contributor Author

@quic-k quic-k Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw nearby files using __linux__ as the checking macro for assert.h, so I added it
but just __STDC_HOSTED__ should be fine as well

should I remove __linux__?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please remove __linux__. Using __STDC_HOSTED__ is reasonable - that indicates we are in a hosted environment (we have libc).

} else
__cpu_model.__cpu_vendor = VENDOR_OTHER;

#if defined(__linux__) && __STDC_HOSTED__
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise

@quic-k quic-k requested a review from compnerd October 31, 2025 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[compiler-rt][x86] assert.h not found when trying to build builtins without a libc

3 participants