build: Bump C++ standard requirement to C++14 to fix FTBFS with LLVM 10

When building Mesa against a recent LLVM 10 with C++11, the build fails
if the AMD common code is built as well due to "std::index_sequence"
being undeclared.

LLVM requires a minimum of C++14.

Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Acked-by: Eric Engestrom <eric@engestrom.ch>
This commit is contained in:
Kai Wasserbäch 2019-08-17 10:59:43 +02:00 committed by Dave Airlie
parent d0ec5d38f6
commit 1abe87383e
4 changed files with 4 additions and 4 deletions

View file

@ -26,7 +26,7 @@ project(
).stdout(),
license : 'MIT',
meson_version : '>= 0.46',
default_options : ['buildtype=debugoptimized', 'b_ndebug=if-release', 'c_std=c99', 'cpp_std=c++11']
default_options : ['buildtype=debugoptimized', 'b_ndebug=if-release', 'c_std=c99', 'cpp_std=c++14']
)
cc = meson.get_compiler('c')

View file

@ -269,7 +269,7 @@ def generate(env):
env.ParseConfig('%s --ldflags' % llvm_config)
if llvm_version >= distutils.version.LooseVersion('3.5'):
env.ParseConfig('%s --system-libs' % llvm_config)
env.Append(CXXFLAGS = ['-std=c++11'])
env.Append(CXXFLAGS = ['-std=c++14'])
except OSError:
print('scons: llvm-config version %s failed' % llvm_version)
return

View file

@ -48,7 +48,7 @@ LOCAL_SRC_FILES += \
$(call mesa-build-with-llvm)
endif
LOCAL_CPPFLAGS += -std=c++11
LOCAL_CPPFLAGS += -std=c++14
# We need libmesa_nir to get NIR's generated include directories.
LOCAL_MODULE := libmesa_gallium

View file

@ -32,7 +32,7 @@ else:
if not env['msvc'] :
env.Append(CCFLAGS = [
'-std=c++11',
'-std=c++14',
])
swrroot = '#src/gallium/drivers/swr/'