[2/2] eal: temporarily disable standard c atomics support for MSVC

Message ID 1697548427-10153-3-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series make dpdk buildable with latest msvc |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS

Commit Message

Tyler Retzlaff Oct. 17, 2023, 1:13 p.m. UTC
  MSVC will define __STDC_NO_ATOMICS__ until versions of the compiler that
support atomics is released. Currently we use the Preview version of the
compiler so skip the test of __STDC_NO_ATOMICS__ avoiding failure.

This is a temporary change until the required compiler is released
publicly but allows us to establish the MSVC CI pipeline.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/eal/include/rte_stdatomic.h | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/lib/eal/include/rte_stdatomic.h b/lib/eal/include/rte_stdatomic.h
index 8579e2d..7a081cb 100644
--- a/lib/eal/include/rte_stdatomic.h
+++ b/lib/eal/include/rte_stdatomic.h
@@ -12,9 +12,11 @@ 
 #endif
 
 #ifdef RTE_ENABLE_STDATOMIC
+#ifndef _MSC_VER
 #ifdef __STDC_NO_ATOMICS__
 #error enable_stdatomic=true but atomics not supported by toolchain
 #endif
+#endif
 
 #include <stdatomic.h>