MCPcopy Create free account
hub / github.com/Rust-GPU/rust-gpu / test_rustc_flags

Method test_rustc_flags

tests/src/main.rs:97–126  ·  view source on GitHub ↗

RUSTFLAGS passed to all test files.

(
            codegen_backend_path: &Path,
            deps: &TestDeps,
            indirect_deps_dirs: &[&Path],
        )

Source from the content-addressed store, hash-verified

95 fn run_mode(&self, mode: &'static str) {
96 /// RUSTFLAGS passed to all test files.
97 fn test_rustc_flags(
98 codegen_backend_path: &Path,
99 deps: &TestDeps,
100 indirect_deps_dirs: &[&Path],
101 ) -> String {
102 [
103 &*rust_flags(codegen_backend_path),
104 &*indirect_deps_dirs
105 .iter()
106 .map(|dir| format!("-L dependency={}", dir.display()))
107 .fold(String::new(), |a, b| b + " " + &a),
108 "--edition 2021",
109 &*format!("--extern noprelude:core={}", deps.core.display()),
110 &*format!(
111 "--extern noprelude:compiler_builtins={}",
112 deps.compiler_builtins.display()
113 ),
114 &*format!(
115 "--extern spirv_std_macros={}",
116 deps.spirv_std_macros.display()
117 ),
118 &*format!("--extern spirv_std={}", deps.spirv_std.display()),
119 &*format!("--extern glam={}", deps.glam.display()),
120 "--crate-type dylib",
121 "-Zunstable-options",
122 "-Zcrate-attr=no_std",
123 "-Zcrate-attr=feature(asm_const,asm_experimental_arch)",
124 ]
125 .join(" ")
126 }
127
128 struct Variation {
129 name: &'static str,

Callers

nothing calls this directly

Calls 2

rust_flagsFunction · 0.85
iterMethod · 0.80

Tested by

no test coverage detected