Skip to content

Commit 85cf370

Browse files
authored
1.39.16 (#503)
Also update precompiled lib tests, for the new cache logic.
1 parent 14c0a9e commit 85cf370

File tree

2 files changed

+26
-23
lines changed

2 files changed

+26
-23
lines changed

emscripten-releases-tags.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
2-
"latest": "1.39.15",
2+
"latest": "1.39.16",
33
"releases": {
4+
"1.39.16": "ae5001fac3849895a873e422a2a80afc90f3b798",
45
"1.39.15": "3880c744c068986d4ee781a61f7b2e820043e11f",
56
"1.39.14": "574ad04affb82cc36a32dd89b2a87bea4fb30eba",
67
"1.39.13": "7b3cd38017f7c582cfa3ac24a9f12aa6a8dca51f",

scripts/test.py

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111

1212
assert 'EM_CONFIG' in os.environ, "emsdk should be activated before running this script"
1313

14+
LIBC = os.environ['EM_CACHE'] + '/wasm/libc.a'
15+
16+
# Remove the EM_CACHE environment variable. It interferes with testing since
17+
# it would otherwise be fixed for the duration of the script and we expect
18+
# "emsdk activate" to be able switch between SDKs during the running of this
19+
# script.
20+
del os.environ['EM_CACHE']
21+
1422
emconfig = os.environ['EM_CONFIG']
1523
upstream_emcc = os.path.join('upstream', 'emscripten', 'emcc')
1624
fastcomp_emcc = os.path.join('fastcomp', 'emscripten', 'emcc')
@@ -80,8 +88,6 @@ def hack_emsdk(marker, replacement):
8088

8189
TAGS = json.loads(open('emscripten-releases-tags.txt').read())
8290

83-
LIBC = os.environ['EM_CACHE'] + '/wasm/libc.a'
84-
8591
# Tests
8692

8793
print('test .emscripten contents (latest was installed/activated in test.sh)')
@@ -95,31 +101,27 @@ def hack_emsdk(marker, replacement):
95101

96102

97103
def test_lib_building(emcc, use_asmjs_optimizer):
98-
def test_build(args, expected=None, unexpected=None):
104+
cache_building_messages = ['generating system library: ']
105+
106+
def test_build(args, expected):
107+
if expected:
108+
expected = cache_building_messages
109+
unexpected = []
110+
else:
111+
expected = []
112+
unexpected = cache_building_messages
99113
checked_call_with_output(emcc + ' hello_world.c' + args,
100114
expected=expected,
101115
unexpected=unexpected,
102116
stderr=subprocess.STDOUT)
103117

104-
# by default we ship libc, struct_info, and the asm.js optimizer, as they
105-
# are important for various reasons (libc takes a long time to build;
106-
# struct_info is a bootstrap product so if the user's setup is broken it's
107-
# confusing; the asm.js optimizer is a native application so it needs a
108-
# working native local build environment). otherwise we don't ship every
109-
# single lib, so some building is expected on first run.
110-
111-
unexpected_system_libs = ['generating system library: libc.',
112-
'generating system asset: optimizer']
113-
if use_asmjs_optimizer:
114-
unexpected_system_libs += ['generating system asset: generated_struct_info.json']
115-
116-
first_time_system_libs = ['generating system library: libdlmalloc.']
117-
118-
test_build('', expected=first_time_system_libs,
119-
unexpected=unexpected_system_libs)
120-
test_build(' -O2', unexpected=unexpected_system_libs + first_time_system_libs)
121-
test_build(' -s WASM=0', unexpected=unexpected_system_libs + first_time_system_libs)
122-
test_build(' -O2 -s WASM=0', unexpected=unexpected_system_libs + first_time_system_libs)
118+
# The emsdk ships all system libraries so we don't expect to see any
119+
# cache population unless we explicly --clear-cache.
120+
test_build('', expected=False)
121+
check_call(emcc + ' --clear-cache')
122+
test_build(' -O2', expected=True)
123+
test_build(' -s WASM=0', expected=False)
124+
test_build(' -O2 -s WASM=0', expected=False)
123125

124126

125127
def run_emsdk(cmd):

0 commit comments

Comments
 (0)