Skip to content

Commit 31ec28a

Browse files
committed
Move configurations under all to enable os based configurations
1 parent 4986278 commit 31ec28a

File tree

2 files changed

+51
-49
lines changed

2 files changed

+51
-49
lines changed

repo_gen/generate_repo.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def create_latest(row, dir):
152152

153153
settings = ""
154154
configs = []
155-
for config_item in row["configurations"]:
155+
for config_item in row["configurations"]["all"]:
156156
config = config_item["name"]
157157
config_name = f"{name}-{config}-latest"
158158
configs.append(config_name)
@@ -175,7 +175,7 @@ def create_latest_with_configurations(row, dir):
175175
default_config = row["default-configuration"]
176176

177177
settings = ""
178-
for config_item in row["configurations"]:
178+
for config_item in row["configurations"]["all"]:
179179
config = config_item["name"]
180180
config_name = f"{name}-{config}-latest"
181181
if config == default_config:
@@ -200,7 +200,7 @@ def create_version(row):
200200
version = version_item["version"]
201201
if "configurations" in row:
202202
configs = []
203-
for config_item in row["configurations"]:
203+
for config_item in row["configurations"]["all"]:
204204
config = config_item["name"]
205205
config_name = f"{name}-{config}-{version}"
206206
configs.append(config_name)
@@ -234,7 +234,7 @@ def create_version_with_configurations(row, dir):
234234
for version_item in row["versions"]:
235235
version = version_item["version"]
236236
default_config = row["default-configuration"]
237-
for config_item in row["configurations"]:
237+
for config_item in row["configurations"]["all"]:
238238
config = config_item["name"]
239239
config_name = f"{name}-{config}-{version}"
240240
if config == default_config:
@@ -258,7 +258,7 @@ def create_version_configs(row):
258258

259259
name = row["name"]
260260
settings = ""
261-
for config_item in row["configurations"]:
261+
for config_item in row["configurations"]["all"]:
262262
config = config_item["name"]
263263
versions = create_single_label(f":{name}-{config}-latest", 8)
264264
for version_item in row["versions"]:
@@ -419,7 +419,7 @@ def create_configuration_args(row):
419419
action_to_args = {}
420420

421421
name = row["name"]
422-
for config_item in row["configurations"]:
422+
for config_item in row["configurations"]["all"]:
423423
config = config_item["name"]
424424
for action_item in config_item["actions"]:
425425
action = action_item["name"]

repo_gen/runtimes.json

Lines changed: 45 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -20,48 +20,50 @@
2020
}
2121
],
2222
"default-configuration": "shared",
23-
"configurations": [
24-
{
25-
"name": "shared",
26-
"actions": [
27-
{
28-
"name": "link_actions",
29-
"args": [
30-
"-L{lib}",
31-
"-fuse-ld=lld",
32-
"-lc"
33-
]
34-
},
35-
{
36-
"name": "link_executable_actions",
37-
"args": [
38-
"{lib}/crt1.o",
39-
"{lib}/crti.o",
40-
"{lib}/crtn.o"
41-
]
42-
}
43-
]
44-
},
45-
{
46-
"name": "static",
47-
"actions": [
48-
{
49-
"name": "link_actions",
50-
"args": [
51-
"-fuse-ld=lld",
52-
"{lib}/libc.a"
53-
]
54-
},
55-
{
56-
"name": "link_executable_actions",
57-
"args": [
58-
"{lib}/crt1.o",
59-
"{lib}/crti.o",
60-
"{lib}/crtn.o"
61-
]
62-
}
63-
]
64-
}
65-
]
23+
"configurations": {
24+
"all": [
25+
{
26+
"name": "shared",
27+
"actions": [
28+
{
29+
"name": "link_actions",
30+
"args": [
31+
"-L{lib}",
32+
"-fuse-ld=lld",
33+
"-lc"
34+
]
35+
},
36+
{
37+
"name": "link_executable_actions",
38+
"args": [
39+
"{lib}/crt1.o",
40+
"{lib}/crti.o",
41+
"{lib}/crtn.o"
42+
]
43+
}
44+
]
45+
},
46+
{
47+
"name": "static",
48+
"actions": [
49+
{
50+
"name": "link_actions",
51+
"args": [
52+
"-fuse-ld=lld",
53+
"{lib}/libc.a"
54+
]
55+
},
56+
{
57+
"name": "link_executable_actions",
58+
"args": [
59+
"{lib}/crt1.o",
60+
"{lib}/crti.o",
61+
"{lib}/crtn.o"
62+
]
63+
}
64+
]
65+
}
66+
]
67+
}
6668
}
6769
]

0 commit comments

Comments
 (0)