summaryrefslogtreecommitdiff
path: root/etc/defaults/CC/TARGETS.git2
blob: 4af906a15f75cb5a2cfe3378222f7aa4c6c02dcd (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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
{ "defaults":
  { "type": ["CC", "defaults"]
  , "arguments_config": ["TOOLCHAIN_CONFIG", "OS"]
  , "base": [["@", "base", "CC", "defaults"]]
  , "ADD_CFLAGS":
    { "type": "let*"
    , "bindings":
      [ [ "COMPILER_FAMILY"
        , { "type": "lookup"
          , "map":
            { "type": "var"
            , "name": "TOOLCHAIN_CONFIG"
            , "default": {"type": "empty_map"}
            }
          , "key": "FAMILY"
          , "default": "unknown"
          }
        ]
      , [ "OS"
        , { "type": "var"
          , "name": "OS"
          , "default":
            {"type": "fail", "msg": "Required variable 'OS' is not set."}
          }
        ]
      ]
    , "body":
      { "type": "case"
      , "expr": {"type": "var", "name": "COMPILER_FAMILY"}
      , "case":
        { "msvc":
          [ "-D_SCL_SECURE_NO_WARNINGS"
          , "-D_CRT_SECURE_NO_DEPRECATE"
          , "-D_CRT_NONSTDC_NO_DEPRECATE"
          , "/GF"
          , "/MP"
          , "/nologo"
          ]
        }
      , "default":
        { "type": "++"
        , "$1":
          [ [ "-std=gnu90"
            , "-D_GNU_SOURCE"
            , "-Wall"
            , "-Wextra"
            , "-DGIT_DEPRECATE_HARD"
            ]
          , { "type": "case"
            , "expr": {"type": "var", "name": "OS"}
            , "case":
              { "sunos":
                [ "-D_POSIX_C_SOURCE=200112L"
                , "-D__EXTENSIONS__"
                , "-D_POSIX_PTHREAD_SEMANTICS"
                ]
              , "solaris":
                [ "-D_POSIX_C_SOURCE=200112L"
                , "-D__EXTENSIONS__"
                , "-D_POSIX_PTHREAD_SEMANTICS"
                ]
              }
            }
          , { "type": "case"
            , "expr": {"type": "var", "name": "COMPILER_FAMILY"}
            , "case":
              { "clang":
                [ "-Wdocumentation"
                , "-Wno-documentation-deprecated-sync"
                , "-Wno-unused-but-set-variable"
                , "-Wno-unused-but-set-parameter"
                , "-Wno-single-bit-bitfield-constant-conversion"
                ]
              , "gnu": ["-Wno-dangling-pointer"]
              }
            }
          , [ "-Wno-missing-field-initializers"
            , "-Wstrict-aliasing"
            , "-Wstrict-prototypes"
            , "-Wdeclaration-after-statement"
            , "-Wshift-count-overflow"
            , "-Wunused-const-variable"
            , "-Wunused-function"
            , "-Wint-conversion"
            , "-Wformat"
            , "-Wformat-security"
            , "-Wmissing-declarations"
            , "-Wno-implicit-fallthrough"
            , "-Wno-sign-compare"
            , "-Wno-unused-parameter"
            , "-Wno-uninitialized"
            , "-Wno-array-parameter"
            , "-Wno-unknown-warning-option"
            ]
          ]
        }
      }
    }
  }
}