From e4eeebd12a41b65da02087d93e19ee719723fd8b Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 20 Dec 2025 14:35:45 +0100 Subject: Make GOOS and GOARCH part of executable name This renames `sia-server` to `sia-server-linux-amd64`. This makes clear for which target environment the executable is built and allows to later place additional executables for other environments too without name collisions. --- meson.build | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 7436494..adcde65 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ project('sia-server') go = find_program('go', required : true) -sia_server = custom_target( +sia_server_linux_amd64 = custom_target( input : [ meson.current_source_dir() / 'main.go', meson.current_source_dir() / 'cache.go', @@ -11,7 +11,8 @@ sia_server = custom_target( meson.current_source_dir() / 'config.go', meson.current_source_dir() / 'flags.go', ], - output : 'sia-server', + output : 'sia-server-linux-amd64', + env : {'GOOS': 'linux', 'GOARCH': 'amd64'}, command : [ go, 'build', @@ -27,7 +28,7 @@ sia_server = custom_target( run_target( 'run', command : [ - sia_server, + sia_server_linux_amd64, ], ) -- cgit v1.2.3-70-g09d2