summaryrefslogtreecommitdiff
path: root/etc/defaults/CC/TARGETS.archive
blob: a5b1cd4cea4e4ab17ffbf63ac6e1f8ca902384ce (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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
{ "defaults":
  { "type": ["CC", "defaults"]
  , "arguments_config":
    ["OS", "COMPILER_FAMILY", "DEBUG", "ENABLE_BZip2", "HIDE_SYMBOLS"]
  , "base": [["@", "base", "CC", "defaults"]]
  , "ADD_CFLAGS":
    { "type": "let*"
    , "bindings":
      [ [ "OS"
        , { "type": "var"
          , "name": "OS"
          , "default":
            {"type": "fail", "msg": "Required variable 'OS' is not set."}
          }
        ]
      , [ "COMPILER_FAMILY"
        , {"type": "var", "name": "COMPILER_FAMILY", "default": "unknown"}
        ]
      , ["DEBUG", {"type": "var", "name": "DEBUG", "default": false}]
      ]
    , "body":
      { "type": "++"
      , "$1":
        [ ["-DHAVE_CONFIG_H"]
        , { "type": "if"
          , "cond":
            { "type": "case*"
            , "expr": {"type": "var", "name": "COMPILER_FAMILY"}
            , "case": [["gnu", true], ["clang", true]]
            , "default": false
            }
          , "then":
            { "type": "++"
            , "$1":
              [ ["-Wall", "-Wformat", "-Wformat-security"]
              , { "type": "if"
                , "cond": {"type": "var", "name": "DEBUG"}
                , "then":
                  [ "-g"
                  , "-Wextra"
                  , "-Wunused"
                  , "-Wshadow"
                  , "-Wmissing-prototypes"
                  , "-Wcast-qual"
                  ]
                }
              ]
            }
          }
        , { "type": "case*"
          , "expr": {"type": "var", "name": "COMPILER_FAMILY"}
          , "case":
            [ [ "xlc_r"
              , { "type": "++"
                , "$1":
                  [ ["-qflag=e:e", "-qformat=sec"]
                  , { "type": "if"
                    , "cond": {"type": "var", "name": "DEBUG"}
                    , "then":
                      ["-qhalt=w", "-g", "-qflag=w:w", "-qinfo=pro:use"]
                    }
                  ]
                }
              ]
            , [ "msvc"
              , { "type": "++"
                , "$1":
                  [ ["/Oi"]
                  , { "type": "if"
                    , "cond": {"type": "var", "name": "DEBUG"}
                    , "then":
                      [ "/w14062"
                      , "/w14254"
                      , "/w14295"
                      , "/w14296"
                      , "/w14389"
                      , "/w14505"
                      , "/w14514"
                      , "/w14702"
                      , "/w14706"
                      ]
                    }
                  , ["-D_CRT_SECURE_NO_DEPRECATE"]
                  ]
                }
              ]
            , ["mingw", ["-D__USE_MINGW_ANSI_STDIO"]]
            ]
          }
        , { "type": "case*"
          , "expr": {"type": "var", "name": "OS"}
          , "case":
            [ ["hp-ux", ["-D_XOPEN_SOURCE=500"]]
            , ["mac", ["-Wno-deprecated-declarations"]]
            ]
          }
        , { "type": "if"
          , "cond":
            { "type": "=="
            , "$1": {"type": "var", "name": "COMPILER_FAMILY"}
            , "$2": "msvc"
            }
          , "then": []
          , "else":
            { "type": "if"
            , "cond": {"type": "var", "name": "HIDE_SYMBOLS"}
            , "then":
              { "type": "case*"
              , "expr": {"type": "var", "name": "COMPILER_FAMILY"}
              , "case":
                [ ["clang", ["-D__LIBARCHIVE_ENABLE_VISIBILITY"]]
                , ["gnu", ["-D__LIBARCHIVE_ENABLE_VISIBILITY"]]
                , ["intel", ["-D__LIBARCHIVE_ENABLE_VISIBILITY"]]
                ]
              }
            }
          }
        ]
      }
    }
  }
}