[v2,2/2] eal: disable standard c atomics support check for MSVC

Message ID 1697550563-17532-3-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
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
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS

Commit Message

Tyler Retzlaff Oct. 17, 2023, 1:49 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>