Skip to content

Commit fe51a5f

Browse files
committed
[#26696]DocDB: Limit Wno-vla-cxx-extension to only apple clang17+
Summary: LLVM clang17 does not support `vla-cxx-extension`, so limit `Wno-vla-cxx-extension` to only apple `clang` v17+ Fixes #26696 Jira: DB-16072 Test Plan: Jenkins Reviewers: esheng Reviewed By: esheng Subscribers: ybase Differential Revision: https://phorge.dev.yugabyte.com/D43039
1 parent e62a1e2 commit fe51a5f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CMakeLists.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,10 @@ if(IS_CLANG)
376376
ADD_CXX_FLAGS("-Wshorten-64-to-32")
377377

378378
# Allow variable length arrays in C++.
379+
379380
if("${COMPILER_VERSION}" VERSION_GREATER_EQUAL "18.0.0" OR
380-
(APPLE AND "${COMPILER_VERSION}" VERSION_GREATER_EQUAL "17.0.0"))
381-
ADD_CXX_FLAGS("-Wno-vla-cxx-extension")
381+
(APPLE AND "${YB_COMPILER_TYPE}" STREQUAL "clang" AND "${COMPILER_VERSION}" VERSION_GREATER_EQUAL "17.0.0"))
382+
ADD_CXX_FLAGS("-Wno-vla-cxx-extension")
382383
endif()
383384
endif()
384385

0 commit comments

Comments
 (0)