Skip to content

Coverage tracer extension fails to build with VS2019 #2145

@itamaro

Description

@itamaro

When trying to compile the tracer extension with VS2019, it fails due to the recently introduced dependency on c11 stdatomic.h

coverage\ctracer\util.h(8): fatal error C1083: Cannot     
  open include file: 'stdatomic.h': No such file or directory      

Is a newer MSVC (newer than 14.29 I believe) now a requirement for building on Windows?
Would it be possible to provide a fallback for older MSVC versions?
Here's one possible fallback that Claude Code suggested:

+#if defined(_MSC_VER) && _MSC_VER < 1939                                                  
+#define _Atomic volatile                                                                  
+#define atomic_load(p) (*(p))                                                             
+#define atomic_store(p, v) (*(p) = (v))                                                   
+#else                                                                                     
 #include <stdatomic.h>
+#endif  

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions