Skip to content

Commit

Permalink
Merge pull request godotengine#17317 from eska014/html5-freetype-simd
Browse files Browse the repository at this point in the history
Disable FreeType SIMD in HTML5 builds
  • Loading branch information
akien-mga authored Mar 6, 2018
2 parents 1388ff5 + 315983c commit 0251c85
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions modules/freetype/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"])

Expand Down

0 comments on commit 0251c85

Please sign in to comment.