feat: fix build error on apple m1

This commit is contained in:
zhengrenzhe 2021-04-24 18:00:55 +08:00
parent 3cd1121a7d
commit 7aca943d5b
3 changed files with 25 additions and 20 deletions

View file

@ -45,5 +45,5 @@ webrender_api = { git = "https://github.com/servo/webrender" }
webrender_traits = { path = "../webrender_traits" }
webxr-api = { git = "https://github.com/servo/webxr", features = ["ipc"] }
[target.'cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os="android"), not(target_arch="arm"), not(target_arch="aarch64")))'.dependencies]
[target.'cfg(any(target_os="macos", all(not(target_os = "windows"), not(target_os = "ios"), not(target_os="android"), not(target_arch="arm"), not(target_arch="aarch64"))))'.dependencies]
gaol = "0.2.1"

View file

@ -4,12 +4,15 @@
use crate::pipeline::UnprivilegedPipelineContent;
use crate::serviceworker::ServiceWorkerUnprivilegedContent;
#[cfg(all(
not(target_os = "windows"),
not(target_os = "ios"),
not(target_os = "android"),
not(target_arch = "arm"),
not(target_arch = "aarch64")
#[cfg(any(
target_os = "macos",
all(
not(target_os = "windows"),
not(target_os = "ios"),
not(target_os = "android"),
not(target_arch = "arm"),
not(target_arch = "aarch64")
)
))]
use gaol::profile::{Operation, PathPattern, Profile};
use ipc_channel::Error;
@ -120,7 +123,9 @@ pub fn content_process_sandbox_profile() -> Profile {
target_os = "ios",
target_os = "android",
target_arch = "arm",
target_arch = "aarch64",
// exclude apple arm devices
all(target_arch = "aarch64", not(target_os = "macos"))
))]
pub fn content_process_sandbox_profile() {
error!("Sandboxed multiprocess is not supported on this platform.");