Skip to content

Commit eb68cea

Browse files
authored
Fix for test_dynamic_link_glemu (#14403)
The problem was the `GL` was being found in `system_libs_map` before it was being looked up in `system_libs_map`. This test was broken in #14351. Sadly this test doesn't run under chrome due to its use `@requires_sync_compilation`
1 parent a267c12 commit eb68cea

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

emcc.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3514,13 +3514,6 @@ def process_libraries(state, linker_inputs):
35143514
new_flags.append((i, flag))
35153515
continue
35163516
lib = strip_prefix(flag, '-l')
3517-
# We don't need to resolve system libraries to absolute paths here, we can just
3518-
# let wasm-ld handle that. However, we do want to map to the correct variant.
3519-
# For example we map `-lc` to `-lc-mt` if we are building with threading support.
3520-
if 'lib' + lib in system_libs_map:
3521-
lib = system_libs_map['lib' + lib]
3522-
new_flags.append((i, '-l' + strip_prefix(lib.get_base_name(), 'lib')))
3523-
continue
35243517

35253518
logger.debug('looking for library "%s"', lib)
35263519
js_libs, native_lib = building.map_to_js_libs(lib)
@@ -3532,6 +3525,14 @@ def process_libraries(state, linker_inputs):
35323525
state.forced_stdlibs.append(native_lib)
35333526
continue
35343527

3528+
# We don't need to resolve system libraries to absolute paths here, we can just
3529+
# let wasm-ld handle that. However, we do want to map to the correct variant.
3530+
# For example we map `-lc` to `-lc-mt` if we are building with threading support.
3531+
if 'lib' + lib in system_libs_map:
3532+
lib = system_libs_map['lib' + lib]
3533+
new_flags.append((i, '-l' + strip_prefix(lib.get_base_name(), 'lib')))
3534+
continue
3535+
35353536
if building.map_and_apply_to_settings(lib):
35363537
continue
35373538

0 commit comments

Comments
 (0)