diff --git a/man/crystal.1 b/man/crystal.1 index 35c8b282f38f..3e60eb27aff0 100644 --- a/man/crystal.1 +++ b/man/crystal.1 @@ -113,8 +113,6 @@ Generate the output with symbolic debug symbols. These are read when debugging the built program with tools like lldb, gdb, valgrind etc. and provide mappings to the original source code for those tools. .It Fl -no-debug Generate the output without any symbolic debug symbols. -.It Fl -lto Ar FLAG -Use ThinLTO --lto=thin. .It Fl D Ar FLAG, Fl -define Ar FLAG Define a compile-time flag. This is useful to conditionally define types, methods, or commands based on flags available at compile time. The default flags are from the target triple given with --target-triple or the hosts default, if none is given. .It Fl -emit Op asm|llvm-bc|llvm-ir|obj diff --git a/src/llvm/ext/llvm_ext.cc b/src/llvm/ext/llvm_ext.cc index 9c17b4681c4a..5313effd597d 100644 --- a/src/llvm/ext/llvm_ext.cc +++ b/src/llvm/ext/llvm_ext.cc @@ -85,22 +85,6 @@ LLVMValueRef LLVMExtBuildInvoke2( Bundles, Name)); } -void LLVMExtWriteBitcodeWithSummaryToFile(LLVMModuleRef mref, const char *File) { - // https://github.com/ldc-developers/ldc/pull/1840/files - Module *m = unwrap(mref); - - std::error_code EC; -#if LLVM_VERSION_GE(13, 0) - raw_fd_ostream OS(File, EC, sys::fs::OF_None); -#else - raw_fd_ostream OS(File, EC, sys::fs::F_None); -#endif - if (EC) return; - - llvm::ModuleSummaryIndex moduleSummaryIndex = llvm::buildModuleSummaryIndex(*m, nullptr, nullptr); - llvm::WriteBitcodeToFile(*m, OS, true, &moduleSummaryIndex, true); -} - static TargetMachine *unwrap(LLVMTargetMachineRef P) { return reinterpret_cast(P); } diff --git a/src/llvm/lib_llvm_ext.cr b/src/llvm/lib_llvm_ext.cr index b1f30763ab9e..0a050bdd8c3e 100644 --- a/src/llvm/lib_llvm_ext.cr +++ b/src/llvm/lib_llvm_ext.cr @@ -32,8 +32,6 @@ lib LibLLVMExt bundle : LibLLVMExt::OperandBundleDefRef, name : LibC::Char*) : LibLLVM::ValueRef - fun write_bitcode_with_summary_to_file = LLVMExtWriteBitcodeWithSummaryToFile(module : LibLLVM::ModuleRef, path : UInt8*) : Void - fun target_machine_enable_global_isel = LLVMExtTargetMachineEnableGlobalIsel(machine : LibLLVM::TargetMachineRef, enable : Bool) fun create_mc_jit_compiler_for_module = LLVMExtCreateMCJITCompilerForModule(jit : LibLLVM::ExecutionEngineRef*, m : LibLLVM::ModuleRef, options : LibLLVM::JITCompilerOptions*, options_length : UInt32, enable_global_isel : Bool, error : UInt8**) : Int32 end diff --git a/src/llvm/module.cr b/src/llvm/module.cr index 6a9fe2f5cbdc..95940f6ed193 100644 --- a/src/llvm/module.cr +++ b/src/llvm/module.cr @@ -53,8 +53,9 @@ class LLVM::Module LibLLVM.write_bitcode_to_file self, filename end + @[Deprecated("ThinLTO is no longer supported; use `#write_bitcode_to_file` instead")] def write_bitcode_with_summary_to_file(filename : String) - LibLLVMExt.write_bitcode_with_summary_to_file self, filename + LibLLVM.write_bitcode_to_file self, filename end def write_bitcode_to_memory_buffer