mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
rust-analyzer breaks on Linux (when invoked without mach), because it tries to compile the c files, and doesn't find `mach_init.h` Since we don't need task_info on non-mac platforms, just make the crate empty on other platforms. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
13 lines
427 B
Rust
13 lines
427 B
Rust
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
|
|
fn main() {
|
|
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
|
|
|
|
if target_os == "macos" {
|
|
cc::Build::new()
|
|
.file("src/task_info.c")
|
|
.compile("libtask_info.a");
|
|
}
|
|
}
|