summaryrefslogtreecommitdiff
path: root/etc/defaults/CC/TARGETS.git2
blob: 595cee1f9398e01d88a9e567adbb17ac2a42da5b (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
{ "defaults":
  { "type": ["CC", "defaults"]
  , "arguments_config": ["COMPILER_FAMILY", "OS"]
  , "base": [["@", "base", "CC", "defaults"]]
  , "ADD_CFLAGS":
    { "type": "let*"
    , "bindings":
      [ [ "COMPILER_FAMILY"
        , {"type": "var", "name": "COMPILER_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-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"
            ]
          ]
        }
      }
    }
  }
}