From eb575031fe671fa6c8a14b13f63f8ebca54380c7 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Sun, 26 Jun 2016 03:54:12 -0400 Subject: [PATCH 1/2] deps: `MASM.UseSafeExceptionHandlers` for OpenSSL Use `msvs_settings.MASM.UseSafeExceptionHandlers` when building OpenSSL assembly code on Windows. This option appends `/safeseh` to the list of assembler flags when building `.asm` files on Windows. Having this option in place, separate rules in `masm_compile.gypi` are no longer needed. Fix: #7426 --- deps/openssl/masm_compile.gypi | 44 ---------------------------------- deps/openssl/openssl.gyp | 7 +++++- 2 files changed, 6 insertions(+), 45 deletions(-) delete mode 100644 deps/openssl/masm_compile.gypi diff --git a/deps/openssl/masm_compile.gypi b/deps/openssl/masm_compile.gypi deleted file mode 100644 index c18e484f73c3b1..00000000000000 --- a/deps/openssl/masm_compile.gypi +++ /dev/null @@ -1,44 +0,0 @@ -{ - 'conditions': [ - ['target_arch=="ia32"', { - 'rules': [ - { - 'rule_name': 'Assemble', - 'extension': 'asm', - 'inputs': [], - 'outputs': [ - '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj', - ], - 'action': [ - 'ml.exe', - '/Zi', - '/safeseh', - '/Fo', '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj', - '/c', '<(RULE_INPUT_PATH)', - ], - 'process_outputs_as_sources': 0, - 'message': 'Assembling <(RULE_INPUT_PATH) to <(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj.', - } - ], - }, 'target_arch=="x64"', { - 'rules': [ - { - 'rule_name': 'Assemble', - 'extension': 'asm', - 'inputs': [], - 'outputs': [ - '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj', - ], - 'action': [ - 'ml64.exe', - '/Zi', - '/Fo', '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj', - '/c', '<(RULE_INPUT_PATH)', - ], - 'process_outputs_as_sources': 0, - 'message': 'Assembling <(RULE_INPUT_PATH) to <(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj.', - } - ], - }], - ], -} diff --git a/deps/openssl/openssl.gyp b/deps/openssl/openssl.gyp index db57033d54e20e..287c2e6e3e5af6 100644 --- a/deps/openssl/openssl.gyp +++ b/deps/openssl/openssl.gyp @@ -121,7 +121,12 @@ }], # end of conditions of openssl_no_asm ['OS=="win"', { 'defines' : ['<@(openssl_defines_all_win)'], - 'includes': ['masm_compile.gypi',], + 'msvs_settings': { + 'MASM': { + # Use /safeseh, see: 01fa5ee + 'UseSafeExceptionHandlers': 'true', + }, + }, }, { 'defines' : ['<@(openssl_defines_all_non_win)'] }] From 8171bd4042fc809c8b1e5f2c01f67651f3aa316d Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Sun, 26 Jun 2016 13:53:02 -0400 Subject: [PATCH 2/2] ... --- deps/openssl/openssl.gyp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/openssl/openssl.gyp b/deps/openssl/openssl.gyp index 287c2e6e3e5af6..b25efe60d5e8e6 100644 --- a/deps/openssl/openssl.gyp +++ b/deps/openssl/openssl.gyp @@ -123,7 +123,7 @@ 'defines' : ['<@(openssl_defines_all_win)'], 'msvs_settings': { 'MASM': { - # Use /safeseh, see: 01fa5ee + # Use /safeseh, see commit: 01fa5ee 'UseSafeExceptionHandlers': 'true', }, },