[Mesa-dev] [PATCH] amd: build addrlib with C++11

Dylan Baker dylan at pnwbakers.com
Wed Nov 15 20:31:34 UTC 2017


Quoting Ilia Mirkin (2017-11-15 09:52:06)
> On Wed, Nov 15, 2017 at 12:47 PM, Dylan Baker <dylan at pnwbakers.com> wrote:
> > Nope. meson builds all C++ code as C++11 because so much of mesa's C++ code
> > cannot be built without it (Because of LLVM). As far as I can tell the GLSL
> > compiler and the Intel Compiler are the only C++ code in mesa not using C++11.
> 
> Actually C++11 isn't used anywhere except clover and swr, AFAIK. (Look
> for CXX11_CXXFLAGS.)
> 
>   -ilia

I should have added the Nouveau compiler to the list of code that doesn't
require C++11, sorry about that :)

However, LLVM has been built with C++11 since at least 4.0, and anything linking
to it (r300, r600, radeonsi, radv, llvmpipe) have to be built with it even if
they don't use C++11 features, because LLVM does. I think we mostly get around
this because autotools doesn't set a standard (by default), and clang++ and g++
have had C++11 as the default standard for quite a while now (at least back to
gcc 4.8).

For giggles I tried to build just llvmpipe with the C++ standard set to c++03
and I got a massive pile of syntax errors from the compiler.

If you want to try that with meson you could run:
sed -i -e 's at c++11@c++03 at g' meson.build
meson build-cpp03 -Dgallium-drivers=swrast -Ddri-drivers= -Dvulkan-drivers=

Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171115/56743648/attachment.sig>


More information about the mesa-dev mailing list