{
  "targets": [
    {
      "include_dirs": [
        "<!(node -e \"require('nan')\")",
      ],
      "target_name": "windows-registry",
      "sources": [
        "windows-registry.cpp"
      ],
      "msvs_settings": {
        "VCCLCompilerTool": {
          "WholeProgramOptimization": "true", # /GL, whole program optimization, needed for LTCG
          "OmitFramePointers": "true",
          "EnableFunctionLevelLinking": "true",
          "EnableIntrinsicFunctions": "true",
          "RuntimeTypeInfo": "false",
          "ExceptionHandling": "1",
          "BufferSecurityCheck": "true",
          "AdditionalOptions": [
            "/guard:cf" # control flow guard
          ],
        },
        "VCLibrarianTool": {
          "AdditionalOptions": [
            "/LTCG", # link time code generation
          ],
        },
        "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
          ],
        },
      },
    }
  ]
}