Skip to content

Commit f253af0

Browse files
authored
Compile FreeType with pthreads support (#16546)
Expects the runtime will support atomic access, even in single-threaded mode. See WebAssembly/threads#144 for more.
1 parent d98635c commit f253af0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

tests/test_other.py

+4
Original file line numberDiff line numberDiff line change
@@ -1860,6 +1860,10 @@ def test_freetype(self):
18601860
' **** ****'
18611861
self.assertContained(expectedOutput, self.run_process(config.JS_ENGINES[0] + ['a.out.js'], stdout=PIPE, stderr=PIPE).stdout)
18621862

1863+
def test_freetype_with_pthreads(self):
1864+
# Verify that freetype supports compilation requiring pthreads
1865+
self.emcc(test_file('freetype_test.c'), ['-sUSE_PTHREADS', '-sUSE_FREETYPE'], output_filename='a.out.js')
1866+
18631867
def test_icu(self):
18641868
self.set_setting('USE_ICU')
18651869
self.do_runf(test_file('other/test_icu.cpp'))

tools/ports/freetype.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ def create(final):
9898
'-I' + dest_path + '/psaux',
9999
'-I' + dest_path + '/psnames',
100100
'-I' + dest_path + '/truetype',
101-
'-w'])
101+
'-w',
102+
'-pthread'])
102103
o_s.append(o)
103104

104105
ports.run_commands(commands)

0 commit comments

Comments
 (0)