From 38beb23c6a3e0aeb8c732e1f50708b417d979047 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 25 Jul 2025 15:14:59 +0300 Subject: [PATCH] v.builder: add a clearer error message for `v -shared run empty.v` (issue found by Felipe Pena) --- vlib/v/builder/compile.v | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vlib/v/builder/compile.v b/vlib/v/builder/compile.v index 8d08ae208f..6c1603c8a2 100644 --- a/vlib/v/builder/compile.v +++ b/vlib/v/builder/compile.v @@ -137,6 +137,9 @@ fn (mut b Builder) run_compiled_executable_and_exit() { if b.pref.is_verbose { println('running ${run_file} with arguments ${run_args.join(' ')}') } + if b.pref.is_shared { + verror('can not run shared library ${run_file}') + } mut ret := 0 if b.pref.use_os_system_to_run { command_to_run := os.quoted_path(run_file) + ' ' + run_args.join(' ')