Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustc: rework to build using LLVM 18 #9058

Merged
merged 2 commits into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 23fbabe903ebf8119394641d387576802074b180 Mon Sep 17 00:00:00 2001
From: Jiajie Chen <c@jia.je>
Date: Sun, 28 Jan 2024 04:48:08 -0800
Subject: [PATCH 1/9] Fix fuzzer objects building when LTO is enabled
Subject: [PATCH 01/12] Fix fuzzer objects building when LTO is enabled

---
compiler-rt/lib/fuzzer/CMakeLists.txt | 2 +-
Expand All @@ -21,5 +21,5 @@ index fb5adf1e5c9e..6db873266031 100644
COMMAND ${CMAKE_COMMAND} -E remove "$<TARGET_LINKER_FILE:clang_rt.${name}-${arch}>"
COMMAND ${CMAKE_AR} qcs "$<TARGET_LINKER_FILE:clang_rt.${name}-${arch}>" ${name}.o
--
2.45.2
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From c87f68bf48504e45b6969240be1b2d3ca48b36eb Mon Sep 17 00:00:00 2001
From: Jiajie Chen <c@jia.je>
Date: Sun, 28 Jan 2024 04:49:47 -0800
Subject: [PATCH 2/9] Fix MSVC detection
Subject: [PATCH 02/12] Fix MSVC detection

---
llvm/cmake/modules/CheckProblematicConfigurations.cmake | 2 +-
Expand All @@ -21,5 +21,5 @@ index e133873d756c..71484172cfb6 100644
if(_FLAGS MATCHES "/arch:avx[0-9]*")
log_problematic("Compiling LLVM with MSVC and the /arch:AVX flag is known to cause issues with parts of LLVM.\nSee https://github.com/llvm/llvm-project/issues/54645 for details.\nUse clang-cl if you want to enable AVX instructions.")
--
2.45.2
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 98a38ba8d9c3146b55c31f8ba320d68b227ccb64 Mon Sep 17 00:00:00 2001
From: Jiajie Chen <c@jia.je>
Date: Sun, 28 Jan 2024 04:49:26 -0800
Subject: [PATCH 3/9] [mips] Add stub for mips64 LLDB impl
Subject: [PATCH 03/12] [mips] Add stub for mips64 LLDB impl

---
.../Plugins/Process/Linux/NativeRegisterContextLinux.h | 7 ++++++-
Expand All @@ -26,5 +26,5 @@ index 08f19d374e28..a042dd3dd677 100644
// Determine the architecture of the thread given by its ID.
static llvm::Expected<ArchSpec> DetermineArchitecture(lldb::tid_t tid);
--
2.45.2
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 8070451190bf8b440b09ad1d384e2743f8fc5297 Mon Sep 17 00:00:00 2001
From: Jiajie Chen <c@jia.je>
Date: Sun, 28 Jan 2024 04:52:51 -0800
Subject: [PATCH 4/9] [mips] Add stub for lldb arch functions on loongson3
Subject: [PATCH 04/12] [mips] Add stub for lldb arch functions on loongson3

---
.../Plugins/Process/Linux/NativeRegisterContextLinux.h | 8 ++++++++
Expand All @@ -28,5 +28,5 @@ index a042dd3dd677..ee4901aa7cd3 100644
// Invalidates cached values in register context data structures
virtual void InvalidateAllRegisters(){}
--
2.45.2
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From eb271125e8f6b5186a31e2a5a17ac3d4beb51d62 Mon Sep 17 00:00:00 2001
From: Jiajie Chen <c@jia.je>
Date: Sun, 28 Jan 2024 04:53:18 -0800
Subject: [PATCH 5/9] [mips] HACK: force enable cacheflush function
Subject: [PATCH 05/12] [mips] HACK: force enable cacheflush function

---
compiler-rt/lib/builtins/clear_cache.c | 1 +
Expand All @@ -20,5 +20,5 @@ index 2ac99b25c243..f055d3fcee4d 100644
#include <sys/syscall.h>
#include <unistd.h>
--
2.45.2
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 26d1b2fd5c48df217b0cdda1282ab18f31c85ee7 Mon Sep 17 00:00:00 2001
From: Henry Chen <henry.chen@oss.cipunited.com>
Date: Wed, 31 Jan 2024 14:37:12 +0800
Subject: [PATCH 6/9] [mips] Fix build of LinuxSignals on Mips
Subject: [PATCH 06/12] [mips] Fix build of LinuxSignals on Mips

But only the build, not the functionality because lldb won't work
anyway.
Expand Down Expand Up @@ -89,5 +89,5 @@ index 3f25dbc6abbb..d419bea22c4d 100644
AddSignal(33, "SIG33", false, false, false, "threading library internal signal 2");
AddSignal(34, "SIGRTMIN", false, false, false, "real time signal 0");
--
2.45.2
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From b1d68378d641862de95f5628721eb7811846d764 Mon Sep 17 00:00:00 2001
From: Alex Crichton <alex@alexcrichton.com>
Date: Sat, 10 Feb 2018 17:21:38 -0800
Subject: [PATCH 7/9] [rust] Compile with /MT on MSVC
Subject: [PATCH 07/12] [rust] Compile with /MT on MSVC

Can't seem to figure out how to do this without this patch...
---
Expand Down Expand Up @@ -33,5 +33,5 @@ index 595c286abd91..d17d3c55395a 100644
add_subdirectory(tools/lld)

--
2.45.2
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 29cc9d85355b9e2ed0e685e994373cfc9996ba14 Mon Sep 17 00:00:00 2001
From: Nikita Popov <nikita.ppv@googlemail.com>
Date: Fri, 12 Jul 2019 16:06:11 +0200
Subject: [PATCH 8/9] [rust] Comment out __builtin_available() use (#21)
Subject: [PATCH 08/12] [rust] Comment out __builtin_available() use (#21)

__builtin_available() pulls in __isOSVersionAtLeast() from
compiler-rt. Comment it out so we don't have to figure out how
Expand All @@ -24,5 +24,5 @@ index 9f89d63bb0fd..6a904d9cb723 100644
// Optimistically try to use clonefile() and handle errors, rather than
// calling stat() to see if it'll work.
--
2.45.2
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From b2f535972f0b1011dfc2d7f6ce46a3ba37a4a401 Mon Sep 17 00:00:00 2001
From: Adrian Cruceru <cruceruadrian@gmail.com>
Date: Mon, 25 May 2020 20:58:30 +0200
Subject: [PATCH 9/9] [rust] Changes needed for 'x86_64-fortanix-unknown-sgx'
Subject: [PATCH 09/12] [rust] Changes needed for 'x86_64-fortanix-unknown-sgx'
nightly target.

Code is guarded via defines to enable only if 'RUST_SGX' is present.
Expand Down Expand Up @@ -484,5 +484,5 @@ index deb5a4d4d73d..5337be4b3d50 100644
#ifdef __APPLE__
#if defined(FOR_DYLD)
--
2.45.2
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From c020430f7b9c827e9f43e2abdd37b523656d5a50 Mon Sep 17 00:00:00 2001
From: Jonas Hahnfeld <hahnjo@hahnjo.de>
Date: Mon, 12 Feb 2024 19:45:52 +0100
Subject: [PATCH 10/11] [JITLink][RISCV] Use hashmap to find PCREL_HI20 edge
Subject: [PATCH 10/12] [JITLink][RISCV] Use hashmap to find PCREL_HI20 edge
(#78849)

As noted in issues #68594 and #73935, `JITLink/RISCV/ELF_ehframe.s`
Expand Down Expand Up @@ -104,5 +104,5 @@ index d0701ba08bd9..627f186ca591 100644
using namespace riscv;
using namespace llvm::support;
--
2.46.0
2.47.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 94fb8943c3a9627e18288f06dceb6380e84b8490 Mon Sep 17 00:00:00 2001
From: Min-Yih Hsu <min.hsu@sifive.com>
Date: Fri, 16 Feb 2024 16:19:56 -0800
Subject: [PATCH 11/11] [JITLink] Always unmap standard segments in
Subject: [PATCH 11/12] [JITLink] Always unmap standard segments in
InProcessMemoryManager::deallocate (#81943)

Right now InProcessMemoryManager only releases a standard segment (via
Expand Down Expand Up @@ -34,5 +34,5 @@ index 474a0b5160bc..dacf0e6c8aa4 100644
FinalizedAllocInfos.Deallocate(FA);
}
--
2.46.0
2.47.1

Loading