Skip to content

Commit d770567

Browse files
committed
Use -Wno-vla-cxx-extension for libomp, since clang 18 complains.
1 parent e432964 commit d770567

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

lib/libomp/Makefile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ CXXFLAGS+= -fno-exceptions
5757
CXXFLAGS+= -fno-rtti
5858
CXXSTD= c++17
5959

60-
.if ${COMPILER_TYPE} == "clang" && ${MACHINE_CPUARCH} == "i386"
60+
.if ${COMPILER_TYPE} == "clang"
61+
.if ${MACHINE_CPUARCH} == "i386"
6162
.if ${COMPILER_VERSION} >= 90000
6263
# When targeting i386, clang 9.0.0 produces a new warning about large atomic
6364
# operations "possibly incurring significant performance penalties", but there
@@ -69,8 +70,14 @@ CWARNFLAGS+= -Wno-atomic-alignment
6970
# builtin operations must have natural alignment, but there is not much we
7071
# can do about it.
7172
CWARNFLAGS+= -Wno-sync-alignment
72-
.endif
73-
.endif
73+
.endif # COMPILER_VERSION >= 170000
74+
.endif # MACHINE_CPUARCH == i386
75+
.if ${COMPILER_VERSION} >= 180000
76+
# clang 18.0.0 introduces a new warning about variable length arrays in C++,
77+
# which OpenMP makes use of in several sources.
78+
CXXWARNFLAGS+= -Wno-vla-cxx-extension
79+
.endif # COMPILER_VERSION >= 180000
80+
.endif # COMPILER_TYPE == clang
7481

7582
LDFLAGS+= -Wl,--warn-shared-textrel
7683
LDFLAGS+= -Wl,--gc-sections

0 commit comments

Comments
 (0)