Skip to content

Rename some JS libraries to match their native counterparts. NFC #24069

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions src/modules.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -134,25 +134,25 @@ function calculateLibraries() {
'libhtml5_webgl.js',
'libopenal.js',
'libglut.js',
'libxlib.js',
'libegl.js',
'libXLIB.js',
'libEGL.js',
'libuuid.js',
'libglew.js',
'libGLEW.js',
'libidbstore.js',
'libasync.js',
);
if (USE_SDL != 2) {
libraries.push('libsdl.js');
libraries.push('libSDL.js');
}
} else {
if (ASYNCIFY) {
libraries.push('libasync.js');
}
if (USE_SDL == 1) {
libraries.push('libsdl.js');
libraries.push('libSDL.js');
}
if (USE_SDL == 2) {
libraries.push('libegl.js', 'libwebgl.js', 'libhtml5_webgl.js');
libraries.push('libEGL.js', 'libwebgl.js', 'libhtml5_webgl.js');
}
}

Expand Down
8 changes: 4 additions & 4 deletions tools/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -2770,19 +2770,19 @@ def map_to_js_libs(library_name):
# Some native libraries are implemented in Emscripten as system side JS libraries
library_map = {
'embind': ['libembind.js', 'libemval.js'],
'EGL': ['libegl.js'],
'EGL': ['libEGL.js'],
'GL': ['libwebgl.js', 'libhtml5_webgl.js'],
'webgl.js': ['libwebgl.js', 'libhtml5_webgl.js'],
'GLESv2': ['libwebgl.js'],
# N.b. there is no GLESv3 to link to (note [f] in https://www.khronos.org/registry/implementers_guide.html)
'GLEW': ['libglew.js'],
'GLEW': ['libGLEW.js'],
'glfw': ['libglfw.js'],
'glfw3': ['libglfw.js'],
'GLU': [],
'glut': ['libglut.js'],
'openal': ['libopenal.js'],
'X11': ['libxlib.js'],
'SDL': ['libsdl.js'],
'X11': ['libX11.js'],
'SDL': ['libSDL.js'],
'uuid': ['libuuid.js'],
'fetch': ['libfetch.js'],
'websocket': ['libwebsocket.js'],
Expand Down
Loading