Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -14432,6 +14432,9 @@ def test_no_input_files(self):
err = self.expect_fail([EMCC, '-c'])
self.assertContained('clang: error: no input files', err)

err = self.expect_fail([EMCC])
self.assertContained('emcc: error: no input files', err)

def test_embind_negative_enum_values(self):
# Test if negative enum values are printed correctly and not overflown to
# large values when CAN_ADDRESS_2GB is true.
Expand Down
3 changes: 3 additions & 0 deletions tools/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -2958,6 +2958,9 @@ def run(linker_inputs, options, state, newargs):
# We have now passed the compile phase, allow reading/writing of all settings.
settings.limit_settings(None)

if not linker_inputs and not state.link_flags:
exit_with_error('no input files')

if options.output_file and options.output_file.startswith('-'):
exit_with_error(f'invalid output filename: `{options.output_file}`')

Expand Down