1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:27:45 +00:00

Toolchain: Format llvm patches per new patch format

This removes the patch series 1/N comments, git version at the bottom of
the patch, and zeros out the original commit hash.
This commit is contained in:
Andrew Kaster 2022-06-26 20:38:21 -06:00 committed by Linus Groh
parent a80493d221
commit d889294036
9 changed files with 23 additions and 51 deletions

View file

@ -1,7 +1,7 @@
From 9ff3d5362c71dfa9b6aba1dd65a33bb6d8971164 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Bertalan <dani@danielbertalan.dev> From: Daniel Bertalan <dani@danielbertalan.dev>
Date: Thu, 14 Apr 2022 09:54:22 +0200 Date: Thu, 14 Apr 2022 09:54:22 +0200
Subject: [PATCH 1/9] [Support] Add support for building LLVM on SerenityOS Subject: [PATCH] [Support] Add support for building LLVM on SerenityOS
Adds SerenityOS `#ifdef`s for platform-specific code. Adds SerenityOS `#ifdef`s for platform-specific code.
@ -76,6 +76,3 @@ index 089342030..3ffe064e5 100644
ProcessInfo llvm::sys::Wait(const ProcessInfo &PI, unsigned SecondsToWait, ProcessInfo llvm::sys::Wait(const ProcessInfo &PI, unsigned SecondsToWait,
bool WaitUntilTerminates, std::string *ErrMsg, bool WaitUntilTerminates, std::string *ErrMsg,
Optional<ProcessStatistics> *ProcStat) { Optional<ProcessStatistics> *ProcStat) {
--
2.35.3

View file

@ -1,7 +1,7 @@
From 0cf66d1dbcd3b7c0e2ddd65177066955c41352b7 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Bertalan <dani@danielbertalan.dev> From: Daniel Bertalan <dani@danielbertalan.dev>
Date: Thu, 14 Apr 2022 09:51:24 +0200 Date: Thu, 14 Apr 2022 09:51:24 +0200
Subject: [PATCH 2/9] [Triple] Add triple for SerenityOS Subject: [PATCH] [Triple] Add triple for SerenityOS
--- ---
llvm/include/llvm/ADT/Triple.h | 8 +++++++- llvm/include/llvm/ADT/Triple.h | 8 +++++++-
@ -54,6 +54,3 @@ index a9afcc9db..aef8c7549 100644
.Default(Triple::UnknownOS); .Default(Triple::UnknownOS);
} }
--
2.35.3

View file

@ -1,7 +1,7 @@
From 70cbf6e9ed46f0d39f43ac4a43b9bd2cc10da6c3 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Bertalan <dani@danielbertalan.dev> From: Daniel Bertalan <dani@danielbertalan.dev>
Date: Thu, 14 Apr 2022 10:09:50 +0200 Date: Thu, 14 Apr 2022 10:09:50 +0200
Subject: [PATCH 3/9] [Driver] Add support for SerenityOS Subject: [PATCH] [Driver] Add support for SerenityOS
Adds support for the `$arch-pc-serenity` target to the Clang front end. Adds support for the `$arch-pc-serenity` target to the Clang front end.
This makes the compiler look for libraries and headers in the right This makes the compiler look for libraries and headers in the right
@ -590,6 +590,3 @@ index 000000000..d414f8366
+} // end namespace clang +} // end namespace clang
+ +
+#endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_SERENITY_H +#endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_SERENITY_H
--
2.35.3

View file

@ -1,8 +1,7 @@
From 50e7b15efa5f7e2ff57e998879fee28fff4a5305 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Bertalan <dani@danielbertalan.dev> From: Daniel Bertalan <dani@danielbertalan.dev>
Date: Thu, 14 Apr 2022 10:12:54 +0200 Date: Thu, 14 Apr 2022 10:12:54 +0200
Subject: [PATCH 4/9] [Driver] Default to -ftls-model=initial-exec on Subject: [PATCH] [Driver] Default to -ftls-model=initial-exec on SerenityOS
SerenityOS
This is a hack to make Clang use the initial-exec TLS model instead of This is a hack to make Clang use the initial-exec TLS model instead of
the default local-exec when building code for Serenity. the default local-exec when building code for Serenity.
@ -31,6 +30,3 @@ index f2f18e901..39d6c18fe 100644
if (Args.hasFlag(options::OPT_fnew_infallible, if (Args.hasFlag(options::OPT_fnew_infallible,
options::OPT_fno_new_infallible, false)) options::OPT_fno_new_infallible, false))
--
2.35.3

View file

@ -1,7 +1,7 @@
From fae5030852da34db641d636ad4c599e56b92ccdf Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Bertalan <dani@danielbertalan.dev> From: Daniel Bertalan <dani@danielbertalan.dev>
Date: Thu, 14 Apr 2022 10:17:13 +0200 Date: Thu, 14 Apr 2022 10:17:13 +0200
Subject: [PATCH 5/9] [libc++] Add support for SerenityOS Subject: [PATCH] [libc++] Add support for SerenityOS
This commit teaches libc++ about what features are available in our This commit teaches libc++ about what features are available in our
LibC, namely: LibC, namely:
@ -148,6 +148,3 @@ index 0ed53a3b2..7fffd937e 100644
#elif defined(__sun__) #elif defined(__sun__)
#define _LIBCPP_ELAST ESTALE #define _LIBCPP_ELAST ESTALE
#elif defined(__MVS__) #elif defined(__MVS__)
--
2.35.3

View file

@ -1,7 +1,7 @@
From 1cf9ec98aa817c13b94b42e4df80804a6757aa8a Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Bertalan <dani@danielbertalan.dev> From: Daniel Bertalan <dani@danielbertalan.dev>
Date: Thu, 14 Apr 2022 10:20:46 +0200 Date: Thu, 14 Apr 2022 10:20:46 +0200
Subject: [PATCH 6/9] [compiler-rt] Build crtbegin.o/crtend.o for SerenityOS Subject: [PATCH] [compiler-rt] Build crtbegin.o/crtend.o for SerenityOS
--- ---
compiler-rt/cmake/config-ix.cmake | 2 +- compiler-rt/cmake/config-ix.cmake | 2 +-
@ -20,6 +20,3 @@ index fc62d5ecc..7a47b7f71 100644
set(COMPILER_RT_HAS_CRT TRUE) set(COMPILER_RT_HAS_CRT TRUE)
else() else()
set(COMPILER_RT_HAS_CRT FALSE) set(COMPILER_RT_HAS_CRT FALSE)
--
2.35.3

View file

@ -1,7 +1,7 @@
From ac91fd973bdf23b24645336a470d5dfb31811aa6 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Bertalan <dani@danielbertalan.dev> From: Daniel Bertalan <dani@danielbertalan.dev>
Date: Thu, 14 Apr 2022 10:21:19 +0200 Date: Thu, 14 Apr 2022 10:21:19 +0200
Subject: [PATCH 7/9] [cmake] Allow undefined symbols on SerenityOS Subject: [PATCH] [cmake] Allow undefined symbols on SerenityOS
Allow undefined symbols in LLVM libraries, which is needed because only Allow undefined symbols in LLVM libraries, which is needed because only
stubs are available for SerenityOS libraries when libc++ and libunwind stubs are available for SerenityOS libraries when libc++ and libunwind
@ -23,6 +23,3 @@ index fcaa8f20b..c27209146 100644
WIN32 OR CYGWIN) AND WIN32 OR CYGWIN) AND
NOT LLVM_USE_SANITIZER) NOT LLVM_USE_SANITIZER)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
--
2.35.3

View file

@ -1,7 +1,7 @@
From eb1dbc59eaebdefd9735b738ca30478ce1788dca Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Bertalan <dani@danielbertalan.dev> From: Daniel Bertalan <dani@danielbertalan.dev>
Date: Mon, 18 Apr 2022 22:32:29 +0200 Date: Mon, 18 Apr 2022 22:32:29 +0200
Subject: [PATCH 8/9] [cmake] Support building shared libLLVM and libClang for Subject: [PATCH] [cmake] Support building shared libLLVM and libClang for
SerenityOS SerenityOS
This patch tells CMake that the --whole-archive linker option should be This patch tells CMake that the --whole-archive linker option should be
@ -49,6 +49,3 @@ index 8e2b78f1b..909018753 100644
# Solaris ld does not accept global: *; so there is no way to version *all* global symbols # Solaris ld does not accept global: *; so there is no way to version *all* global symbols
set(LIB_NAMES -Wl,--version-script,${LLVM_LIBRARY_DIR}/tools/llvm-shlib/simple_version_script.map ${LIB_NAMES}) set(LIB_NAMES -Wl,--version-script,${LLVM_LIBRARY_DIR}/tools/llvm-shlib/simple_version_script.map ${LIB_NAMES})
endif() endif()
--
2.35.3

View file

@ -1,8 +1,8 @@
From 539a12f2955a737f550be655c56a1a993eaa1ae2 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Andrew Kaster <akaster@serenityos.org> From: Andrew Kaster <akaster@serenityos.org>
Date: Fri, 4 Mar 2022 15:13:42 -0700 Date: Fri, 4 Mar 2022 15:13:42 -0700
Subject: [PATCH 9/9] [compiler-rt/llvm] Enable profile instrumentation Subject: [PATCH] [compiler-rt/llvm] Enable profile instrumentation for
for SerenityOS SerenityOS
Treat SerenityOS the same as other *NIX platforms that behave close Treat SerenityOS the same as other *NIX platforms that behave close
enough to linux to use the pre-canned InstrProfiling implementation. enough to linux to use the pre-canned InstrProfiling implementation.
@ -17,7 +17,7 @@ OS ABI for userspace binaries to 3, or GNU/Linux.
4 files changed, 6 insertions(+), 4 deletions(-) 4 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
index 7a47b7f..8d4211d 100644 index 7a47b7f71..8d4211deb 100644
--- a/compiler-rt/cmake/config-ix.cmake --- a/compiler-rt/cmake/config-ix.cmake
+++ b/compiler-rt/cmake/config-ix.cmake +++ b/compiler-rt/cmake/config-ix.cmake
@@ -738,7 +738,7 @@ else() @@ -738,7 +738,7 @@ else()
@ -30,7 +30,7 @@ index 7a47b7f..8d4211d 100644
else() else()
set(COMPILER_RT_HAS_PROFILE FALSE) set(COMPILER_RT_HAS_PROFILE FALSE)
diff --git a/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c b/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c diff --git a/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c b/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
index 592c09b..1833682 100644 index 592c09b49..1833682d7 100644
--- a/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c --- a/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
+++ b/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c +++ b/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
@@ -7,7 +7,8 @@ @@ -7,7 +7,8 @@
@ -44,7 +44,7 @@ index 592c09b..1833682 100644
#include <elf.h> #include <elf.h>
#include <link.h> #include <link.h>
diff --git a/compiler-rt/lib/profile/InstrProfilingPlatformOther.c b/compiler-rt/lib/profile/InstrProfilingPlatformOther.c diff --git a/compiler-rt/lib/profile/InstrProfilingPlatformOther.c b/compiler-rt/lib/profile/InstrProfilingPlatformOther.c
index 3e9b3ca..d257013 100644 index 3e9b3ca0a..d257013dd 100644
--- a/compiler-rt/lib/profile/InstrProfilingPlatformOther.c --- a/compiler-rt/lib/profile/InstrProfilingPlatformOther.c
+++ b/compiler-rt/lib/profile/InstrProfilingPlatformOther.c +++ b/compiler-rt/lib/profile/InstrProfilingPlatformOther.c
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
@ -57,7 +57,7 @@ index 3e9b3ca..d257013 100644
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
diff --git a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp diff --git a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
index 6868408..eaa1b64 100644 index 6868408ef..eaa1b64d2 100644
--- a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp --- a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
@@ -857,7 +857,8 @@ static bool needsRuntimeRegistrationOfSectionRange(const Triple &TT) { @@ -857,7 +857,8 @@ static bool needsRuntimeRegistrationOfSectionRange(const Triple &TT) {
@ -70,6 +70,3 @@ index 6868408..eaa1b64 100644
return false; return false;
return true; return true;
--
2.32.0