mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Make task_info as macos
specific (#32693)
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>
This commit is contained in:
parent
fb1c57da3e
commit
93fdb8263d
2 changed files with 9 additions and 6 deletions
|
@ -3,7 +3,11 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
fn main() {
|
||||
cc::Build::new()
|
||||
.file("src/task_info.c")
|
||||
.compile("libtask_info.a");
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue