Auto merge of #135763 - nikic:llvm-20, r=cuviper
Update to LLVM 20 LLVM 20 GA is scheduled for March 11th. Rust 1.87 will be stable on May 15th. * [x] https://github.com/rust-lang/rust/pull/135764 * [x] https://github.com/rust-lang/rust/pull/136134 * [x] https://github.com/rust-lang/compiler-builtins/pull/752 * [x] https://github.com/llvm/llvm-project/pull/125287 * [x] https://github.com/rust-lang/rust/pull/136537 * [x] https://github.com/rust-lang/rust/pull/136895 * [x] Wait for beta branch (Feb 14). Tested: host-x86_64, host-aarch64, apple, mingw, msvc
This commit is contained in:
commit
ce36a966c7
5 changed files with 18 additions and 10 deletions
2
.gitmodules
vendored
2
.gitmodules
vendored
|
@ -29,7 +29,7 @@
|
||||||
[submodule "src/llvm-project"]
|
[submodule "src/llvm-project"]
|
||||||
path = src/llvm-project
|
path = src/llvm-project
|
||||||
url = https://github.com/rust-lang/llvm-project.git
|
url = https://github.com/rust-lang/llvm-project.git
|
||||||
branch = rustc/19.1-2024-12-03
|
branch = rustc/20.1-2025-02-13
|
||||||
shallow = true
|
shallow = true
|
||||||
[submodule "src/doc/embedded-book"]
|
[submodule "src/doc/embedded-book"]
|
||||||
path = src/doc/embedded-book
|
path = src/doc/embedded-book
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "llvm/Passes/StandardInstrumentations.h"
|
#include "llvm/Passes/StandardInstrumentations.h"
|
||||||
#include "llvm/Support/CBindingWrapping.h"
|
#include "llvm/Support/CBindingWrapping.h"
|
||||||
#include "llvm/Support/FileSystem.h"
|
#include "llvm/Support/FileSystem.h"
|
||||||
|
#include "llvm/Support/Program.h"
|
||||||
#include "llvm/Support/TimeProfiler.h"
|
#include "llvm/Support/TimeProfiler.h"
|
||||||
#include "llvm/Support/VirtualFileSystem.h"
|
#include "llvm/Support/VirtualFileSystem.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
|
@ -472,16 +473,19 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
|
||||||
assert(ArgsCstrBuff[ArgsCstrBuffLen - 1] == '\0');
|
assert(ArgsCstrBuff[ArgsCstrBuffLen - 1] == '\0');
|
||||||
auto Arg0 = std::string(ArgsCstrBuff);
|
auto Arg0 = std::string(ArgsCstrBuff);
|
||||||
buffer_offset = Arg0.size() + 1;
|
buffer_offset = Arg0.size() + 1;
|
||||||
auto ArgsCppStr = std::string(ArgsCstrBuff + buffer_offset,
|
|
||||||
ArgsCstrBuffLen - buffer_offset);
|
std::string CommandlineArgs;
|
||||||
auto i = 0;
|
raw_string_ostream OS(CommandlineArgs);
|
||||||
while (i != std::string::npos) {
|
ListSeparator LS(" ");
|
||||||
i = ArgsCppStr.find('\0', i + 1);
|
for (StringRef Arg : split(StringRef(ArgsCstrBuff + buffer_offset,
|
||||||
if (i != std::string::npos)
|
ArgsCstrBuffLen - buffer_offset),
|
||||||
ArgsCppStr.replace(i, 1, " ");
|
'\0')) {
|
||||||
|
OS << LS;
|
||||||
|
sys::printArg(OS, Arg, /*Quote=*/true);
|
||||||
}
|
}
|
||||||
|
OS.flush();
|
||||||
Options.MCOptions.Argv0 = Arg0;
|
Options.MCOptions.Argv0 = Arg0;
|
||||||
Options.MCOptions.CommandlineArgs = ArgsCppStr;
|
Options.MCOptions.CommandlineArgs = CommandlineArgs;
|
||||||
#else
|
#else
|
||||||
int buffer_offset = 0;
|
int buffer_offset = 0;
|
||||||
assert(ArgsCstrBuff[ArgsCstrBuffLen - 1] == '\0');
|
assert(ArgsCstrBuff[ArgsCstrBuffLen - 1] == '\0');
|
||||||
|
|
|
@ -7,6 +7,8 @@ CT_ARCH_LOONGARCH=y
|
||||||
# CT_DEMULTILIB is not set
|
# CT_DEMULTILIB is not set
|
||||||
CT_ARCH_USE_MMU=y
|
CT_ARCH_USE_MMU=y
|
||||||
CT_ARCH_ARCH="loongarch64"
|
CT_ARCH_ARCH="loongarch64"
|
||||||
|
CT_TARGET_CFLAGS="-mcmodel=medium"
|
||||||
|
CT_TARGET_LDFLAGS="-mcmodel=medium"
|
||||||
CT_KERNEL_LINUX=y
|
CT_KERNEL_LINUX=y
|
||||||
CT_LINUX_V_5_19=y
|
CT_LINUX_V_5_19=y
|
||||||
CT_GLIBC_V_2_36=y
|
CT_GLIBC_V_2_36=y
|
||||||
|
|
|
@ -7,6 +7,8 @@ CT_ARCH_LOONGARCH=y
|
||||||
# CT_DEMULTILIB is not set
|
# CT_DEMULTILIB is not set
|
||||||
CT_ARCH_USE_MMU=y
|
CT_ARCH_USE_MMU=y
|
||||||
CT_ARCH_ARCH="loongarch64"
|
CT_ARCH_ARCH="loongarch64"
|
||||||
|
CT_TARGET_CFLAGS="-mcmodel=medium"
|
||||||
|
CT_TARGET_LDFLAGS="-mcmodel=medium"
|
||||||
CT_KERNEL_LINUX=y
|
CT_KERNEL_LINUX=y
|
||||||
CT_LINUX_V_5_19=y
|
CT_LINUX_V_5_19=y
|
||||||
CT_LIBC_MUSL=y
|
CT_LIBC_MUSL=y
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 7e8c93c87c611f21d9bd95100563392f4c18bfe7
|
Subproject commit 92e80685d0d5dcea3ccf321995c43b72338639c6
|
Loading…
Add table
Add a link
Reference in a new issue