Skip to content

Commit 4630354

Browse files
committed
Remove LLD_REPORT_UNDEFINED setting
This setting became the default in #16003 and there is no reason to keep it around anymore.
1 parent f11d619 commit 4630354

File tree

6 files changed

+3
-33
lines changed

6 files changed

+3
-33
lines changed

emcc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2991,7 +2991,7 @@ def phase_link(linker_arguments, wasm_target):
29912991
# fastcomp deferred linking opts.
29922992
# TODO: we could check if this is a fastcomp build, and still speed things up here
29932993
js_syms = None
2994-
if settings.LLD_REPORT_UNDEFINED and settings.ERROR_ON_UNDEFINED_SYMBOLS and not settings.SIDE_MODULE:
2994+
if settings.ERROR_ON_UNDEFINED_SYMBOLS and not settings.SIDE_MODULE:
29952995
js_syms = get_all_js_syms()
29962996
building.link_lld(linker_arguments, wasm_target, external_symbols=js_syms)
29972997

emscripten.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def report_missing_symbols(js_library_funcs):
244244

245245
if settings.EXPECT_MAIN and 'main' not in settings.WASM_EXPORTS and '__main_argc_argv' not in settings.WASM_EXPORTS:
246246
# For compatibility with the output of wasm-ld we use the same wording here in our
247-
# error message as if wasm-ld had failed (i.e. in LLD_REPORT_UNDEFINED mode).
247+
# error message as if wasm-ld had failed.
248248
exit_with_error('entry symbol not defined (pass --no-entry to suppress): main')
249249

250250

src/jsifier.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,6 @@ function ${name}(${args}) {
253253
if (dependent) msg += ` (referenced by ${dependent})`;
254254
if (ERROR_ON_UNDEFINED_SYMBOLS) {
255255
error(msg);
256-
if (dependent == TOP_LEVEL && !LLD_REPORT_UNDEFINED) {
257-
warnOnce('Link with `-sLLD_REPORT_UNDEFINED` to get more information on undefined symbols');
258-
}
259256
warnOnce('To disable errors for undefined symbols use `-sERROR_ON_UNDEFINED_SYMBOLS=0`');
260257
warnOnce(finalName + ' may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library');
261258
} else if (VERBOSE || WARN_ON_UNDEFINED_SYMBOLS) {

src/settings.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1917,14 +1917,6 @@ var USE_OFFSET_CONVERTER = false;
19171917
// This is enabled automatically when using -g4 with sanitizers.
19181918
var LOAD_SOURCE_MAP = false;
19191919

1920-
// If set to 0, delay undefined symbol report until after wasm-ld runs. This
1921-
// avoids running the the JS compiler prior to wasm-ld, but reduces the amount
1922-
// of information in the undefined symbol message (Since JS compiler cannot
1923-
// report the name of the object file that contains the reference to the
1924-
// undefined symbol).
1925-
// [link]
1926-
var LLD_REPORT_UNDEFINED = true;
1927-
19281920
// Default to c++ mode even when run as `emcc` rather then `emc++`.
19291921
// When this is disabled `em++` is required when compiling and linking C++
19301922
// programs. This which matches the behaviour of gcc/g++ and clang/clang++.
@@ -2170,4 +2162,5 @@ var LEGACY_SETTINGS = [
21702162
['LIBRARY_DEPS_TO_AUTOEXPORT', [[]], 'No longer needed'],
21712163
['EMIT_EMSCRIPTEN_METADATA', [0], 'No longer supported'],
21722164
['SHELL_FILE', [''], 'No longer supported'],
2165+
['LLD_REPORT_UNDEFINED', [1], 'No longer supported'],
21732166
];

test/test_core.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4148,11 +4148,6 @@ def test_dylink_basics_no_modify(self):
41484148
self.set_setting('ERROR_ON_WASM_CHANGES_AFTER_LINK')
41494149
self.do_basic_dylink_test()
41504150

4151-
@needs_dylink
4152-
def test_dylink_basics_no_lld_report_undefined(self):
4153-
self.set_setting('LLD_REPORT_UNDEFINED', 0)
4154-
self.do_basic_dylink_test()
4155-
41564151
@needs_dylink
41574152
def test_dylink_no_export(self):
41584153
self.set_setting('NO_DECLARE_ASM_MODULE_EXPORTS')

test/test_other.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10887,21 +10887,6 @@ def test_signature_mismatch(self):
1088710887
self.expect_fail([EMCC, '-Wl,--fatal-warnings', 'a.c', 'b.c'])
1088810888
self.expect_fail([EMCC, '-sSTRICT', 'a.c', 'b.c'])
1088910889

10890-
# TODO(sbc): Remove these tests once we remove the LLD_REPORT_UNDEFINED
10891-
def test_lld_report_undefined(self):
10892-
create_file('main.c', 'void foo(); int main() { foo(); return 0; }')
10893-
stderr = self.expect_fail([EMCC, '-sLLD_REPORT_UNDEFINED=0', 'main.c'])
10894-
self.assertContained('error: undefined symbol: foo (referenced by top-level compiled C/C++ code)', stderr)
10895-
10896-
def test_lld_report_undefined_reverse_deps(self):
10897-
self.run_process([EMCC, '-sLLD_REPORT_UNDEFINED=0', '-sREVERSE_DEPS=all', test_file('hello_world.c')])
10898-
10899-
def test_lld_report_undefined_exceptions(self):
10900-
self.run_process([EMXX, '-sLLD_REPORT_UNDEFINED=0', '-fwasm-exceptions', test_file('hello_libcxx.cpp')])
10901-
10902-
def test_lld_report_undefined_main_module(self):
10903-
self.run_process([EMCC, '-sLLD_REPORT_UNDEFINED=0', '-sMAIN_MODULE=2', test_file('hello_world.c')])
10904-
1090510890
# Verifies that warning messages that Closure outputs are recorded to console
1090610891
def test_closure_warnings(self):
1090710892
# Default should be no warnings

0 commit comments

Comments
 (0)