aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorLeon Krause2018-03-06 19:18:34 +0100
committerHein-Pieter van Braam2018-04-14 21:15:37 +0200
commitb5a55810c50e313a843ca08bd88078fccb791b85 (patch)
tree4fa67c3e5d90e41e7d73b1994125d44e62d1f43e /modules
parent4fc6256010dbe52994109c4f34ffc76c42f972e9 (diff)
downloadgodot-b5a55810c50e313a843ca08bd88078fccb791b85.tar.gz
godot-b5a55810c50e313a843ca08bd88078fccb791b85.tar.zst
godot-b5a55810c50e313a843ca08bd88078fccb791b85.zip
Disable FreeType SIMD in HTML5 builds
SIMD is currently unsupported in WebAssembly. (cherry picked from commit 315983c90d55250794931bd819333daa0f2d2fd0)
Diffstat (limited to 'modules')
-rw-r--r--modules/freetype/SCsub16
1 files changed, 12 insertions, 4 deletions
diff --git a/modules/freetype/SCsub b/modules/freetype/SCsub
index f69b632e7..9ffeabe00 100644
--- a/modules/freetype/SCsub
+++ b/modules/freetype/SCsub
@@ -49,7 +49,6 @@ if env['builtin_freetype']:
"src/pshinter/pshinter.c",
"src/psnames/psnames.c",
"src/raster/raster.c",
- "src/sfnt/sfnt.c",
"src/smooth/smooth.c",
"src/truetype/truetype.c",
"src/type1/type1.c",
@@ -58,9 +57,18 @@ if env['builtin_freetype']:
]
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
- # Include header for UWP to fix build issues
- if "platform" in env and env["platform"] == "uwp":
- env.Append(CCFLAGS=['/FI', '"modules/freetype/uwpdef.h"'])
+ sfnt = thirdparty_dir + 'src/sfnt/sfnt.c'
+
+ if 'platform' in env:
+ if env['platform'] == 'uwp':
+ # Include header for UWP to fix build issues
+ env.Append(CCFLAGS=['/FI', '"modules/freetype/uwpdef.h"'])
+ elif env['platform'] == 'javascript':
+ # Forcibly undefine this macro so SIMD is not used in this file,
+ # since currently unsuported in WASM
+ sfnt = env.Object(sfnt, CPPFLAGS=['-U__OPTIMIZE__'])
+
+ thirdparty_sources += [sfnt]
env.Append(CPPPATH=[thirdparty_dir, thirdparty_dir + "/include"])