summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2018-06-11 10:15:15 -0700
committerDylan Baker <[email protected]>2018-06-13 10:06:16 -0700
commit65e447c5df484fcbdad41721e2aba46823147931 (patch)
tree73c049e662638c1460927db7975b84f7b7e06485 /meson.build
parent51376cd74965007b7facf0b86c9d74c678234978 (diff)
meson: move cc and cpp definitions to top of main meson.build
This just makes using cc and cpp easier. v2: - Add this patch to fix altivec Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build5
1 files changed, 3 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 160bbfa30ba..16866d77ed3 100644
--- a/meson.build
+++ b/meson.build
@@ -29,6 +29,9 @@ project(
default_options : ['buildtype=debugoptimized', 'c_std=c99', 'cpp_std=c++11']
)
+cc = meson.get_compiler('c')
+cpp = meson.get_compiler('cpp')
+
null_dep = dependency('', required : false)
system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly', 'linux'].contains(host_machine.system())
@@ -669,7 +672,6 @@ if has_mako.returncode() != 0
error('Python (2.x) mako module required to build mesa.')
endif
-cc = meson.get_compiler('c')
if cc.get_id() == 'gcc' and cc.version().version_compare('< 4.4.6')
error('When using GCC, version 4.4.6 or later is required.')
endif
@@ -749,7 +751,6 @@ if cc.has_argument('-fvisibility=hidden')
endif
# Check for generic C++ arguments
-cpp = meson.get_compiler('cpp')
cpp_args = []
foreach a : ['-Wall', '-fno-math-errno', '-fno-trapping-math',
'-Qunused-arguments']