about summary refs log tree commit diff
path: root/src/bootstrap/config.rs
diff options
context:
space:
mode:
authorJoshua Nelson <github@jyn.dev>2022-12-22 10:34:27 -0600
committerJoshua Nelson <github@jyn.dev>2022-12-22 11:50:19 -0600
commit0b3ffcbb0beed7bc0be168dadbff2904b85d3666 (patch)
tree2350830f9698879dcc529bc2df67ad5f0342c187 /src/bootstrap/config.rs
parent2d76a9df5d040e8dfcb23e01fc3847c628d833e4 (diff)
downloadrust-0b3ffcbb0beed7bc0be168dadbff2904b85d3666.tar.gz
rust-0b3ffcbb0beed7bc0be168dadbff2904b85d3666.zip
Allow building std with cranelift
- Don't pass llvm-specific args when using cranelift
- Don't use `asm` in compiler_builtins when using cranelift
Diffstat (limited to 'src/bootstrap/config.rs')
-rw-r--r--src/bootstrap/config.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index 960fbdf7538..41c8f17ee15 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -1610,6 +1610,10 @@ impl Config {
         self.submodules.unwrap_or(rust_info.is_managed_git_subrepository())
     }
 
+    pub fn default_codegen_backend(&self) -> Option<Interned<String>> {
+        self.rust_codegen_backends.get(0).cloned()
+    }
+
     /// Returns the commit to download, or `None` if we shouldn't download CI artifacts.
     fn download_ci_rustc_commit(&self, download_rustc: Option<StringOrBool>) -> Option<String> {
         // If `download-rustc` is not set, default to rebuilding.