From 42d9ac3b08d1646b9639a76972dd4c7219c28b94 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Sat, 24 Aug 2024 11:56:27 +0200 Subject: [PATCH] [Web/SCons] Use CCFLAGS for SIDE_MODULE option Was using CPPFLAGS, but should use the explicit scons CCFLAGS which makes it clear they are applied to both the C and C++ compiler. CPPFLAGS was also fine (they are preprocessor flags, also applied to both C and C++), but we should try to stay consistent with what we do in Godot. (cherry picked from commit f36acd8e312c916c7e53364e1b0bd8eec3e4410e) --- tools/web.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/web.py b/tools/web.py index 8953325c..08aac635 100644 --- a/tools/web.py +++ b/tools/web.py @@ -39,8 +39,8 @@ def generate(env): env.Append(LINKFLAGS=["-s", "USE_PTHREADS=1"]) # Build as side module (shared library). - env.Append(CPPFLAGS=["-s", "SIDE_MODULE=1"]) - env.Append(LINKFLAGS=["-s", "SIDE_MODULE=1"]) + env.Append(CCFLAGS=["-sSIDE_MODULE=1"]) + env.Append(LINKFLAGS=["-sSIDE_MODULE=1"]) env.Append(CPPDEFINES=["WEB_ENABLED", "UNIX_ENABLED"])