summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDanylo Piliaiev <dpiliaiev@igalia.com>2024-03-14 14:04:16 +0100
committerMarge Bot <emma+marge@anholt.net>2024-03-14 17:49:18 +0000
commit2aab8e08065afcb30de54f6033dd1dc9064d3f41 (patch)
treee9a23577838e7a58030ad7b11ad6d3e89157035c /meson.build
parentd2229304dc3db575c1888f72a8c02b4380a464da (diff)
meson: Correctly get sizeof_pointer with cross-compilers
"native : true" used build system's compiler to determine sizeof void*, which is wrong - we need to use host compiler. Found when using pure NIX cross-compilation environment. Fixes: ad34c932cdf9583f27b35a948a90c37c45c27889 ("glapi: pass pointer size to python for glthread from meson") Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com> Reviewed-by: Marek Olšák <marek.olsak@amd.co Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28177>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build2
1 files changed, 1 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index d70046ed74c..fe3a7f334f8 100644
--- a/meson.build
+++ b/meson.build
@@ -37,7 +37,7 @@ project(
cc = meson.get_compiler('c')
cpp = meson.get_compiler('cpp')
-sizeof_pointer = meson.get_compiler('c', native : true).sizeof('void*').to_string()
+sizeof_pointer = cc.sizeof('void*').to_string()
null_dep = dependency('', required : false)