Enable VLA Cxx extension in clang build
The clang build fails with
/oai-ran/openair1/PHY/MODULATION/gen_75KHz.cpp:16:23: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension]
16 | complex<double> t[len];
| ^~~
/oai-ran/openair1/PHY/MODULATION/gen_75KHz.cpp:16:23: note: function parameter 'len' with unknown value cannot be used in a constant expression
So ignore this warning (and make the build pass), since OAI uses VLAs in
various places.
This commit is contained in:
@@ -40,4 +40,4 @@ RUN /bin/sh oaienv && \
|
||||
mkdir -p log && \
|
||||
export CC=/usr/bin/clang && \
|
||||
export CXX=/usr/bin/clang++ && \
|
||||
./build_oai --phy_simulators --gNB --eNB --nrUE --UE --ninja --noavx512 --disable-T-Tracer -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror
|
||||
CFLAGS="-Werror" CXXFLAGS="-Werror -Wno-vla-cxx-extension" ./build_oai --phy_simulators --gNB --eNB --nrUE --UE --ninja --noavx512 --disable-T-Tracer -c
|
||||
|
||||
Reference in New Issue
Block a user