From 5341277e2675e8169e9316e3b9d91424c10464a9 Mon Sep 17 00:00:00 2001 From: Teselka <53512153+Teselka@users.noreply.github.com> Date: Tue, 10 Sep 2024 14:33:59 +0300 Subject: [PATCH 1/2] openssl: add asm support for windows-x86_x64/windows-x86 --- subprojects/packagefiles/openssl/meson.build | 60 +++++--------------- 1 file changed, 13 insertions(+), 47 deletions(-) diff --git a/subprojects/packagefiles/openssl/meson.build b/subprojects/packagefiles/openssl/meson.build index 28ddac665..301ac7d6f 100644 --- a/subprojects/packagefiles/openssl/meson.build +++ b/subprojects/packagefiles/openssl/meson.build @@ -125,53 +125,19 @@ if gas_or_nasm asm = 'no-asm' endif elif is_windows - if is_x86 - warning('x86 + windows combo does not support ASM yet, please contribute') - asm = 'no-asm' - # TODO: Port this for Windows and uncomment - # arch_subdir = 'VC-WIN32' - # asm = 'asm' - #'rules': [ - # { - # 'rule_name': 'Assemble', - # 'extension': 'asm', - # 'inputs': [], - # 'outputs': [ - # '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj', - # ], - # 'action': [ - # 'nasm.exe', - # '-f win32', - # '-o', '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj', - # '<(RULE_INPUT_PATH)', - # ], - # } - #], - elif is_x86_64 - warning('x86_64 + windows combo does not support ASM yet, please contribute') - asm = 'no-asm' - # TODO: Port this for Windows and uncomment - # arch_subdir = 'VC-WIN64A' - # asm = 'asm' - #'rules': [ - # { - # 'rule_name': 'Assemble', - # 'extension': 'asm', - # 'inputs': [], - # 'outputs': [ - # '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj', - # ], - # 'action': [ - # 'nasm.exe', - # '-f win64', - # '-DNEAR', - # '-Ox', - # '-g', - # '-o', '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj', - # '<(RULE_INPUT_PATH)', - # ], - # } - #], + has_win_asm = add_languages('as', native: false, required: false) + if not has_win_asm and meson.version().version_compare('>=0.64') + has_win_asm = add_languages('nasm', native: false, required: false) + endif + + if has_win_asm + if is_x86 + arch_subdir = 'VC-WIN32' + elif is_x86_64 + arch_subdir = 'VC-WIN64A' + else + asm = 'no-asm' + endif else asm = 'no-asm' endif From c28e9f8905fc76fb4266b3d4069eaa41953f55b6 Mon Sep 17 00:00:00 2001 From: Teselka <53512153+Teselka@users.noreply.github.com> Date: Tue, 10 Sep 2024 15:20:34 +0300 Subject: [PATCH 2/2] openssl: suppress nasm warning with meson version >=0.64 on windows --- subprojects/packagefiles/openssl/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/packagefiles/openssl/meson.build b/subprojects/packagefiles/openssl/meson.build index 301ac7d6f..5b127b6c0 100644 --- a/subprojects/packagefiles/openssl/meson.build +++ b/subprojects/packagefiles/openssl/meson.build @@ -126,8 +126,8 @@ if gas_or_nasm endif elif is_windows has_win_asm = add_languages('as', native: false, required: false) - if not has_win_asm and meson.version().version_compare('>=0.64') - has_win_asm = add_languages('nasm', native: false, required: false) + if not has_win_asm + has_win_asm = add_languages(meson.version().version_compare('>=0.64') ? 'nasm' : '', native: false, required: false) endif if has_win_asm