Skip to content

Commit 89cfa3a

Browse files
committed
servo: Merge #19003 - Make test-stylo compile an empty crate on Windows without Gecko (from servo:stylo_tests_windows); r=emilio
That is, in cases where it would fail to link. This will help make Rust CI be gated on compiling Stylo: rust-lang/rust#44603 Source-Repo: https://github.com/servo/servo Source-Revision: 38fe9533b93e985657f99a29772bf3d3c8694822 UltraBlame original commit: 6d6d75c9f64f65ecf8c71983a29f036d477c6ed6
1 parent bb6dc0e commit 89cfa3a

File tree

3 files changed

+135
-0
lines changed

3 files changed

+135
-0
lines changed

servo/etc/ci/buildbot_steps.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2254,6 +2254,13 @@ bat
22542254
build
22552255
-
22562256
geckolib
2257+
-
2258+
mach
2259+
.
2260+
bat
2261+
test
2262+
-
2263+
stylo
22572264
windows
22582265
-
22592266
msvc

servo/tests/unit/stylo/build.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,4 +729,33 @@ unwrap
729729
(
730730
)
731731
;
732+
if
733+
env
734+
:
735+
:
736+
var_os
737+
(
738+
"
739+
MOZ_SRC
740+
"
741+
)
742+
.
743+
is_some
744+
(
745+
)
746+
{
747+
println
748+
!
749+
(
750+
"
751+
cargo
752+
:
753+
rustc
754+
-
755+
cfg
756+
=
757+
linking_with_gecko
758+
"
759+
)
760+
}
732761
}

servo/tests/unit/stylo/lib.rs

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,105 @@ MPL
5656
.
5757
*
5858
/
59+
/
60+
/
61+
Disable
62+
this
63+
entire
64+
crate
65+
on
66+
Windows
67+
when
68+
Gecko
69+
symbols
70+
are
71+
not
72+
available
73+
/
74+
/
75+
as
76+
linking
77+
would
78+
fail
79+
:
80+
/
81+
/
82+
https
83+
:
84+
/
85+
/
86+
github
87+
.
88+
com
89+
/
90+
rust
91+
-
92+
lang
93+
/
94+
rust
95+
/
96+
pull
97+
/
98+
44603
99+
#
100+
issuecomment
101+
-
102+
338807312
103+
/
104+
/
105+
/
106+
/
107+
On
108+
Linux
109+
and
110+
OS
111+
X
112+
linking
113+
succeeds
114+
anyway
115+
.
116+
/
117+
/
118+
Presumably
119+
these
120+
symbol
121+
declarations
122+
don
123+
t
124+
need
125+
to
126+
be
127+
resolved
128+
/
129+
/
130+
as
131+
they
132+
re
133+
not
134+
used
135+
in
136+
any
137+
code
138+
called
139+
from
140+
this
141+
crate
142+
.
143+
#
144+
!
145+
[
146+
cfg
147+
(
148+
any
149+
(
150+
linking_with_gecko
151+
not
152+
(
153+
windows
154+
)
155+
)
156+
)
157+
]
59158
extern
60159
crate
61160
atomic_refcell

0 commit comments

Comments
 (0)