Skip to content

Commit ed80f10

Browse files
committed
Remove RUNTIME_LINKED_LIBS setting
We have had this marked as deprecated since #14004 (more than 4 years).
1 parent d3bd469 commit ed80f10

File tree

5 files changed

+6
-32
lines changed

5 files changed

+6
-32
lines changed

ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ See docs/process.md for more on how version tagging works.
2626
exception here for `EMSCRIPTEN_VERSION` which is the only internal setting
2727
where we could find usage of `emscripten_get_compiler_setting` (in a global
2828
GitHub search). (#25667)
29+
- The long-deprecated `RUNTIME_LINKED_LIBS` setting was removed. You can now
30+
simply link shared libraries on the command line when linking your main module
31+
(e.g. `emcc -sMAIN_MODULE main.c /path/to/libfoo.so`) (#25673)
2932

3033
4.0.18 - 10/24/25
3134
-----------------

site/source/docs/tools_reference/settings_reference.rst

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,17 +1660,6 @@ Corresponds to MAIN_MODULE (also supports modes 1 and 2)
16601660

16611661
Default value: 0
16621662

1663-
.. _runtime_linked_libs:
1664-
1665-
RUNTIME_LINKED_LIBS
1666-
===================
1667-
1668-
Deprecated, list shared libraries directly on the command line instead.
1669-
1670-
.. note:: This setting is deprecated
1671-
1672-
Default value: []
1673-
16741663
.. _build_as_worker:
16751664

16761665
BUILD_AS_WORKER
@@ -3403,7 +3392,6 @@ The following settings have been proposed for removal from emscripten. These se
34033392
still function but may be removed in a future version. If your project is using of
34043393
the these settings please open a bug (or reply to one of the existing bugs).
34053394

3406-
- ``RUNTIME_LINKED_LIBS``: you can simply list the libraries directly on the commandline now
34073395
- ``CLOSURE_WARNINGS``: use -Wclosure/-Wno-closure instead
34083396
- ``LEGALIZE_JS_FFI``: to disable JS type legalization use `-sWASM_BIGINT` or `-sSTANDALONE_WASM`
34093397
- ``ASYNCIFY_EXPORTS``: please use JSPI_EXPORTS instead
@@ -3496,3 +3484,4 @@ for backwards compatbility with older versions:
34963484
- ``USE_OFFSET_COVERTER``: No longer supported, not needed with modern v8 versions (Valid values: [0])
34973485
- ``ASYNCIFY_LAZY_LOAD_CODE``: No longer supported (Valid values: [0])
34983486
- ``USE_WEBGPU``: No longer supported; replaced by --use-port=emdawnwebgpu, which implements a newer (but incompatible) version of webgpu.h - see tools/ports/emdawnwebgpu.py (Valid values: [0])
3487+
- ``RUNTIME_LINKED_LIBS``: list shared libraries directly on the command line instead (Valid values: [[]])

src/settings.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,11 +1134,6 @@ var MAIN_MODULE = 0;
11341134
// [compile+link]
11351135
var SIDE_MODULE = 0;
11361136

1137-
// Deprecated, list shared libraries directly on the command line instead.
1138-
// [link]
1139-
// [deprecated]
1140-
var RUNTIME_LINKED_LIBS = [];
1141-
11421137
// If set to 1, this is a worker library, a special kind of library that is run
11431138
// in a worker. See emscripten.h
11441139
// [link]

test/test_other.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6644,20 +6644,7 @@ def percent_diff(x, y):
66446644
self.assertLess(side_dce_fail[1], 0.95 * side_dce_work[1]) # removing that function saves a chunk
66456645

66466646
def test_RUNTIME_LINKED_LIBS(self):
6647-
# Verify that the legacy `-sRUNTIME_LINKED_LIBS` option acts the same as passing a
6648-
# library on the command line directly.
6649-
create_file('side.c', 'int foo() { return 42; }')
6650-
create_file('main.c', '#include <assert.h>\nextern int foo(); int main() { assert(foo() == 42); return 0; }')
6651-
6652-
self.run_process([EMCC, '-O2', 'side.c', '-sSIDE_MODULE', '-o', 'side.wasm'])
6653-
self.run_process([EMCC, '-O2', 'main.c', '-sMAIN_MODULE', '-o', 'main.js', 'side.wasm'])
6654-
self.run_js('main.js')
6655-
6656-
err = self.run_process([EMCC, '-O2', 'main.c', '-sMAIN_MODULE', '-o', 'main2.js', '-sRUNTIME_LINKED_LIBS=side.wasm'], stderr=PIPE).stderr
6657-
self.assertContained('emcc: warning: RUNTIME_LINKED_LIBS is deprecated', err)
6658-
self.run_js('main2.js')
6659-
6660-
self.assertBinaryEqual('main.wasm', 'main2.wasm')
6647+
self.assert_fail([EMCC, test_file('hello_world.c'), '-sRUNTIME_LINKED_LIBS=side.wasm'], 'list shared libraries directly on the command line instead')
66616648

66626649
@parameterized({
66636650
'': ([],),

tools/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@
112112
#
113113
# All settings here should be tagged as `[deprecated]` in settings.js
114114
DEPRECATED_SETTINGS = {
115-
'RUNTIME_LINKED_LIBS': 'you can simply list the libraries directly on the commandline now',
116115
'CLOSURE_WARNINGS': 'use -Wclosure/-Wno-closure instead',
117116
'LEGALIZE_JS_FFI': 'to disable JS type legalization use `-sWASM_BIGINT` or `-sSTANDALONE_WASM`',
118117
'ASYNCIFY_EXPORTS': 'please use JSPI_EXPORTS instead',
@@ -257,6 +256,7 @@
257256
['USE_OFFSET_COVERTER', [0], 'No longer supported, not needed with modern v8 versions'],
258257
['ASYNCIFY_LAZY_LOAD_CODE', [0], 'No longer supported'],
259258
['USE_WEBGPU', [0], 'No longer supported; replaced by --use-port=emdawnwebgpu, which implements a newer (but incompatible) version of webgpu.h - see tools/ports/emdawnwebgpu.py'],
259+
['RUNTIME_LINKED_LIBS', [[]], 'list shared libraries directly on the command line instead'],
260260
]
261261

262262
user_settings: Dict[str, str] = {}

0 commit comments

Comments
 (0)