• Home
  • Raw
  • Download

Lines Matching +full:cross +full:- +full:spawn

3 //! will accept them, rather than hard-coding specific version support.
11 //! [build-dependencies]
16 //! example, to test for 128-bit integer support, it might look like:
33 //! If the type test succeeds, this will write a `cargo:rustc-cfg=has_i128` line
34 //! for Cargo, which translates to Rust arguments `--cfg has_i128`. Then in the
100 /// This looks like: `cargo:rustc-cfg=CFG`
102 /// Cargo will use this in arguments to rustc, like `--cfg CFG`.
105 /// so the compiler my generate an [`unexpected_cfgs` warning][check-cfg-flags].
108 /// [check-cfg-flags]: https://blog.rust-lang.org/2024/05/06/check-cfg.html
110 println!("cargo:rustc-cfg={}", cfg); in emit()
115 /// This looks like: `cargo:rerun-if-changed=PATH`
120 println!("cargo:rerun-if-changed={}", path); in rerun_path()
126 /// This looks like: `cargo:rerun-if-env-changed=VAR`
131 println!("cargo:rerun-if-env-changed={}", var); in rerun_env()
134 …tes to rustc that a config flag should not generate an [`unexpected_cfgs` warning][check-cfg-flags]
136 /// This looks like `cargo:rustc-check-cfg=cfg(VAR)`
138 /// As of rust 1.80, the compiler does [automatic checking of cfgs at compile time][check-cfg-flags…
146 /// If this is not desired, see [the blog post][check-cfg].
148 /// [check-cfg-flags]: https://blog.rust-lang.org/2024/05/06/check-cfg.html
150 println!("cargo:rustc-check-cfg=cfg({})", cfg); in emit_possibility()
158 pub fn new() -> AutoCfg { in new()
167 /// - `rustc` can't be executed, from `RUSTC` or in the `PATH`.
168 /// - The version output from `rustc` can't be parsed.
169 /// - `OUT_DIR` is not set in the environment, or is not a writable directory.
171 pub fn new() -> Result<Self, Error> { in new()
182 /// - `rustc` can't be executed, from `RUSTC` or in the `PATH`.
183 /// - The version output from `rustc` can't be parsed.
184 /// - `dir` is not a writable directory.
186 pub fn with_dir<T: Into<PathBuf>>(dir: T) -> Result<Self, Error> { in with_dir()
224 /// This is automatically detected during construction -- if an empty probe
233 /// like floating-point trigonometry and slice sorting.
237 /// [prelude]: https://doc.rust-lang.org/reference/names/preludes.html#the-no_std-attribute
238 pub fn no_std(&self) -> bool { in no_std()
251 pub fn probe_rustc_version(&self, major: usize, minor: usize) -> bool { in probe_rustc_version()
266 fn new_crate_name(&self) -> String { in new_crate_name()
274 fn probe_fmt<'a>(&self, source: Arguments<'a>) -> Result<(), Error> { in probe_fmt()
277 .arg("--crate-name") in probe_fmt()
279 .arg("--crate-type=lib") in probe_fmt()
280 .arg("--out-dir") in probe_fmt()
282 .arg("--emit=llvm-ir"); in probe_fmt()
285 command.arg("--target").arg(target); in probe_fmt()
290 command.arg("-").stdin(Stdio::piped()); in probe_fmt()
291 let mut child = try!(command.spawn().map_err(error::from_io)); in probe_fmt()
304 fn probe<'a>(&self, code: Arguments<'a>) -> bool { in probe()
317 /// The code is passed to the compiler exactly as-is, notably not even
334 /// Rust nightly features could be tested as well -- ideally including a
349 /// pub fn probe(slice: &[i32]) -> impl Iterator<Item = &[i32]> {
357 pub fn probe_raw(&self, code: &str) -> Result<(), Error> { in probe_raw()
368 pub fn probe_sysroot_crate(&self, name: &str) -> bool { in probe_sysroot_crate()
389 pub fn probe_path(&self, path: &str) -> bool { in probe_path()
395 /// Any non-identifier characters in the `path` will be replaced with
416 pub fn probe_trait(&self, name: &str) -> bool { in probe_trait()
422 /// Any non-identifier characters in the trait `name` will be replaced with
443 pub fn probe_type(&self, name: &str) -> bool { in probe_type()
449 /// Any non-identifier characters in the type `name` will be replaced with
470 pub fn probe_expression(&self, expr: &str) -> bool { in probe_expression()
489 pub fn probe_constant(&self, expr: &str) -> bool { in probe_constant()
502 fn mangle(s: &str) -> String { in mangle()
515 ) -> bool { in dir_contains_target()
533 fn rustflags(target: &Option<OsString>, dir: &Path) -> Vec<String> { in rustflags()
534 // Starting with rust-lang/cargo#9601, shipped in Rust 1.55, Cargo always sets in rustflags()
551 // cross-compilation environment. Sadly, we don't have a way to detect in rustflags()
552 // when we're building HOST artifact in a cross-compilation environment, in rustflags()
553 // so for now we only apply RUSTFLAGS when cross-compiling an artifact. in rustflags()
555 // See https://github.com/cuviper/autocfg/pull/10#issuecomment-527575030. in rustflags()
561 …://github.com/rust-lang/cargo/blob/69aea5b6f69add7c51cca939a79644080c0b0ba0/src/cargo/core/compile… in rustflags()
577 fn new_uuid() -> u64 { in new_uuid()
584 // Feed the `HashSet`-shuffled order into FNV-1a. in new_uuid()