Skip to content

Move modular header includes outside extern "C" scope#351

Merged
zherczeg merged 1 commit into
zherczeg:masterfrom
jcm93:fix/modules
Dec 19, 2025
Merged

Move modular header includes outside extern "C" scope#351
zherczeg merged 1 commit into
zherczeg:masterfrom
jcm93:fix/modules

Conversation

@jcm93

@jcm93 jcm93 commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

When compiling sljit with Clang modules support in a C++ project, we run into errors including certain modular Apple headers, because they are included inside an extern "C" {...} context, and C linkage for modular headers is not possible. By simply moving the includes outside of the extern "C" {...} scope, we can successfully build with modules without impacting ordinary C or C++ linkage.

When compiling sljit with Clang modules support in a C++ project, we
run into errors including certain modular Apple headers, because they
are included inside an `extern "C" {...}` context, and C linkage for
modular headers is not possible. By simply moving the includes outside
of the `extern "C" {...}` scope, we can successfully build with modules
without impacting ordinary C or C++ linkage.

@zherczeg zherczeg left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

LGTM

@zherczeg zherczeg merged commit acf9f8f into zherczeg:master Dec 19, 2025
11 checks passed
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.

2 participants