From 5d35370e0f99d489ced5b06b3ca6640619c122dc Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 28 Oct 2020 16:25:09 -0700 Subject: [PATCH] fixes #12589 --- tools/building.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/building.py b/tools/building.py index a22b576d16c63..fffab34692436 100644 --- a/tools/building.py +++ b/tools/building.py @@ -1470,9 +1470,12 @@ def map_to_js_libs(library_name): # map a linker flag to a Settings option, and apply it. this lets a user write # -lSDL2 and it will have the same effect as -s USE_SDL=2. def map_and_apply_to_settings(library_name): + # most libraries just work, because the -l name matches the name of the + # library we build. however, if a library has variations, which cause us to + # build multiple versions with multiple names, then we need this mechanism. library_map = { - 'SDL2': [('USE_SDL', 2)], - 'SDL2_mixer': [('USE_SDL', 2), ('USE_SDL_MIXER', 2)], + # SDL2_mixer's built library name contains the specific codecs built in. + 'SDL2_mixer': [('USE_SDL_MIXER', 2)], } if library_name in library_map: