Mercurial > mxe-octave
comparison src/llvm-1-llvm-config.patch @ 5803:76a8a2d86ab8
LLVM: Update to version 12.0.1.
* src/llvm.mk: Update version and checksum. Remove unused cmake flag.
* src/llvm-1-llvm-config.patch: Update patch.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Mon, 19 Jul 2021 18:37:31 +0200 |
parents | f367e764ca55 |
children |
comparison
equal
deleted
inserted
replaced
5802:03d277ae2605 | 5803:76a8a2d86ab8 |
---|---|
15 +#cmakedefine LLVM_TARGET_IS_CROSSCOMPILE_HOST ${LLVM_TARGET_IS_CROSSCOMPILE_HOST} | 15 +#cmakedefine LLVM_TARGET_IS_CROSSCOMPILE_HOST ${LLVM_TARGET_IS_CROSSCOMPILE_HOST} |
16 + | 16 + |
17 /* Major version of the LLVM API */ | 17 /* Major version of the LLVM API */ |
18 #define LLVM_VERSION_MAJOR ${LLVM_VERSION_MAJOR} | 18 #define LLVM_VERSION_MAJOR ${LLVM_VERSION_MAJOR} |
19 | 19 |
20 diff --git "a/tools/llvm-config/llvm-config.cpp" "b/tools/llvm-config/llvm-config.cpp" | 20 diff -up "./tools/llvm-config/llvm-config.cpp.orig" "./tools/llvm-config/llvm-config.cpp" |
21 index bec89fe..a1be375 100644 | 21 --- ./tools/llvm-config/llvm-config.cpp.orig 2021-06-28 18:23:38.000000000 +0200 |
22 --- "a/tools/llvm-config/llvm-config.cpp" | 22 +++ ./tools/llvm-config/llvm-config.cpp 2021-07-19 17:23:35.059439097 +0200 |
23 +++ "b/tools/llvm-config/llvm-config.cpp" | 23 @@ -36,7 +36,12 @@ using namespace llvm; |
24 @@ -37,7 +37,12 @@ using namespace llvm; | |
25 | 24 |
26 // Include the build time variables we can report to the user. This is generated | 25 // Include the build time variables we can report to the user. This is generated |
27 // at build time from the BuildVariables.inc.in file by the build system. | 26 // at build time from the BuildVariables.inc.in file by the build system. |
28 -#include "BuildVariables.inc" | 27 -#include "BuildVariables.inc" |
29 +#if defined(LLVM_TARGET_IS_CROSSCOMPILE_HOST) | 28 +#if defined(LLVM_TARGET_IS_CROSSCOMPILE_HOST) |
33 +# include "BuildVariables.inc" | 32 +# include "BuildVariables.inc" |
34 +#endif | 33 +#endif |
35 | 34 |
36 // Include the component table. This creates an array of struct | 35 // Include the component table. This creates an array of struct |
37 // AvailableComponent entries, which record the component name, library name, | 36 // AvailableComponent entries, which record the component name, library name, |
38 @@ -352,14 +352,16 @@ int main(int argc, char **argv) { | 37 @@ -377,15 +382,17 @@ int main(int argc, char **argv) { |
39 StringRef SharedExt, SharedVersionedExt, SharedDir, SharedPrefix, StaticExt, | 38 StaticPrefix, StaticDir = "lib"; |
40 StaticPrefix, StaticDir = "lib", DirSep = "/"; | 39 std::string DirSep = "/"; |
41 const Triple HostTriple(Triple::normalize(LLVM_HOST_TRIPLE)); | 40 const Triple HostTriple(Triple::normalize(LLVM_HOST_TRIPLE)); |
42 - if (HostTriple.isOSWindows()) { | 41 - if (HostTriple.isOSWindows()) { |
43 + const Triple TargetTriple(Triple::normalize(LLVM_DEFAULT_TARGET_TRIPLE)); | 42 + const Triple TargetTriple(Triple::normalize(LLVM_DEFAULT_TARGET_TRIPLE)); |
44 + if (TargetTriple.isOSWindows()) { | 43 + if (TargetTriple.isOSWindows()) { |
45 SharedExt = "dll"; | 44 SharedExt = "dll"; |
46 SharedVersionedExt = LLVM_DYLIB_VERSION ".dll"; | 45 SharedVersionedExt = LLVM_DYLIB_VERSION ".dll"; |
47 - if (HostTriple.isOSCygMing()) { | 46 - if (HostTriple.isOSCygMing()) { |
48 + if (TargetTriple.isOSCygMing()) { | 47 + if (TargetTriple.isOSCygMing()) { |
48 SharedPrefix = "lib"; | |
49 StaticExt = "a"; | 49 StaticExt = "a"; |
50 StaticPrefix = "lib"; | 50 StaticPrefix = "lib"; |
51 } else { | 51 } else { |
52 StaticExt = "lib"; | 52 StaticExt = "lib"; |
53 + if (HostTriple.isOSWindows()) { | 53 + if (HostTriple.isOSWindows()) { |
54 DirSep = "\\"; | 54 DirSep = "\\"; |
55 std::replace(ActiveObjRoot.begin(), ActiveObjRoot.end(), '/', '\\'); | 55 std::replace(ActiveObjRoot.begin(), ActiveObjRoot.end(), '/', '\\'); |
56 std::replace(ActivePrefix.begin(), ActivePrefix.end(), '/', '\\'); | 56 std::replace(ActivePrefix.begin(), ActivePrefix.end(), '/', '\\'); |
57 @@ -368,10 +370,11 @@ int main(int argc, char **argv) { | 57 @@ -394,10 +401,11 @@ int main(int argc, char **argv) { |
58 std::replace(ActiveCMakeDir.begin(), ActiveCMakeDir.end(), '/', '\\'); | 58 std::replace(ActiveCMakeDir.begin(), ActiveCMakeDir.end(), '/', '\\'); |
59 std::replace(ActiveIncludeOption.begin(), ActiveIncludeOption.end(), '/', | 59 std::replace(ActiveIncludeOption.begin(), ActiveIncludeOption.end(), '/', |
60 '\\'); | 60 '\\'); |
61 + } | 61 + } |
62 } | 62 } |
65 - } else if (HostTriple.isOSDarwin()) { | 65 - } else if (HostTriple.isOSDarwin()) { |
66 + } else if (TargetTriple.isOSDarwin()) { | 66 + } else if (TargetTriple.isOSDarwin()) { |
67 SharedExt = "dylib"; | 67 SharedExt = "dylib"; |
68 SharedVersionedExt = LLVM_DYLIB_VERSION ".dylib"; | 68 SharedVersionedExt = LLVM_DYLIB_VERSION ".dylib"; |
69 StaticExt = "a"; | 69 StaticExt = "a"; |
70 @@ -670,7 +673,7 @@ int main(int argc, char **argv) { | 70 @@ -694,7 +703,7 @@ int main(int argc, char **argv) { |
71 } else if (PrintLibs) { | 71 } else if (PrintLibs) { |
72 // On Windows, output full path to library without parameters. | 72 // On Windows, output full path to library without parameters. |
73 // Elsewhere, if this is a typical library name, include it using -l. | 73 // Elsewhere, if this is a typical library name, include it using -l. |
74 - if (HostTriple.isWindowsMSVCEnvironment()) { | 74 - if (HostTriple.isWindowsMSVCEnvironment()) { |
75 + if (TargetTriple.isWindowsMSVCEnvironment()) { | 75 + if (TargetTriple.isWindowsMSVCEnvironment()) { |