summaryrefslogtreecommitdiff
path: root/test/TARGETS
blob: d9da126c2e1458129aeb20a3acfa612a5cc04ab4 (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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
{ "helloworld-c":
  { "type": ["@", "rules", "CC", "binary"]
  , "pure C": ["yes"]
  , "name": ["helloworld"]
  , "srcs": ["main.c"]
  , "private-cflags": ["-Wno-unused-command-line-argument"]
  }
, "helloworld-cpp":
  { "type": ["@", "rules", "CC", "binary"]
  , "name": ["helloworld"]
  , "srcs": ["main.cpp"]
  , "private-cflags": ["-Wno-unused-command-line-argument"]
  }
, "installed helloworld-c":
  { "type": ["@", "rules", "CC", "install-with-deps"]
  , "targets": ["helloworld-c"]
  }
, "installed helloworld-cpp":
  { "type": ["@", "rules", "CC", "install-with-deps"]
  , "targets": ["helloworld-cpp"]
  }
, "test-c":
  { "type": ["@", "rules", "shell/test", "script"]
  , "arguments_config": ["TEST_NAME_SUFFIX"]
  , "name":
    { "type": "++"
    , "$1": [["test-c"], {"type": "var", "name": "TEST_NAME_SUFFIX"}]
    }
  , "test": ["test.sh"]
  , "deps": ["installed helloworld-c"]
  }
, "test-cpp":
  { "type": ["@", "rules", "shell/test", "script"]
  , "arguments_config": ["TEST_NAME_SUFFIX"]
  , "name":
    { "type": "++"
    , "$1": [["test-cpp"], {"type": "var", "name": "TEST_NAME_SUFFIX"}]
    }
  , "test": ["test.sh"]
  , "deps": ["installed helloworld-cpp"]
  }
, "config":
  { "type": "configure"
  , "arguments_config":
    [ "CONFIG_TARGET"
    , "ARCH"
    , "TOOLCHAIN_CONFIG"
    , "STATIC_FULL"
    , "STATIC_RUNLIBS"
    , "USE_LIBCXX"
    , "ENV"
    ]
  , "tainted": ["test"]
  , "target": {"type": "var", "name": "CONFIG_TARGET"}
  , "config":
    { "type": "let*"
    , "bindings":
      [ ["ARCH", {"type": "var", "name": "ARCH", "default": "x86_64"}]
      , [ "STATIC_RUNLIBS"
        , { "type": "if"
          , "cond": {"type": "var", "name": "STATIC_FULL"}
          , "then": true
          , "else": {"type": "var", "name": "STATIC_RUNLIBS"}
          }
        ]
      , [ "TOOLCHAIN_CONFIG"
        , { "type": "map_union"
          , "$1":
            [ { "type": "var"
              , "name": "TOOLCHAIN_CONFIG"
              , "default": {"type": "empty_map"}
              }
            , {"type": "env", "vars": ["STATIC_RUNLIBS", "USE_LIBCXX"]}
            ]
          }
        ]
      , [ "ADD_LDFLAGS"
        , { "type": "if"
          , "cond": {"type": "var", "name": "STATIC_FULL"}
          , "then": ["-static", "-s"]
          }
        ]
      , [ "TEST_NAME_SUFFIX"
        , { "type": "++"
          , "$1":
            [ { "type": "if"
              , "cond": {"type": "var", "name": "STATIC_FULL"}
              , "then": ["_static"]
              , "else":
                { "type": "if"
                , "cond": {"type": "var", "name": "STATIC_RUNLIBS"}
                , "then": ["_mixed"]
                , "else": ["_shared"]
                }
              }
            , { "type": "if"
              , "cond": {"type": "var", "name": "USE_LIBCXX"}
              , "then": ["-llvmlibs"]
              , "else": ["-gnulibs"]
              }
            ]
          }
        ]
      , ["TEST_ENV", {"type": "var", "name": "ENV"}]
      ]
    , "body":
      { "type": "env"
      , "vars":
        [ "ARCH"
        , "TOOLCHAIN_CONFIG"
        , "ADD_LDFLAGS"
        , "TEST_NAME_SUFFIX"
        , "TEST_ENV"
        ]
      }
    }
  }
, "test-c_shared-gnulibs":
  { "type": "export"
  , "flexible_config": ["ARCH", "TARGET_ARCH", "TOOLCHAIN_CONFIG", "ENV"]
  , "fixed_config":
    { "STATIC_FULL": false
    , "STATIC_RUNLIBS": false
    , "USE_LIBCXX": false
    , "CONFIG_TARGET": "test-c"
    }
  , "target": "config"
  }
, "test-cpp_shared-gnulibs":
  { "type": "export"
  , "flexible_config": ["ARCH", "TARGET_ARCH", "TOOLCHAIN_CONFIG", "ENV"]
  , "fixed_config":
    { "STATIC_FULL": false
    , "STATIC_RUNLIBS": false
    , "USE_LIBCXX": false
    , "CONFIG_TARGET": "test-cpp"
    }
  , "target": "config"
  }
, "test-cpp_shared-llvmlibs":
  { "type": "export"
  , "flexible_config": ["ARCH", "TARGET_ARCH", "TOOLCHAIN_CONFIG", "ENV"]
  , "fixed_config":
    { "STATIC_FULL": false
    , "STATIC_RUNLIBS": false
    , "USE_LIBCXX": true
    , "CONFIG_TARGET": "test-cpp"
    }
  , "target": "config"
  }
, "test-c_mixed-gnulibs":
  { "type": "export"
  , "flexible_config": ["ARCH", "TARGET_ARCH", "TOOLCHAIN_CONFIG", "ENV"]
  , "fixed_config":
    { "STATIC_FULL": false
    , "STATIC_RUNLIBS": true
    , "USE_LIBCXX": false
    , "CONFIG_TARGET": "test-c"
    }
  , "target": "config"
  }
, "test-cpp_mixed-gnulibs":
  { "type": "export"
  , "flexible_config": ["ARCH", "TARGET_ARCH", "TOOLCHAIN_CONFIG", "ENV"]
  , "fixed_config":
    { "STATIC_FULL": false
    , "STATIC_RUNLIBS": true
    , "USE_LIBCXX": false
    , "CONFIG_TARGET": "test-cpp"
    }
  , "target": "config"
  }
, "test-cpp_mixed-llvmlibs":
  { "type": "export"
  , "flexible_config": ["ARCH", "TARGET_ARCH", "TOOLCHAIN_CONFIG", "ENV"]
  , "fixed_config":
    { "STATIC_FULL": false
    , "STATIC_RUNLIBS": true
    , "USE_LIBCXX": true
    , "CONFIG_TARGET": "test-cpp"
    }
  , "target": "config"
  }
, "test-c_static-gnulibs":
  { "type": "export"
  , "flexible_config": ["ARCH", "TARGET_ARCH", "TOOLCHAIN_CONFIG", "ENV"]
  , "fixed_config":
    { "STATIC_FULL": true
    , "STATIC_RUNLIBS": true
    , "USE_LIBCXX": false
    , "CONFIG_TARGET": "test-c"
    }
  , "target": "config"
  }
, "test-cpp_static-gnulibs":
  { "type": "export"
  , "flexible_config": ["ARCH", "TARGET_ARCH", "TOOLCHAIN_CONFIG", "ENV"]
  , "fixed_config":
    { "STATIC_FULL": true
    , "STATIC_RUNLIBS": true
    , "USE_LIBCXX": false
    , "CONFIG_TARGET": "test-cpp"
    }
  , "target": "config"
  }
, "test-cpp_static-llvmlibs":
  { "type": "export"
  , "flexible_config": ["ARCH", "TARGET_ARCH", "TOOLCHAIN_CONFIG", "ENV"]
  , "fixed_config":
    { "STATIC_FULL": true
    , "STATIC_RUNLIBS": true
    , "USE_LIBCXX": true
    , "CONFIG_TARGET": "test-cpp"
    }
  , "target": "config"
  }
, "ALL":
  { "type": "install"
  , "arguments_config": ["SKIP_STATIC", "SKIP_SHARED", "HAVE_LIBCXX"]
  , "tainted": ["test"]
  , "deps":
    { "type": "++"
    , "$1":
      [ { "type": "if"
        , "cond": {"type": "var", "name": "SKIP_SHARED"}
        , "then": []
        , "else":
          [ "test-c_shared-gnulibs"
          , "test-cpp_shared-gnulibs"
          , "test-c_mixed-gnulibs"
          , "test-cpp_mixed-gnulibs"
          ]
        }
      , { "type": "if"
        , "cond": {"type": "var", "name": "SKIP_STATIC"}
        , "then": []
        , "else": ["test-c_static-gnulibs", "test-cpp_static-gnulibs"]
        }
      , { "type": "if"
        , "cond": {"type": "var", "name": "HAVE_LIBCXX"}
        , "then":
          { "type": "if"
          , "cond": {"type": "var", "name": "SKIP_SHARED"}
          , "then": []
          , "else": ["test-cpp_shared-llvmlibs", "test-cpp_mixed-llvmlibs"]
          }
        }
      , { "type": "if"
        , "cond": {"type": "var", "name": "HAVE_LIBCXX"}
        , "then":
          { "type": "if"
          , "cond": {"type": "var", "name": "SKIP_STATIC"}
          , "then": []
          , "else": ["test-cpp_static-llvmlibs"]
          }
        }
      ]
    }
  }
}