mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #19003 - servo:stylo_tests_windows, r=emilio
Make test-stylo compile an empty crate on Windows without Gecko That is, in cases where it would fail to link. This will help make Rust CI be gated on compiling Stylo: https://github.com/rust-lang/rust/pull/44603 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19003) <!-- Reviewable:end -->
This commit is contained in:
commit
38fe9533b9
3 changed files with 14 additions and 0 deletions
|
@ -146,6 +146,7 @@ windows-msvc-dev:
|
||||||
- mach.bat test-unit
|
- mach.bat test-unit
|
||||||
- mach.bat package --dev
|
- mach.bat package --dev
|
||||||
- mach.bat build-geckolib
|
- mach.bat build-geckolib
|
||||||
|
- mach.bat test-stylo
|
||||||
|
|
||||||
windows-msvc-nightly:
|
windows-msvc-nightly:
|
||||||
- mach.bat clean-nightlies --keep 3 --force
|
- mach.bat clean-nightlies --keep 3 --force
|
||||||
|
|
|
@ -63,4 +63,8 @@ fn main() {
|
||||||
.write_all(format!("include!(concat!({:?}, \"/gecko/structs.rs\"));",
|
.write_all(format!("include!(concat!({:?}, \"/gecko/structs.rs\"));",
|
||||||
style_out_dir).as_bytes())
|
style_out_dir).as_bytes())
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
if env::var_os("MOZ_SRC").is_some() {
|
||||||
|
println!("cargo:rustc-cfg=linking_with_gecko")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,15 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
// Disable this entire crate on Windows when Gecko symbols are not available
|
||||||
|
// as linking would fail:
|
||||||
|
// https://github.com/rust-lang/rust/pull/44603#issuecomment-338807312
|
||||||
|
//
|
||||||
|
// On Linux and OS X linking succeeds anyway.
|
||||||
|
// Presumably these symbol declarations don’t need to be resolved
|
||||||
|
// as they’re not used in any code called from this crate.
|
||||||
|
#![cfg(any(linking_with_gecko, not(windows)))]
|
||||||
|
|
||||||
extern crate atomic_refcell;
|
extern crate atomic_refcell;
|
||||||
extern crate cssparser;
|
extern crate cssparser;
|
||||||
extern crate env_logger;
|
extern crate env_logger;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue