Compile fixes

This commit is contained in:
Sylvester Hesp 2022-09-06 17:11:19 +02:00 committed by Eduard-Mihai Burtescu
parent 45d38ca2d7
commit 0eb12ccf90
2 changed files with 6 additions and 5 deletions

View File

@ -190,7 +190,7 @@ impl ThinBufferMethods for SpirvThinBuffer {
struct SpirvCodegenBackend;
impl CodegenBackend for SpirvCodegenBackend {
fn target_features(&self, sess: &Session) -> Vec<Symbol> {
fn target_features(&self, sess: &Session, _allow_unstable: bool) -> Vec<Symbol> {
let cmdline = sess.opts.cg.target_feature.split(',');
let cfg = sess.target.options.features.split(',');
cfg.chain(cmdline)

View File

@ -6,9 +6,10 @@ use rustc_ast::CRATE_NODE_ID;
use rustc_codegen_spirv_types::{CompileResult, ModuleResult};
use rustc_codegen_ssa::back::lto::{LtoModuleCodegen, SerializedModule, ThinModule, ThinShared};
use rustc_codegen_ssa::back::write::CodegenContext;
use rustc_codegen_ssa::{CodegenResults, NativeLib, METADATA_FILENAME};
use rustc_codegen_ssa::{CodegenResults, NativeLib};
use rustc_data_structures::fx::FxHashSet;
use rustc_errors::FatalError;
use rustc_metadata::fs::METADATA_FILENAME;
use rustc_middle::bug;
use rustc_middle::dep_graph::WorkProduct;
use rustc_middle::middle::dependency_format::Linkage;
@ -32,7 +33,7 @@ pub fn link<'a>(
) {
let output_metadata = sess.opts.output_types.contains_key(&OutputType::Metadata);
for &crate_type in sess.crate_types().iter() {
if (sess.opts.debugging_opts.no_codegen || !sess.opts.output_types.should_codegen())
if (sess.opts.unstable_opts.no_codegen || !sess.opts.output_types.should_codegen())
&& !output_metadata
&& crate_type == CrateType::Executable
{
@ -353,11 +354,11 @@ fn link_local_crate_native_libs_and_dependent_crate_libs<'a>(
crate_type: CrateType,
codegen_results: &CodegenResults,
) {
if sess.opts.debugging_opts.link_native_libraries {
if sess.opts.unstable_opts.link_native_libraries {
add_local_native_libraries(sess, codegen_results);
}
add_upstream_rust_crates(sess, rlibs, codegen_results, crate_type);
if sess.opts.debugging_opts.link_native_libraries {
if sess.opts.unstable_opts.link_native_libraries {
add_upstream_native_libraries(sess, codegen_results, crate_type);
}
}