diff --git a/gcc-test-backend/main b/gcc-test-backend/main deleted file mode 100755 index a509679155a..00000000000 Binary files a/gcc-test-backend/main and /dev/null differ diff --git a/src/back/write.rs b/src/back/write.rs index 37c9b975719..5201e494277 100644 --- a/src/back/write.rs +++ b/src/back/write.rs @@ -144,22 +144,13 @@ pub(crate) unsafe fn codegen(cgcx: &CodegenContext, _diag_han } if config.emit_asm { - unimplemented!(); - /*let _timer = cgcx + let _timer = cgcx .prof .generic_activity_with_arg("LLVM_module_codegen_emit_asm", &module.name[..]); let path = cgcx.output_filenames.temp_path(OutputType::Assembly, module_name); + context.compile_to_file(OutputKind::Assembler, path.to_str().expect("path to str")); - // We can't use the same module for asm and object code output, - // because that triggers various errors like invalid IR or broken - // binaries. So we must clone the module to produce the asm output - // if we are also producing object code. - let llmod = if let EmitObj::ObjectCode(_) = config.emit_obj { - llvm::LLVMCloneModule(llmod) - } else { - llmod - }; - with_codegen(tm, llmod, config.no_builtins, |cpm| { + /*with_codegen(tm, llmod, config.no_builtins, |cpm| { write_output_file(diag_handler, tm, cpm, llmod, &path, llvm::FileType::AssemblyFile) })?;*/ }