Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -7622,6 +7622,13 @@ def test_archive_non_objects(self):
self.run_process([EMAR, 'crS', '--format=gnu', 'libfoo.a', 'file.txt', 'hello_world.o'])
self.run_process([EMCC, test_file('hello_world.c'), 'libfoo.a'])

def test_archive_thin(self):
self.run_process([EMCC, '-c', test_file('hello_world.c')])
# The `T` flag means "thin"
self.run_process([EMAR, 'crT', 'libhello.a', 'hello_world.o'])
self.run_process([EMCC, 'libhello.a'])
self.assertContained('hello, world!', self.run_js('a.out.js'))

def test_flag_aliases(self):
def assert_aliases_match(flag1, flag2, flagarg, extra_args=[]):
results = {}
Expand Down
2 changes: 1 addition & 1 deletion tools/building.py
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ def is_ar(filename):
if _is_ar_cache.get(filename):
return _is_ar_cache[filename]
header = open(filename, 'rb').read(8)
sigcheck = header == b'!<arch>\n'
sigcheck = header in (b'!<arch>\n', b'!<thin>\n')
_is_ar_cache[filename] = sigcheck
return sigcheck
except Exception as e:
Expand Down