Skip to content

Commit 3abdc55

Browse files
committed
servo: Merge #6220 - Switch task_info to use modern Cargo tools (from metajack:task-info-build-cleanup); r=nox
This is the first bit of build cleanup on my quest to make Cargo faster. Source-Repo: https://github.com/servo/servo Source-Revision: e6c4ca4960cc9f6ac9bd17c35a10b78350b70c73 UltraBlame original commit: 2334f5500d2f4d6245ad641c1da4f0c48bf0ef02
1 parent 11ee1ff commit 3abdc55

File tree

9 files changed

+22
-64
lines changed

9 files changed

+22
-64
lines changed

servo/components/profile/Cargo.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ path = "lib.rs"
1010
[dependencies.profile_traits]
1111
path = "../profile_traits"
1212

13-
[dependencies.task_info]
14-
path = "../../support/rust-task_info"
15-
1613
[dependencies.util]
1714
path = "../util"
1815

1916
[dependencies]
2017
libc = "*"
2118
regex = "0.1.14"
2219
time = "0.1.12"
20+
21+
[target.x86_64-apple-darwin.dependencies.task_info]
22+
path = "../../support/rust-task_info"
23+
24+
[target.i686-apple-darwin.dependencies.task_info]
25+
path = "../../support/rust-task_info"

servo/components/servo/Cargo.lock

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

servo/ports/cef/Cargo.lock

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

servo/ports/gonk/Cargo.lock

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

servo/support/rust-task_info/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ version = "0.0.1"
55
authors = ["The Servo Project Developers"]
66

77
build = "build.rs"
8+
9+
[build-dependencies]
10+
gcc = "0.3.4"

servo/support/rust-task_info/Makefile.in

Lines changed: 0 additions & 32 deletions
This file was deleted.

servo/support/rust-task_info/build.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@
22

33

44

5-
use std::process::Command;
6-
use std::env;
5+
extern crate gcc;
76

87
fn main() {
9-
assert!(Command::new("make")
10-
.args(&["-f", "makefile.cargo"])
11-
.status()
12-
.unwrap()
13-
.success());
14-
println!("cargo:rustc-flags=-L native={}", env::var("OUT_DIR").unwrap());
8+
let mut cfg = gcc::Config::new();
9+
cfg.file("src/task_info.c");
10+
cfg.compile("libtask_info.a");
1511
}

servo/support/rust-task_info/makefile.cargo

Lines changed: 0 additions & 20 deletions
This file was deleted.

servo/support/rust-task_info/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@
1414

1515
extern crate libc;
1616

17-
#[cfg(target_os="macos")]
1817
pub mod task_basic_info;
1918

0 commit comments

Comments
 (0)