Implement raw-dylib on Mach-O by madsmtm · Pull Request #146357 · rust-lang/rust (original) (raw)

tidy check
Checking tidy rustdoc_json...
No error code explanation was removed!
tidy: Skipping binary file check, read-only filesystem
##[error]tidy error: /checkout/compiler/rustc_codegen_ssa/src/back/link/raw_dylib.rs:135: TODO is used for tasks that should be done before merging a PR; If you want to leave a message in the codebase use FIXME
##[error]tidy error: /checkout/compiler/rustc_codegen_ssa/src/back/link/raw_dylib.rs:142: TODO is used for tasks that should be done before merging a PR; If you want to leave a message in the codebase use FIXME
##[error]tidy error: /checkout/compiler/rustc_codegen_ssa/src/back/link/raw_dylib.rs:154: TODO is used for tasks that should be done before merging a PR; If you want to leave a message in the codebase use FIXME
##[error]tidy error: /checkout/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp:1968: TODO is used for tasks that should be done before merging a PR; If you want to leave a message in the codebase use FIXME
removing old virtual environment
creating virtual environment at '/checkout/obj/build/venv' using 'python3.10' and 'venv'
creating virtual environment at '/checkout/obj/build/venv' using 'python3.10' and 'virtualenv'
Requirement already satisfied: pip in ./build/venv/lib/python3.10/site-packages (25.2)
linting python files
---
                               ^
/checkout/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp:1963:29: error: code should be clang-formatted [-Wclang-format-violations]
    uint32_t CurrentVersion,
                            ^
/checkout/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp:1965:43: error: code should be clang-formatted [-Wclang-format-violations]
    const LLVMRustMachOTbdExport *Exports,
                                          ^
/checkout/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp:1981:72: error: code should be clang-formatted [-Wclang-format-violations]
    File.addSymbol(Exports[i].kind, StringRef(Exports[i].name), Target, Exports[i].flags);
                                                                       ^
/checkout/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp:1994:67: error: code should be clang-formatted [-Wclang-format-violations]
  if (Error Err = MachO::TextAPIWriter::writeToStream(OS, File)) {
                                                                  ^
/checkout/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp:1995:62: error: code should be clang-formatted [-Wclang-format-violations]
      LLVMRustSetLastError(toString(std::move(Err)).c_str());
                                                             ^

clang-format linting failed! Printing diff suggestions:
--- /checkout/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp (actual)
+++ /checkout/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp (formatted)
@@ -1956,15 +1956,11 @@
   MachO::EncodeKind kind;
 };
 
 extern "C" uint8_t LLVMRustMachoTbdWrite(
-    const char *Path,
-    const char *LLVMTargetName,
-    const char *InstallName,
-    uint32_t CurrentVersion,
-    uint32_t CompatibilityVersion,
-    const LLVMRustMachOTbdExport *Exports,
-    size_t NumExports) {
+    const char *Path, const char *LLVMTargetName, const char *InstallName,
+    uint32_t CurrentVersion, uint32_t CompatibilityVersion,
+    const LLVMRustMachOTbdExport *Exports, size_t NumExports) {
   MachO::InterfaceFile File;
   File.setFileType(MachO::FileType::TBD_V1); // TODO
 
   File.setInstallName(StringRef(InstallName));
@@ -1977,9 +1973,10 @@
   MachO::Target Target{Triple(LLVMTargetName)};
   File.addTarget(Target);
 
   for (size_t i = 0; i < NumExports; i++) {
-    File.addSymbol(Exports[i].kind, StringRef(Exports[i].name), Target, Exports[i].flags);
+    File.addSymbol(Exports[i].kind, StringRef(Exports[i].name), Target,
+                   Exports[i].flags);
   }
 
   std::string ErrorInfo;
   std::error_code EC;
@@ -1991,10 +1988,10 @@
     return -1;
   }
 
   if (Error Err = MachO::TextAPIWriter::writeToStream(OS, File)) {
-      LLVMRustSetLastError(toString(std::move(Err)).c_str());
-      return -1;
+    LLVMRustSetLastError(toString(std::move(Err)).c_str());
+    return -1;
   }
 
   return 0;
 }

some tidy checks failed
tidy error: checks with external tool 'clang-format' failed
Bootstrap failed while executing `test src/tools/tidy tidyselftest --extra-checks=py,cpp,js,spellcheck`
Command `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools-bin/rust-tidy /checkout /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo /checkout/obj/build 4 /node/bin/npm --extra-checks=py,cpp,js,spellcheck` failed with exit code 1
Created at: src/bootstrap/src/core/build_steps/tool.rs:1550:23
Executed at: src/bootstrap/src/core/build_steps/test.rs:1281:29

Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:01:18
  local time: Tue Sep  9 02:00:13 UTC 2025
  network time: Tue, 09 Sep 2025 02:00:13 GMT
##[error]Process completed with exit code 1.
Post job cleanup.