From 951692b1c2284931d791f951ae85daa68f503bb8 Mon Sep 17 00:00:00 2001 From: Nuclearist Date: Thu, 31 Oct 2024 17:54:38 +0300 Subject: [PATCH] Build system adjustments --- meson.build | 14 ++++---------- x86_64-windows-clang.ini | 8 ++++++++ 2 files changed, 12 insertions(+), 10 deletions(-) create mode 100755 x86_64-windows-clang.ini diff --git a/meson.build b/meson.build index 12358ca..e5c2114 100644 --- a/meson.build +++ b/meson.build @@ -3,12 +3,10 @@ project( 'c', version: '1.0.3', default_options: { - 'optimization': '3', + 'optimization': '2', 'warning_level': '3', - 'b_lto': 'true', - 'b_lto_mode': 'thin', 'b_vscrt': 'mt', - 'c_std': 'c2x', + 'c_std': 'c23', 'c_winlibs': [ 'advapi32.lib', 'kernel32.lib', @@ -19,21 +17,17 @@ project( ], }, ) -res = import('windows').compile_resources( - 'tek-injector.rc', - include_directories: '/usr/x86_64-pc-windows-msvc/include', -) executable( 'tek-injector', 'main.c', 'vm-stubs.s', - res, + import('windows').compile_resources('tek-injector.rc'), win_subsystem: 'windows', c_args: '/GS-', link_args: [ '/ENTRY:entry', '/MANIFEST:EMBED', - '/MANIFESTINPUT:../tek-injector.manifest', + '/MANIFESTINPUT:' + meson.current_source_dir() / 'tek-injector.manifest', '/MANIFESTUAC:level=\'requireAdministrator\'', ], ) diff --git a/x86_64-windows-clang.ini b/x86_64-windows-clang.ini new file mode 100755 index 0000000..34bce01 --- /dev/null +++ b/x86_64-windows-clang.ini @@ -0,0 +1,8 @@ +[binaries] +c = 'clang-cl' +c_ld = 'lld-link' +windres = 'llvm-rc' + +[built-in options] +c_args = '-flto=thin -fuse-ld=lld' +c_ld_args = '-flto=thin'