From 1674722e1caf3ff4dd52438b70ed68d46af83a6d Mon Sep 17 00:00:00 2001 From: Tyler James Leonhardt Date: Thu, 17 Mar 2022 21:28:07 -0700 Subject: [PATCH] add cf and spectre flags (#533) * add cf and spectre flags * remove ExceptionHandling * chore: remove duplicate declaration * ci: update pipeline images * chore: update node-gyp * ci: update script execution * Revert "ci: update script execution" This reverts commit b5b6afe3c4065e97c0d4bd987c4c87a270c0023d. * Revert "chore: update node-gyp" This reverts commit 9ee77a39354e3902b78a36cbd4e56ba95a3d3b79. * ci: revert to 2019 agent Co-authored-by: deepak1556 --- azure-pipelines.yml | 4 ++-- binding.gyp | 23 +++++++++++++++++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 936d1dd90..1317e5002 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -30,7 +30,7 @@ jobs: - job: macOS pool: - vmImage: 'macOS-10.15' + vmImage: 'macOS-latest' strategy: matrix: node_12_x: @@ -54,7 +54,7 @@ jobs: - job: Windows pool: - vmImage: 'vs2017-win2016' + vmImage: 'windows-2019' strategy: matrix: node_12_x: diff --git a/binding.gyp b/binding.gyp index b2c262dbf..66411ec3f 100644 --- a/binding.gyp +++ b/binding.gyp @@ -1,4 +1,23 @@ { + 'target_defaults': { + 'conditions': [ + ['OS=="win"', { + 'msvs_settings': { + 'VCCLCompilerTool': { + 'AdditionalOptions': [ + '/Qspectre', + '/guard:cf' + ] + }, + 'VCLinkerTool': { + 'AdditionalOptions': [ + '/guard:cf' + ] + } + }, + }], + ], + }, 'conditions': [ ['OS=="win"', { 'targets': [ @@ -13,7 +32,7 @@ ], 'libraries': [ 'shlwapi.lib' - ] + ], }, { 'target_name': 'conpty_console_list', @@ -22,7 +41,7 @@ ], 'sources' : [ 'src/win/conpty_console_list.cc' - ] + ], }, { 'target_name': 'pty',