| 1 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::envrust-analyzer cargo std https://github.com/rust-lang/rust/library/std env/; |
| 2 | |
| 3 | fn mainrust-analyzer cargo seccomp-sys 0.1.3 main().() { |
| 4 | let rustc_link_type = match envrust-analyzer cargo std https://github.com/rust-lang/rust/library/std env/::varrust-analyzer cargo std https://github.com/rust-lang/rust/library/std env/var().("LIBSECCOMP_LIB_TYPE") { |
| 5 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(mode) => mode, // static, framework, dylib |
| 6 | Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(_) => Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#::fromrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`From<&str>`]from().("dylib") |
| 7 | }; |
| 8 | |
| 9 | printlnrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/println!!( |
| 10 | "cargo:rustc-link-lib={}={}", |
| 11 | rustc_link_type, |
| 12 | "seccomp" |
| 13 | ); |
| 14 | |
| 15 | match envrust-analyzer cargo std https://github.com/rust-lang/rust/library/std env/::varrust-analyzer cargo std https://github.com/rust-lang/rust/library/std env/var().("LIBSECCOMP_LIB_PATH") { |
| 16 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(rustc_link_search) => |
| 17 | printlnrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/println!!("cargo:rustc-link-search=native={}", rustc_link_search), |
| 18 | Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(_) => {} |
| 19 | }; |
| 20 | } |