Skip to content

Commit 3f81b2c

Browse files
authored
Restore 'no input files' error (#21122)
This change partially reverts #20905. Fixes: #21116
1 parent 014afb6 commit 3f81b2c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

test/test_other.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14416,6 +14416,9 @@ def test_no_input_files(self):
1441614416
err = self.expect_fail([EMCC, '-c'])
1441714417
self.assertContained('clang: error: no input files', err)
1441814418

14419+
err = self.expect_fail([EMCC])
14420+
self.assertContained('emcc: error: no input files', err)
14421+
1441914422
def test_embind_negative_enum_values(self):
1442014423
# Test if negative enum values are printed correctly and not overflown to
1442114424
# large values when CAN_ADDRESS_2GB is true.

tools/link.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2921,6 +2921,9 @@ def run(linker_inputs, options, state, newargs):
29212921
# We have now passed the compile phase, allow reading/writing of all settings.
29222922
settings.limit_settings(None)
29232923

2924+
if not linker_inputs and not state.link_flags:
2925+
exit_with_error('no input files')
2926+
29242927
if options.output_file and options.output_file.startswith('-'):
29252928
exit_with_error(f'invalid output filename: `{options.output_file}`')
29262929

0 commit comments

Comments
 (0)