{
  "targets": [
    {
      "target_name": "enableWerWin",
      "sources": [
        "enableWer.cc"
      ],
      "libraries": [
        "wer.lib"
      ],
      "msvs_settings": {
        "VCCLCompilerTool": {
          "WholeProgramOptimization": "true", # /GL, wholeprogramoptimization, neededforLTCG
          "OmitFramePointers": "true",
          "EnableFunctionLevelLinking": "true",
          "EnableIntrinsicFunctions": "true",
          "RuntimeTypeInfo": "false",
          "ExceptionHandling": 2,  #"/EHa" allows handling of both C++ and C errors. (SEH)
          "BufferSecurityCheck": "true",
          "AdditionalOptions": [
            "/guard:cf" # control flow guard
          ],
        },
        "VCLibrarianTool": {
            "AdditionalOptions": [
                "/LTCG", # linktimecodegeneration
            ],
        },
        "VCLinkerTool": {
          "LinkTimeCodeGeneration": 1, # link-time code generation
          "OptimizeReferences": 2, # /OPT:REF
          "EnableCOMDATFolding": 2, # /OPT:ICF
          "LinkIncremental": 1, # disable incremental linking
          "GenerateDebugInformation": "true",
          "GenerateMapFile": "false",
          "MapExports": "false",
          "RandomizedBaseAddress": "2", # RandomizedBaseAddressYes
          "AdditionalDependencies": [
            "notelemetry.obj", # disable telemetry to fix security issue
          ],
          "AdditionalOptions": [
            "/guard:cf", # control flow guard
          ],
        },
      }
    }
  ]
}