Skip to content
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

allow C atomics on C++ with -d:nimUseCAtomics #24207

Merged
merged 1 commit into from
Sep 30, 2024
Merged

Conversation

metagn
Copy link
Collaborator

@metagn metagn commented Sep 30, 2024

refs #24200 (comment)

Workaround for C++ Atomic[T] issues that doesn't require a compiler change. Not tested or documented in case it's not meant to be officially supported, locally tested tatomics and #24159 to work with it though, can add these as tests if required.

@Araq Araq merged commit febc58e into nim-lang:devel Sep 30, 2024
19 checks passed
@Araq
Copy link
Member

Araq commented Sep 30, 2024

I like it.

Copy link
Contributor

Thanks for your hard work on this PR!
The lines below are statistics of the Nim compiler built from febc58e

Hint: mm: orc; opt: speed; options: -d:release
174576 lines; 8.446s; 654.496MiB peakmem

narimiran pushed a commit that referenced this pull request Sep 30, 2024
refs #24200 (comment)

Workaround for C++ Atomic[T] issues that doesn't require a compiler
change. Not tested or documented in case it's not meant to be officially
supported, locally tested `tatomics` and #24159 to work with it though,
can add these as tests if required.

(cherry picked from commit febc58e)
Araq pushed a commit that referenced this pull request Sep 30, 2024
refs #24207

The `-d:nimUseCAtomics` flag added in #24207 is now inverted and made
into `-d:nimUseCppAtomics`, which means C++ atomics are only enabled
with the define. This flag is now also documented and tested.
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