-
Notifications
You must be signed in to change notification settings - Fork 781
1.39.16 #503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.39.16 #503
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,14 @@ | |
|
|
||
| assert 'EM_CONFIG' in os.environ, "emsdk should be activated before running this script" | ||
|
|
||
| LIBC = os.environ['EM_CACHE'] + '/wasm/libc.a' | ||
|
|
||
| # Remove the EM_CACHE environment variable. It interferes with testing since | ||
| # it would otherwise be fixed for the duration of the script and we expect | ||
| # "emsdk activate" to be able switch between SDKs during the running of this | ||
| # script. | ||
| del os.environ['EM_CACHE'] | ||
|
|
||
| emconfig = os.environ['EM_CONFIG'] | ||
| upstream_emcc = os.path.join('upstream', 'emscripten', 'emcc') | ||
| fastcomp_emcc = os.path.join('fastcomp', 'emscripten', 'emcc') | ||
|
|
@@ -80,8 +88,6 @@ def hack_emsdk(marker, replacement): | |
|
|
||
| TAGS = json.loads(open('emscripten-releases-tags.txt').read()) | ||
|
|
||
| LIBC = os.environ['EM_CACHE'] + '/wasm/libc.a' | ||
|
|
||
| # Tests | ||
|
|
||
| print('test .emscripten contents (latest was installed/activated in test.sh)') | ||
|
|
@@ -95,31 +101,27 @@ def hack_emsdk(marker, replacement): | |
|
|
||
|
|
||
| def test_lib_building(emcc, use_asmjs_optimizer): | ||
| def test_build(args, expected=None, unexpected=None): | ||
| cache_building_messages = ['generating system library: '] | ||
|
|
||
| def test_build(args, expected): | ||
| if expected: | ||
| expected = cache_building_messages | ||
| unexpected = [] | ||
| else: | ||
| expected = [] | ||
| unexpected = cache_building_messages | ||
| checked_call_with_output(emcc + ' hello_world.c' + args, | ||
| expected=expected, | ||
| unexpected=unexpected, | ||
| stderr=subprocess.STDOUT) | ||
|
|
||
| # by default we ship libc, struct_info, and the asm.js optimizer, as they | ||
| # are important for various reasons (libc takes a long time to build; | ||
| # struct_info is a bootstrap product so if the user's setup is broken it's | ||
| # confusing; the asm.js optimizer is a native application so it needs a | ||
| # working native local build environment). otherwise we don't ship every | ||
| # single lib, so some building is expected on first run. | ||
|
|
||
| unexpected_system_libs = ['generating system library: libc.', | ||
| 'generating system asset: optimizer'] | ||
| if use_asmjs_optimizer: | ||
| unexpected_system_libs += ['generating system asset: generated_struct_info.json'] | ||
|
|
||
| first_time_system_libs = ['generating system library: libdlmalloc.'] | ||
|
|
||
| test_build('', expected=first_time_system_libs, | ||
| unexpected=unexpected_system_libs) | ||
| test_build(' -O2', unexpected=unexpected_system_libs + first_time_system_libs) | ||
| test_build(' -s WASM=0', unexpected=unexpected_system_libs + first_time_system_libs) | ||
| test_build(' -O2 -s WASM=0', unexpected=unexpected_system_libs + first_time_system_libs) | ||
| # The emsdk ships all system libraries so we don't expect to see any | ||
| # cache population unless we explicly --clear-cache. | ||
| test_build('', expected=False) | ||
| check_call(emcc + ' --clear-cache') | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is maybe excessive - CI here will wait on building all of libc. maybe just delete say
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The problem is that each version of SDK now has it own cache... so I'd need to figure out where each libc is. For the upstream SDK I know this because of
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, how about removing fastcomp cache testing then?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure.. although building libc only takes less than a minute, no? Does it it matter on the emsdk CI?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not a big deal, yeah. But it's nice if emsdk CI is fast as we want to avoid anything landing on emscripten while we tag. lgtm either way though. |
||
| test_build(' -O2', expected=True) | ||
| test_build(' -s WASM=0', expected=False) | ||
| test_build(' -O2 -s WASM=0', expected=False) | ||
|
|
||
|
|
||
| def run_emsdk(cmd): | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.