Skip to content

Commit

Permalink
Compile FreeType with pthreads support (#16546)
Browse files Browse the repository at this point in the history
Expects the runtime will support atomic access, even in single-threaded
mode. See WebAssembly/threads#144 for more.
  • Loading branch information
Asaaj authored Mar 29, 2022
1 parent d98635c commit f253af0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions tests/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -1860,6 +1860,10 @@ def test_freetype(self):
' **** ****'
self.assertContained(expectedOutput, self.run_process(config.JS_ENGINES[0] + ['a.out.js'], stdout=PIPE, stderr=PIPE).stdout)

def test_freetype_with_pthreads(self):
# Verify that freetype supports compilation requiring pthreads
self.emcc(test_file('freetype_test.c'), ['-sUSE_PTHREADS', '-sUSE_FREETYPE'], output_filename='a.out.js')

def test_icu(self):
self.set_setting('USE_ICU')
self.do_runf(test_file('other/test_icu.cpp'))
Expand Down
3 changes: 2 additions & 1 deletion tools/ports/freetype.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ def create(final):
'-I' + dest_path + '/psaux',
'-I' + dest_path + '/psnames',
'-I' + dest_path + '/truetype',
'-w'])
'-w',
'-pthread'])
o_s.append(o)

ports.run_commands(commands)
Expand Down

0 comments on commit f253af0

Please sign in to comment.