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

Compilations error fix #178

Open
Lexterl33t opened this issue Jan 14, 2024 · 3 comments
Open

Compilations error fix #178

Lexterl33t opened this issue Jan 14, 2024 · 3 comments

Comments

@Lexterl33t
Copy link

Lexterl33t commented Jan 14, 2024

As I've seen a number of problems with compilations recently, I've come up with a solution that works for me.

examples of patches I've made to the llvm version

Patch 1:

diff --git a/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h b/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
index 8647db56c..4a631e00b 100755
--- a/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
+++ b/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
@@ -687,7 +687,7 @@ private:
 
   uint32_t getTrampolineSize() const { return RemoteTrampolineSize; }
 
-  Expected<std::vector<char>> readMem(char *Dst, JITTargetAddress Src,
+  Expected<std::vector<unsigned char>> readMem(char *Dst, JITTargetAddress Src,
                                       uint64_t Size) {
     // Check for an 'out-of-band' error, e.g. from an MM destructor.
     if (ExistingError)

Patch 2:

diff --git a/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index 402521713..40a73ef74 100755
--- a/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -6271,7 +6271,7 @@ void CGOpenMPRuntime::emitTargetDataCalls(
   // Generate the code for the opening of the data environment. Capture all the
   // arguments of the runtime call by reference because they are used in the
   // closing of the region.
-  auto &&BeginThenGen = [&D, &CGF, Device, &Info, &CodeGen, &NoPrivAction](
+  auto &&BeginThenGen = [&D, Device, &Info, &CodeGen, &NoPrivAction](
       CodeGenFunction &CGF, PrePostActionTy &) {
     // Fill up the arrays with all the mapped variables.
     MappableExprsHandler::MapBaseValuesArrayTy BasePointers;
@@ -6318,7 +6318,7 @@ void CGOpenMPRuntime::emitTargetDataCalls(
   };
 
   // Generate code for the closing of the data region.
-  auto &&EndThenGen = [&CGF, Device, &Info](CodeGenFunction &CGF,
+  auto &&EndThenGen = [Device, &Info](CodeGenFunction &CGF,
                                             PrePostActionTy &) {
     assert(Info.isValid() && "Invalid data environment closing arguments.");
 
@@ -6397,7 +6397,7 @@ void CGOpenMPRuntime::emitTargetDataStandAloneCall(
          "Expecting either target enter, exit data, or update directives.");
 
   // Generate the code for the opening of the data environment.
-  auto &&ThenGen = [&D, &CGF, Device](CodeGenFunction &CGF, PrePostActionTy &) {
+  auto &&ThenGen = [&D, Device](CodeGenFunction &CGF, PrePostActionTy &) {
     // Fill up the arrays with all the mapped variables.
     MappableExprsHandler::MapBaseValuesArrayTy BasePointers;
     MappableExprsHandler::MapValuesArrayTy Pointers;

Patch 3:

diff --git a/tools/llvm-xray/xray-extract.cc b/tools/llvm-xray/xray-extract.cc
index ecd535114..2f39dd048 100755
--- a/tools/llvm-xray/xray-extract.cc
+++ b/tools/llvm-xray/xray-extract.cc
@@ -15,6 +15,7 @@
 
 #include <type_traits>
 #include <utility>
+#include <stdint.h>
 
 #include "xray-extract.h"
 
diff --git a/tools/llvm-xray/xray-extract.h b/tools/llvm-xray/xray-extract.h
index 91e4db368..9191f9ff2 100755
--- a/tools/llvm-xray/xray-extract.h
+++ b/tools/llvm-xray/xray-extract.h
@@ -19,6 +19,7 @@
 #include <map>
 #include <string>
 #include <unordered_map>
+#include <stdint.h>
 
 #include "xray-sleds.h"
 #include "llvm/Support/Error.h"
@Lexterl33t Lexterl33t changed the title Fixing compilations error Compilations error fix Jan 14, 2024
@TRIKKSS
Copy link

TRIKKSS commented Jan 14, 2024

it works for me thank you !

@Quangcha
Copy link

Quangcha commented Nov 1, 2024

it works for me, thank you so much

@wupengcheng6819
Copy link

Thank you so much!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants