Skip to content

Commit

Permalink
Separate STRICT from MINIMAL_RUNTIME
Browse files Browse the repository at this point in the history
This allows us to add more incompatibility checking to the STRICT
option without forcing it on all users or MINIMAL_RUNTIME.

This is part of #8317.

In particular we already already error on the use legacy settings
when in STRICT mode, but I understand that at least on major user (@juj)
wants to be able to continue to use legacy command line settings and
also wants to use MINIMAL_RUNTIME.
  • Loading branch information
sbc100 committed Apr 8, 2019
1 parent 928c1f9 commit 008db61
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
3 changes: 0 additions & 3 deletions emcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1334,9 +1334,6 @@ def check(input_file):
# Remove the default exported functions 'memcpy', 'memset', 'malloc', 'free', etc. - those should only be linked in if used
shared.Settings.DEFAULT_LIBRARY_FUNCS_TO_INCLUDE = []

# Always build with STRICT mode enabled
shared.Settings.STRICT = 1

# Always use the new HTML5 API event target lookup rules
shared.Settings.DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR = 1

Expand Down
29 changes: 12 additions & 17 deletions src/modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ var LibraryManager = {
]);

// Additional filesystem libraries (in strict mode, link to these explicitly via -lxxx.js)
if (!STRICT) {
if (!STRICT && !MINIMAL_RUNTIME) {
libraries = libraries.concat([
'library_lz4.js',
]);
Expand All @@ -106,26 +106,21 @@ var LibraryManager = {
}

// Additional JS libraries (in strict mode, link to these explicitly via -lxxx.js)
if (!STRICT) {
if (!STRICT && !MINIMAL_RUNTIME) {
libraries = libraries.concat([
'library_webgl.js',
'library_openal.js',
'library_vr.js'
'library_vr.js',
'library_sdl.js',
'library_glut.js',
'library_xlib.js',
'library_egl.js',
'library_glfw.js',
'library_uuid.js',
'library_glew.js',
'library_idbstore.js',
'library_async.js'
]);

if (!MINIMAL_RUNTIME) {
libraries = libraries.concat([
'library_sdl.js',
'library_glut.js',
'library_xlib.js',
'library_egl.js',
'library_glfw.js',
'library_uuid.js',
'library_glew.js',
'library_idbstore.js',
'library_async.js'
]);
}
}

// If there are any explicitly specified system JS libraries to link to, add those to link.
Expand Down

0 comments on commit 008db61

Please sign in to comment.