浏览代码

[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)
Fabio Alessandrelli 1 年之前
父节点
当前提交
d421c98461
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tools/web.py

+ 1 - 1
tools/web.py

@@ -39,7 +39,7 @@ def generate(env):
         env.Append(LINKFLAGS=["-sUSE_PTHREADS=1"])
 
     # Build as side module (shared library).
-    env.Append(CPPFLAGS=["-sSIDE_MODULE=1"])
+    env.Append(CCFLAGS=["-sSIDE_MODULE=1"])
     env.Append(LINKFLAGS=["-sSIDE_MODULE=1"])
 
     # Force wasm longjmp mode.