summaryrefslogtreecommitdiffstats
path: root/third_party/python/gyp/test/win/linker-flags/safeseh.gyp
blob: d4a62074b8f94c1fa33c7ffc95a2db78603f9d2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Copyright (c) 2014 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

{
  'target_defaults': {
    'configurations': {
      'Default': {
        'msvs_configuration_platform': 'Win32',
      },
      'Default_x64': {
        'inherit_from': ['Default'],
        'msvs_configuration_platform': 'x64',
      },
    },
  },
  'targets': [
    {
      'target_name': 'test_safeseh_default',
      'type': 'executable',
      'msvs_settings': {
        # By default, msvs passes /SAFESEH for Link, but not for MASM.  In
        # order for test_safeseh_default to link successfully, we need to
        # explicitly specify /SAFESEH for MASM.
        'MASM': {
          'UseSafeExceptionHandlers': 'true',
        },
      },
      'sources': [
        'safeseh_hello.cc',
        'safeseh_zero.asm',
      ],
    },
    {
      'target_name': 'test_safeseh_no',
      'type': 'executable',
      'msvs_settings': {
        'VCLinkerTool': {
          'ImageHasSafeExceptionHandlers': 'false',
        },
      },
      'sources': [
        'safeseh_hello.cc',
        'safeseh_zero.asm',
      ],
    },
    {
      'target_name': 'test_safeseh_yes',
      'type': 'executable',
      'msvs_settings': {
        'VCLinkerTool': {
          'ImageHasSafeExceptionHandlers': 'true',
        },
        'MASM': {
          'UseSafeExceptionHandlers': 'true',
        },
      },
      'sources': [
        'safeseh_hello.cc',
        'safeseh_zero.asm',
      ],
    },
    {
      # x64 targets cannot have ImageHasSafeExceptionHandlers or
      # UseSafeExceptionHandlers set.
      'target_name': 'test_safeseh_x64',
      'type': 'executable',
      'configurations': {
        'Default': {
          'msvs_target_platform': 'x64',
        },
      },
      'sources': [
        'safeseh_hello.cc',
        'safeseh_zero64.asm',
      ],
    },
  ]
}