Skip to content

Commit

Permalink
Auto merge of rust-lang#135763 - nikic:llvm-20, r=<try>
Browse files Browse the repository at this point in the history
Update to LLVM 20

LLVM 20 GA is scheduled for March 11th. Rust 1.86 will be stable on April 3rd.

* [x] rust-lang#135764
* [x] rust-lang#136134
* [x] rust-lang/compiler-builtins#752
* [ ] llvm/llvm-project#125287
* [ ] Update compiler-builtins (blocked on rust-lang#135501)

Tested: host-x86_64, host-aarch64, apple, mingw

try-job: x86_64-msvc-1
try-job: i686-msvc-1
try-job: dist-aarch64-msvc
try-job: x86_64-msvc-ext1
try-job: x86_64-msvc-ext2
try-job: x86_64-msvc-ext3
  • Loading branch information
bors committed Feb 3, 2025
2 parents a5db378 + ee8284e commit ad23dfe
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
20 changes: 12 additions & 8 deletions compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "llvm/Passes/StandardInstrumentations.h"
#include "llvm/Support/CBindingWrapping.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/TimeProfiler.h"
#include "llvm/Support/VirtualFileSystem.h"
#include "llvm/Target/TargetMachine.h"
Expand Down Expand Up @@ -472,16 +473,19 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
assert(ArgsCstrBuff[ArgsCstrBuffLen - 1] == '\0');
auto Arg0 = std::string(ArgsCstrBuff);
buffer_offset = Arg0.size() + 1;
auto ArgsCppStr = std::string(ArgsCstrBuff + buffer_offset,
ArgsCstrBuffLen - buffer_offset);
auto i = 0;
while (i != std::string::npos) {
i = ArgsCppStr.find('\0', i + 1);
if (i != std::string::npos)
ArgsCppStr.replace(i, 1, " ");

std::string CommandlineArgs;
raw_string_ostream OS(CommandlineArgs);
ListSeparator LS(" ");
for (StringRef Arg : split(StringRef(ArgsCstrBuff + buffer_offset,
ArgsCstrBuffLen - buffer_offset),
'\0')) {
OS << LS;
sys::printArg(OS, Arg, /*Quote=*/true);
}
OS.flush();
Options.MCOptions.Argv0 = Arg0;
Options.MCOptions.CommandlineArgs = ArgsCppStr;
Options.MCOptions.CommandlineArgs = CommandlineArgs;
#else
int buffer_offset = 0;
assert(ArgsCstrBuff[ArgsCstrBuffLen - 1] == '\0');
Expand Down
2 changes: 1 addition & 1 deletion src/llvm-project
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ pub unsafe extern "ptx-kernel" fn f_float_array_arg(_a: [f32; 5]) {}
//pub unsafe extern "ptx-kernel" fn f_u128_array_arg(_a: [u128; 5]) {}

// CHECK: .visible .entry f_u32_slice_arg(
// CHECK: .param .u64 f_u32_slice_arg_param_0
// CHECK: .param .u64 {{(\.ptr \.align 4 )?}}f_u32_slice_arg_param_0
// CHECK: .param .u64 f_u32_slice_arg_param_1
#[no_mangle]
pub unsafe extern "ptx-kernel" fn f_u32_slice_arg(_a: &[u32]) {}
Expand Down

0 comments on commit ad23dfe

Please sign in to comment.