Skip to content
This repository was archived by the owner on Nov 21, 2018. It is now read-only.

Commit a6c572e

Browse files
committed
Reorganize cross builders
* Have one giant array for everything. * Make each entry a dictionary describing where it's run * Add a new bot for running 32-bit linux cross targets
1 parent 51187ee commit a6c572e

File tree

1 file changed

+93
-127
lines changed

1 file changed

+93
-127
lines changed

master/master.cfg

Lines changed: 93 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ auto_platforms = [
114114
"mac-64-nopt-t",
115115
#"mac-64-opt-vg",
116116
#"mac-all-opt",
117-
"mac-ios-opt",
117+
"mac-cross-ios-opt",
118118
"mac-64-opt-rustbuild",
119119

120120
"linux-32-opt",
@@ -126,17 +126,18 @@ auto_platforms = [
126126
"linux-64-debug-opt",
127127
"linux-musl-64-opt",
128128
"linux-cross-opt",
129+
"linux-32cross-opt",
129130
"linux-64-opt-rustbuild",
130131
"linux-64-opt-mir",
131132

132133
#"linux-64-opt-vg",
133134
#"linux-all-opt",
134135

135136
"linux-64-x-android-t",
136-
"linux-64-x-netbsd",
137-
"linux-64-x-freebsd",
138-
"linux-64-x-armsf",
139-
"linux-64-x-armhf",
137+
"linux-64-cross-netbsd",
138+
"linux-64-cross-freebsd",
139+
"linux-64-cross-armsf",
140+
"linux-64-cross-armhf",
140141

141142
"win-gnu-32-opt",
142143
#"win-gnu-32-nopt-c",
@@ -170,6 +171,7 @@ snap_platforms = ["linux", "win-gnu-32", "win-gnu-64", "mac", "bitrig-64",
170171
"openbsd-64-opt"]
171172
dist_platforms = ["linux", "mac", "arm-android", "musl-linux",
172173
"cross-linux",
174+
"cross32-linux",
173175
"cross-host-linux",
174176
"mac-ios",
175177
"win-gnu-32", "win-gnu-64",
@@ -212,17 +214,6 @@ dist_nogate_platforms = [
212214
"cross-win",
213215
]
214216

215-
nightly_cross_host_targets = []
216-
beta_cross_host_targets = [
217-
{'target': 'arm-unknown-linux-gnueabi', 'builder': 'armsf'},
218-
{'target': 'arm-unknown-linux-gnueabihf', 'builder': 'armhf'},
219-
{'target': 'aarch64-unknown-linux-gnu', 'builder': None},
220-
{'target': 'armv7-unknown-linux-gnueabihf', 'builder': None},
221-
{'target': 'x86_64-unknown-freebsd', 'builder': 'freebsd'},
222-
{'target': 'x86_64-unknown-netbsd', 'builder': 'netbsd'},
223-
]
224-
stable_cross_host_targets = []
225-
226217
cargo_cross_targets = [
227218
'arm-unknown-linux-gnueabi',
228219
'arm-unknown-linux-gnueabihf',
@@ -232,47 +223,48 @@ cargo_cross_targets = [
232223
'x86_64-unknown-netbsd',
233224
]
234225

235-
nightly_lincross_targets = [
236-
#'i586-unknown-linux-gnu',
237-
]
238-
beta_lincross_targets = [
239-
'mips-unknown-linux-musl',
240-
'mipsel-unknown-linux-musl',
241-
]
242-
stable_lincross_targets = [
243-
'armv7-unknown-linux-gnueabihf',
244-
'powerpc-unknown-linux-gnu',
245-
'powerpc64-unknown-linux-gnu',
246-
'powerpc64le-unknown-linux-gnu',
247-
'x86_64-rumprun-netbsd',
248-
'arm-unknown-linux-gnueabi',
249-
'arm-unknown-linux-gnueabihf',
250-
'mips-unknown-linux-gnu',
251-
'mipsel-unknown-linux-gnu',
252-
'aarch64-unknown-linux-gnu',
253-
]
254-
nightly_wincross_targets = [
226+
ios = {'auto': 'cross-ios-opt', 'dist': 'cross-ios-opt'}
227+
lincross = {'auto': 'linux-cross', 'dist': 'cross-linux'}
228+
lincross32 = {'auto': 'linux-32cross', 'dist': 'cross32-linux'}
229+
msvc32 = {'auto': 'msvc-32-cross', 'dist': 'win-msvc-32-cross'}
230+
231+
def xhost(name):
232+
return {'auto': 'linux-64-cross-' + name, 'dist': 'cross-host-linux'}
233+
234+
stable_cross_targets = [
235+
{'t': 'aarch64-apple-ios', 'b': ios},
236+
{'t': 'aarch64-unknown-linux-gnu', 'b': lincross},
237+
{'t': 'arm-unknown-linux-gnueabi', 'b': lincross},
238+
{'t': 'arm-unknown-linux-gnueabihf', 'b': lincross},
239+
{'t': 'armv7-apple-ios', 'b': ios},
240+
{'t': 'armv7-unknown-linux-gnueabihf', 'b': lincross},
241+
{'t': 'armv7s-apple-ios', 'b': ios},
242+
{'t': 'i386-apple-ios', 'b': ios},
243+
{'t': 'mips-unknown-linux-gnu', 'b': lincross},
244+
{'t': 'mipsel-unknown-linux-gnu', 'b': lincross},
245+
{'t': 'powerpc-unknown-linux-gnu', 'b': lincross},
246+
{'t': 'powerpc64-unknown-linux-gnu', 'b': lincross},
247+
{'t': 'powerpc64le-unknown-linux-gnu', 'b': lincross},
248+
{'t': 'x86_64-apple-ios', 'b': ios},
249+
{'t': 'x86_64-rumprun-netbsd', 'b': lincross},
255250
]
256-
beta_wincross_targets = [
257-
'i586-pc-windows-msvc',
251+
beta_cross_targets = stable_cross_targets + [
252+
{'t': 'aarch64-unknown-linux-gnu', 'b': xhost('NOAUTO'), 'host': True},
253+
{'t': 'arm-unknown-linux-gnueabi', 'b': xhost('armsf'), 'host': True},
254+
{'t': 'arm-unknown-linux-gnueabihf', 'b': xhost('armhf'), 'host': True},
255+
{'t': 'armv7-unknown-linux-gnueabihf', 'b': xhost('NOAUTO'), 'host': True},
256+
{'t': 'i586-pc-windows-msvc', 'b': msvc32},
257+
{'t': 'i686-unknown-freebsd', 'b': xhost('NOAUTO'), 'host': True},
258+
{'t': 'mips-unknown-linux-musl', 'b': lincross},
259+
{'t': 'mipsel-unknown-linux-musl', 'b': lincross},
260+
{'t': 'x86_64-unknown-freebsd', 'b': xhost('freebsd'), 'host': True},
261+
{'t': 'x86_64-unknown-netbsd', 'b': xhost('netbsd'), 'host': True},
258262
]
259-
stable_wincross_targets = []
260-
261-
ios_targets = [
262-
'aarch64-apple-ios',
263-
'armv7-apple-ios',
264-
'armv7s-apple-ios',
265-
'i386-apple-ios',
266-
'x86_64-apple-ios',
263+
nightly_cross_targets = beta_cross_targets + [
264+
{'t': 'i586-unknown-linux-gnu', 'b': lincross32},
265+
{'t': 'i686-unknown-linux-musl', 'b': lincross32},
267266
]
268267

269-
all_lincross_targets = nightly_lincross_targets + beta_lincross_targets + \
270-
stable_lincross_targets
271-
all_wincross_targets = nightly_wincross_targets + beta_wincross_targets + \
272-
stable_wincross_targets
273-
all_cross_host_targets = nightly_cross_host_targets + beta_cross_host_targets + \
274-
stable_cross_host_targets
275-
276268
####### BUILDSLAVES
277269

278270
# Configuration of --host and --target triples based on the above platform names
@@ -1270,7 +1262,7 @@ def distsnap_buildfactory(platform, channel_label):
12701262
command.append("check-stage2-T-x86_64-unknown-linux-musl-" + \
12711263
"H-x86_64-unknown-linux-gnu")
12721264
command.append('dist')
1273-
elif 'cross' in platform or 'ios' in platform:
1265+
elif 'cross' in platform:
12741266
command.append('dist')
12751267
else:
12761268
command.append('distcheck')
@@ -1520,17 +1512,14 @@ def packaging_dist_buildfactory(platform, channel_label):
15201512
hosts = all_platform_hosts(platform)
15211513
if platform == 'linux':
15221514
if channel_label == 'stable':
1523-
hosts += [h['target'] for h in stable_cross_host_targets]
1515+
extra_hosts = stable_cross_targets
15241516
elif channel_label == 'beta':
1525-
hosts += [h['target'] for h in stable_cross_host_targets]
1526-
hosts += [h['target'] for h in beta_cross_host_targets]
1517+
extra_hosts = beta_cross_targets
15271518
else:
1528-
hosts += [h['target'] for h in stable_cross_host_targets]
1529-
hosts += [h['target'] for h in beta_cross_host_targets]
1530-
hosts += [h['target'] for h in nightly_cross_host_targets]
1519+
extra_hosts = nightly_cross_targets
1520+
hosts += [t['t'] for t in extra_hosts if 'host' in t]
15311521

15321522
for target in hosts:
1533-
15341523
f.addStep(Compile(env=CommandEnv(),
15351524
name="fetch inputs",
15361525
description="fetch input",
@@ -1607,12 +1596,12 @@ def platform_slaves(p):
16071596
if "-x-android" in p:
16081597
return [p]
16091598

1610-
if "musl" in p:
1599+
if "musl" in p or "32cross" in p or "cross32" in p:
16111600
p = "linux"
1612-
elif "linux-cross" in p or "linux-64-x-" in p:
1613-
p = "lincross"
16141601
elif "ios" in p:
16151602
return [slave.slavename for slave in ios_slaves]
1603+
elif "linux" in p and "cross" in p:
1604+
p = "lincross"
16161605
else:
16171606
p = p.split("-")[0]
16181607
return [slave.slavename
@@ -1628,7 +1617,7 @@ def platform_snap_slaves(p):
16281617
# FIXME: The linux AMI instances are using valgrind 3.7 and we need 3.8+
16291618
# This rule limits which bots we run the valgrinding dist snapshot on.
16301619
def platform_dist_slaves(p):
1631-
if 'musl' in p or 'cross-linux' in p or 'ios' in p:
1620+
if 'musl' in p or 'cross' in p or 'ios' in p:
16321621
return platform_slaves(p)
16331622

16341623
# p is exactly the platform name, ie arm-android
@@ -1696,15 +1685,9 @@ for p in auto_platforms:
16961685
chk = "check-stage2-T-x86_64-unknown-linux-musl-H-x86_64-unknown-linux-gnu"
16971686
musl = "/musl-x86_64"
16981687
targets.append('x86_64-unknown-linux-musl')
1699-
if "linux-cross" in p:
1700-
chk = False
1701-
targets += all_lincross_targets
1702-
if "win-msvc-32-cross" in p:
1688+
if "cross" in p:
17031689
chk = False
1704-
targets += all_wincross_targets
1705-
if "ios" in p:
1706-
chk = False
1707-
targets += ios_targets
1690+
musl = "/musl-i686"
17081691
if not opt_compiler:
17091692
chk = False
17101693
if "rustbuild" in p:
@@ -1715,6 +1698,14 @@ for p in auto_platforms:
17151698
chk = "check-cargotest"
17161699
rustbuild = True
17171700

1701+
for t in nightly_cross_targets:
1702+
if t['b']['auto'] in p:
1703+
if 'host' in t:
1704+
hosts.append(t['t'])
1705+
rustbuild = True
1706+
else:
1707+
targets.append(t['t'])
1708+
17181709
android = False
17191710
if "-x-android" in p:
17201711
targets.append('arm-linux-androideabi')
@@ -1725,13 +1716,6 @@ for p in auto_platforms:
17251716
# Only test android, not the host
17261717
chk = "check-stage2-T-arm-linux-androideabi-H-x86_64-unknown-linux-gnu"
17271718

1728-
elif "linux-64-x-" in p:
1729-
chk = False
1730-
for target in all_cross_host_targets:
1731-
if target['builder'] and target['builder'] in p:
1732-
hosts.append(target['target'])
1733-
rustbuild = True
1734-
17351719
c['builders'].append(BuilderConfig(
17361720
mergeRequests=True,
17371721
name="auto-" + p,
@@ -1780,69 +1764,51 @@ for p in dist_platforms:
17801764
if "android" in p:
17811765
android = True
17821766
# Not checking android for now
1783-
hosts = ""
1767+
hosts = []
17841768
targets.append('arm-linux-androideabi')
17851769
elif "musl" in p:
17861770
musl = "/musl-x86_64"
1787-
hosts = ""
1771+
hosts = []
17881772
targets.append('x86_64-unknown-linux-musl')
1789-
elif "cross-linux" in p:
1790-
hosts = ""
1791-
if "ios" in p:
1792-
hosts = ""
1793-
targets += ios_targets
1773+
elif "cross32-linux" in p:
1774+
musl = "/musl-i686"
1775+
if "ios" in p or "cross" in p:
1776+
hosts = []
17941777

17951778
for channel in ['nightly', 'beta', 'stable']:
17961779
my_targets = targets[:]
17971780
my_hosts = hosts
17981781
rustbuild = None
17991782

1800-
my_lincross_targets = []
1801-
my_wincross_targets = []
1802-
my_cross_host_targets = []
18031783
if channel == 'stable':
1804-
my_lincross_targets += stable_lincross_targets
1805-
my_wincross_targets += stable_wincross_targets
1806-
my_cross_host_targets += [h['target'] for h in stable_cross_host_targets]
1784+
my_cross_targets = stable_cross_targets
18071785
elif channel == 'beta':
1808-
my_lincross_targets += stable_lincross_targets
1809-
my_lincross_targets += beta_lincross_targets
1810-
my_wincross_targets += stable_wincross_targets
1811-
my_wincross_targets += beta_wincross_targets
1812-
my_cross_host_targets += [h['target'] for h in stable_cross_host_targets]
1813-
my_cross_host_targets += [h['target'] for h in beta_cross_host_targets]
1786+
my_cross_targets = beta_cross_targets
18141787
elif channel == 'nightly':
1815-
my_lincross_targets += stable_lincross_targets
1816-
my_lincross_targets += beta_lincross_targets
1817-
my_lincross_targets += nightly_lincross_targets
1818-
my_wincross_targets += stable_wincross_targets
1819-
my_wincross_targets += beta_wincross_targets
1820-
my_wincross_targets += nightly_wincross_targets
1821-
my_cross_host_targets += [h['target'] for h in stable_cross_host_targets]
1822-
my_cross_host_targets += [h['target'] for h in beta_cross_host_targets]
1823-
my_cross_host_targets += [h['target'] for h in nightly_cross_host_targets]
1824-
1825-
# The `cross-linux` builder below is intended for just producing
1826-
# standard libraries, whereas the `cross-host-linux` is producing entire
1788+
my_cross_targets = nightly_cross_targets
1789+
1790+
for t in my_cross_targets:
1791+
if not t['b']['dist'] in p:
1792+
continue
1793+
if 'host' in p:
1794+
rustbuild = True
1795+
my_hosts.append(t['t'])
1796+
else:
1797+
my_targets.append(t['t'])
1798+
1799+
# The `cross-linux` builder is intended for just producing standard
1800+
# libraries, whereas the `cross-host-linux` is producing entire
18271801
# compilers. Ideally these would use the same bot but unfortunately they
18281802
# use different build systems, so they need to be separate for now.
18291803
#
1830-
# In any case, if we're producing an entire compiler for a target, or
1831-
# rather something in `my_cross_host_targets`, then we don't want to
1832-
# *also* produce a standard library for that target on another bot as
1833-
# it'll cause upload failures later. Consequently we just filter our the
1834-
# list of `my_lincross_targets` to exclude everything we're building a
1835-
# compiler for.
1836-
my_lincross_targets = [t for t in my_lincross_targets \
1837-
if t not in my_cross_host_targets]
1838-
1839-
if "cross-linux" in p:
1840-
my_targets += my_lincross_targets
1841-
if "win-msvc-32-cross" in p:
1842-
my_targets += my_wincross_targets
1843-
if "cross-host-linux" in p:
1844-
rustbuild = True
1845-
my_hosts = my_cross_host_targets
1804+
# In any case, if we're producing an entire compiler for a target then
1805+
# we don't want to *also* produce a standard library for that target on
1806+
# another bot as it'll cause upload failures later. Consequently we just
1807+
# filter our the list of `my_targets` to exclude everything we're
1808+
# building a compiler for.
1809+
for t in my_cross_targets:
1810+
if 'host' in t and t['t'] in my_targets:
1811+
my_targets.remove(t['t'])
18461812

18471813
branch = 'master' if channel == 'nightly' else channel
18481814
c['builders'].append(BuilderConfig(

0 commit comments

Comments
 (0)