From 77db04ffa6c37496f5a800f2f5cd5a0c19e47d8b Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Thu, 16 May 2024 20:46:45 +0200 Subject: Fix handling of C standard support for Emscripten. Emscripten version numbers are unrelated to Clang version numbers, so it is necessary to change the version checks for `c_std=c17` & co. Without that, no project that defaults to C17 or newer will build with Emscripten. See https://github.com/pyodide/pyodide/discussions/4762 for more context. Also note that this bug caused defaulting to C17 in scikit-learn to be reverted (scikit-learn#29015), and it may be a problem for SciPy 1.14.0 too since that release will upgrade from C99 to C17. Co-authored-by: Loic Esteve --- test cases/wasm/1 basic/meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test cases') diff --git a/test cases/wasm/1 basic/meson.build b/test cases/wasm/1 basic/meson.build index 1092a9ba7..d27599271 100644 --- a/test cases/wasm/1 basic/meson.build +++ b/test cases/wasm/1 basic/meson.build @@ -1,4 +1,9 @@ -project('emcctest', 'c', 'cpp') +project('emcctest', 'c', 'cpp', + default_options: [ + 'c_std=c17', + 'cpp_std=c++17', + ] +) executable('hello-c', 'hello.c') executable('hello', 'hello.cpp') -- cgit v1.2.3