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
8 changes: 5 additions & 3 deletions site/source/docs/tools_reference/settings_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2860,7 +2860,7 @@ are desired to work. Pass -sMIN_FIREFOX_VERSION=majorVersion to drop support
for Firefox versions older than < majorVersion.
Firefox 79 was released on 2020-07-28.
MAX_INT (0x7FFFFFFF, or -1) specifies that target is not supported.
Minimum supported value is 50 which was released on 2016-11-15 (see
Minimum supported value is 55 which was released on 2017-08-08 (see
feature_matrix.py)

Default value: 79
Expand All @@ -2879,8 +2879,10 @@ bundled with macOS 10.14.0 Mojave.
NOTE: Emscripten is unable to produce code that would work in iOS 9.3.5 and
older, i.e. iPhone 4s, iPad 2, iPad 3, iPad Mini 1, Pod Touch 5 and older,
see https://github.com/emscripten-core/emscripten/pull/7191.
Multithreaded Emscripten code will need Safari 12.2 (iPhone 5s+) at minimum,
with support for DedicatedWorkerGlobalScope.name parameter.
MAX_INT (0x7FFFFFFF, or -1) specifies that target is not supported.
Minimum supported value is 101000 which was released in 2016-09 (see
Minimum supported value is 120200 which was released on 2019-03-25 (see
feature_matrix.py).

Default value: 150000
Expand All @@ -2896,7 +2898,7 @@ This setting also applies to modern Chromium-based Edge, which shares version
numbers with Chrome.
Chrome 85 was released on 2020-08-25.
MAX_INT (0x7FFFFFFF, or -1) specifies that target is not supported.
Minimum supported value is 55, which was released on 2016-12-01 (see
Minimum supported value is 70, which was released on 2018-10-16 (see
feature_matrix.py).

Default value: 85
Expand Down
8 changes: 5 additions & 3 deletions src/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1870,7 +1870,7 @@ var AUTO_NATIVE_LIBRARIES = true;
// for Firefox versions older than < majorVersion.
// Firefox 79 was released on 2020-07-28.
// MAX_INT (0x7FFFFFFF, or -1) specifies that target is not supported.
// Minimum supported value is 50 which was released on 2016-11-15 (see
// Minimum supported value is 55 which was released on 2017-08-08 (see
// feature_matrix.py)
// [link]
var MIN_FIREFOX_VERSION = 79;
Expand All @@ -1884,8 +1884,10 @@ var MIN_FIREFOX_VERSION = 79;
// NOTE: Emscripten is unable to produce code that would work in iOS 9.3.5 and
// older, i.e. iPhone 4s, iPad 2, iPad 3, iPad Mini 1, Pod Touch 5 and older,
// see https://github.com/emscripten-core/emscripten/pull/7191.
// Multithreaded Emscripten code will need Safari 12.2 (iPhone 5s+) at minimum,
// with support for DedicatedWorkerGlobalScope.name parameter.
// MAX_INT (0x7FFFFFFF, or -1) specifies that target is not supported.
// Minimum supported value is 101000 which was released in 2016-09 (see
// Minimum supported value is 120200 which was released on 2019-03-25 (see
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest of the comment above might need updates too. "14.1" should be 15, unrelated to this PR though. And iPhone 4s should be 5 based on the PR description?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a second note to specifically list multithreaded code, since the above refers to singlethreaded code.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

// feature_matrix.py).
// [link]
var MIN_SAFARI_VERSION = 150000;
Expand All @@ -1896,7 +1898,7 @@ var MIN_SAFARI_VERSION = 150000;
// numbers with Chrome.
// Chrome 85 was released on 2020-08-25.
// MAX_INT (0x7FFFFFFF, or -1) specifies that target is not supported.
// Minimum supported value is 55, which was released on 2016-12-01 (see
// Minimum supported value is 70, which was released on 2018-10-16 (see
// feature_matrix.py).
// [link]
var MIN_CHROME_VERSION = 85;
Expand Down
8 changes: 4 additions & 4 deletions test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -15226,8 +15226,8 @@ def test_reproduce(self):
self.assertTextDataIdentical(expected, response)

def test_min_browser_version(self):
err = self.expect_fail([EMCC, test_file('hello_world.c'), '-Wno-transpile', '-Werror', '-sWASM_BIGINT', '-sMIN_SAFARI_VERSION=120000'])
self.assertContained('emcc: error: MIN_SAFARI_VERSION=120000 is not compatible with WASM_BIGINT (150000 or above required)', err)
err = self.expect_fail([EMCC, test_file('hello_world.c'), '-Wno-transpile', '-Werror', '-sWASM_BIGINT', '-sMIN_SAFARI_VERSION=130000'])
self.assertContained('emcc: error: MIN_SAFARI_VERSION=130000 is not compatible with WASM_BIGINT (150000 or above required)', err)

err = self.expect_fail([EMCC, test_file('hello_world.c'), '-Wno-transpile', '-Werror', '-pthread', '-sMIN_CHROME_VERSION=73'])
self.assertContained('emcc: error: MIN_CHROME_VERSION=73 is not compatible with pthreads (74 or above required)', err)
Expand All @@ -15241,7 +15241,7 @@ def test_signext_lowering(self):
self.assertNotContained('--signext-lowering', err)

# Specifying an older browser version should trigger the lowering pass
err = self.run_process(cmd + ['-sMIN_SAFARI_VERSION=120000'], stderr=subprocess.PIPE).stderr
err = self.run_process(cmd + ['-sMIN_SAFARI_VERSION=120200'], stderr=subprocess.PIPE).stderr
self.assertContained('--signext-lowering', err)
err = self.run_process(cmd + ['-sMIN_FIREFOX_VERSION=61'], stderr=subprocess.PIPE).stderr
self.assertContained('--signext-lowering', err)
Expand Down Expand Up @@ -15991,7 +15991,7 @@ def test_no_extra_output(self):

def test_browser_too_old(self):
err = self.expect_fail([EMCC, test_file('hello_world.c'), '-sMIN_CHROME_VERSION=10'])
self.assertContained('emcc: error: MIN_CHROME_VERSION older than 55 is not supported', err)
self.assertContained('emcc: error: MIN_CHROME_VERSION older than 70 is not supported', err)

def test_js_only_settings(self):
err = self.run_process([EMCC, test_file('hello_world.c'), '-o', 'foo.wasm', '-sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=emscripten_get_heap_max'], stderr=PIPE).stderr
Expand Down
16 changes: 10 additions & 6 deletions tools/feature_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@

UNSUPPORTED = 0x7FFFFFFF

# Oldest support browser versions. These have been set somewhat
# arbitrarily for now.
# TODO(sbc): Design a of policy for managing these values.
OLDEST_SUPPORTED_CHROME = 55 # December 1, 2016
OLDEST_SUPPORTED_FIREFOX = 50 # November 15, 2016
OLDEST_SUPPORTED_SAFARI = 101000 # September 20, 2016
# Oldest support browser versions.
# Emscripten unconditionally requires support for:
# - DedicatedWorkerGlobalScope.name parameter for multithreading support, which
# landed first in Chrome 70, Firefox 55 and Safari 12.2.

# N.b. when modifying these values, update comments in src/settings.js on
# MIN_x_VERSION fields to match accordingly.
OLDEST_SUPPORTED_CHROME = 70 # Released on 2018-10-16
OLDEST_SUPPORTED_FIREFOX = 55 # Released on 2017-08-08
OLDEST_SUPPORTED_SAFARI = 120200 # Released on 2019-03-25
# 10.19.0 is the oldest version of node that we do any testing with.
# Keep this in sync with the test-node-compat in .circleci/config.yml.
OLDEST_SUPPORTED_NODE = 101900
Expand Down