about summary refs log tree commit diff stats
path: root/common.gypi
blob: dd1b08c0a1cfae6a2ba17db7ea18aac88790201d (plain) (blame)
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
80
81
82
83
84
85
86
87
{
  "variables": {
    "visibility%": "hidden",         # V8"s visibility setting
    "target_arch%": "ia32",          # set v8"s target architecture
    "host_arch%": "ia32",            # set v8"s host architecture
    "library%": "static_library",    # allow override to "shared_library" for DLL/.so builds
    "uv_library%": "static_library", # allow override to "shared_library" for DLL/.so builds
    "component%": "static_library",  # NB. these names match with what V8 expects
    "msvs_multi_core_compile": "0",  # we do enable multicore compiles, but not using the V8 way
    "gcc_version%": "unknown",
    "clang%": 1,
    "openssl_fips%": "false",
    "bud_asan%": "false",
    "conditions": [
      ["GENERATOR == 'ninja'", {
        "OBJ_DIR": "<(PRODUCT_DIR)/obj",
      }, {
        "OBJ_DIR": "<(PRODUCT_DIR)/obj.target",
      }],
    ],
  },

  "target_defaults": {
    "default_configuration": "Release",
    "configurations": {
      "Debug": {
        "defines": [ "DEBUG", "_DEBUG" ],
        "cflags": [ "-g", "-O0", "-fwrapv", "-Wno-parentheses-equality" ],
        "xcode_settings": {
          "GCC_OPTIMIZATION_LEVEL": "0"
        },
      },
      "Release": {
        "defines": [ "NDEBUG" ],
        "cflags": [ "-g" ],
      }
    },

    "cflags": [
      "-Wno-unused-function",
    ],

    "xcode_settings": {
      "GCC_VERSION": "com.apple.compilers.llvm.clang.1_0",
      "GCC_WARN_ABOUT_MISSING_NEWLINE": "YES",  # -Wnewline-eof
      "PREBINDING": "NO",                       # No -Wl,-prebind
      "OTHER_CFLAGS": [
        "-fstrict-aliasing",
        "-g",
      ],
      "WARNING_CFLAGS": [
        "-Wall",
        "-Wendif-labels",
        "-W",
        "-Wno-unused-parameter",
        "-Wno-unused-function",
        "-Wundeclared-selector",
        "-Wno-parentheses-equality",
      ],
    },
    "conditions": [
      ["target_arch=='ia32'", {
        "xcode_settings": {"ARCHS": ["i386"]},
      }],
      ["target_arch=='x64'", {
        "xcode_settings": {"ARCHS": ["x86_64"]},
      }],
      [ "OS in 'linux freebsd openbsd solaris'", {
        "target_conditions": [
          ["_type=='static_library'", {
            "standalone_static_library": 1, # disable thin archive which needs binutils >= 2.19
          }],
        ],
        "conditions": [
          [ "target_arch=='ia32'", {
            "cflags": [ "-m32" ],
            "ldflags": [ "-m32" ],
          }],
          [ "target_arch=='x64'", {
            "cflags": [ "-m64" ],
            "ldflags": [ "-m64" ],
          }],
        ],
      }],
    ]
  },
}