pkgsrc/lang/libLLVM/patches/patch-tools_llvm-config_llvm-config.cpp

58 lines
2.5 KiB
C++
Raw Normal View History

llvm: updated to 5.0.0 5.0.0: Non-comprehensive list of changes in this release * LLVM’s WeakVH has been renamed to WeakTrackingVH and a new WeakVH has been introduced. The new WeakVH nulls itself out on deletion, but does not track values across RAUW. * A new library named BinaryFormat has been created which holds a collection of code which previously lived in Support. This includes the file_magic structure and identify_magic functions, as well as all the structure and type definitions for DWARF, ELF, COFF, WASM, and MachO file formats. * The tool llvm-pdbdump has been renamed llvm-pdbutil to better reflect its nature as a general purpose PDB manipulation / diagnostics tool that does more than just dumping contents. * The BBVectorize pass has been removed. It was fully replaced and no longer used back in 2014 but we didn’t get around to removing it. Now it is gone. The SLP vectorizer is the suggested non-loop vectorization pass. * A new tool opt-viewer.py has been added to visualize optimization remarks in HTML. The tool processes the YAML files produced by clang with the -fsave-optimization-record option. * A new CMake macro LLVM_REVERSE_ITERATION has been added. If enabled, all supported unordered LLVM containers would be iterated in reverse order. This is useful for uncovering non-determinism caused by iteration of unordered containers. Currently, it supports reverse iteration of SmallPtrSet and DenseMap. * A new tool llvm-dlltool has been added to create short import libraries from GNU style definition files. The tool utilizes the PE COFF SPEC Import Library Format and PE COFF Auxiliary Weak Externals Format to achieve compatibility with LLD and MSVC LINK.
2017-12-01 20:22:12 +01:00
$NetBSD: patch-tools_llvm-config_llvm-config.cpp,v 1.4 2017/12/01 19:22:13 adam Exp $
Avoid conflict with lang/clang.
Use -lLLVM-3.8 instead of -lLLVM-3.8.0 so we don't break unnecessarily
on patch updates.
llvm: updated to 5.0.0 5.0.0: Non-comprehensive list of changes in this release * LLVM’s WeakVH has been renamed to WeakTrackingVH and a new WeakVH has been introduced. The new WeakVH nulls itself out on deletion, but does not track values across RAUW. * A new library named BinaryFormat has been created which holds a collection of code which previously lived in Support. This includes the file_magic structure and identify_magic functions, as well as all the structure and type definitions for DWARF, ELF, COFF, WASM, and MachO file formats. * The tool llvm-pdbdump has been renamed llvm-pdbutil to better reflect its nature as a general purpose PDB manipulation / diagnostics tool that does more than just dumping contents. * The BBVectorize pass has been removed. It was fully replaced and no longer used back in 2014 but we didn’t get around to removing it. Now it is gone. The SLP vectorizer is the suggested non-loop vectorization pass. * A new tool opt-viewer.py has been added to visualize optimization remarks in HTML. The tool processes the YAML files produced by clang with the -fsave-optimization-record option. * A new CMake macro LLVM_REVERSE_ITERATION has been added. If enabled, all supported unordered LLVM containers would be iterated in reverse order. This is useful for uncovering non-determinism caused by iteration of unordered containers. Currently, it supports reverse iteration of SmallPtrSet and DenseMap. * A new tool llvm-dlltool has been added to create short import libraries from GNU style definition files. The tool utilizes the PE COFF SPEC Import Library Format and PE COFF Auxiliary Weak Externals Format to achieve compatibility with LLD and MSVC LINK.
2017-12-01 20:22:12 +01:00
--- tools/llvm-config/llvm-config.cpp.orig 2017-06-01 20:51:55.000000000 +0000
+++ tools/llvm-config/llvm-config.cpp
llvm: updated to 5.0.0 5.0.0: Non-comprehensive list of changes in this release * LLVM’s WeakVH has been renamed to WeakTrackingVH and a new WeakVH has been introduced. The new WeakVH nulls itself out on deletion, but does not track values across RAUW. * A new library named BinaryFormat has been created which holds a collection of code which previously lived in Support. This includes the file_magic structure and identify_magic functions, as well as all the structure and type definitions for DWARF, ELF, COFF, WASM, and MachO file formats. * The tool llvm-pdbdump has been renamed llvm-pdbutil to better reflect its nature as a general purpose PDB manipulation / diagnostics tool that does more than just dumping contents. * The BBVectorize pass has been removed. It was fully replaced and no longer used back in 2014 but we didn’t get around to removing it. Now it is gone. The SLP vectorizer is the suggested non-loop vectorization pass. * A new tool opt-viewer.py has been added to visualize optimization remarks in HTML. The tool processes the YAML files produced by clang with the -fsave-optimization-record option. * A new CMake macro LLVM_REVERSE_ITERATION has been added. If enabled, all supported unordered LLVM containers would be iterated in reverse order. This is useful for uncovering non-determinism caused by iteration of unordered containers. Currently, it supports reverse iteration of SmallPtrSet and DenseMap. * A new tool llvm-dlltool has been added to create short import libraries from GNU style definition files. The tool utilizes the PE COFF SPEC Import Library Format and PE COFF Auxiliary Weak Externals Format to achieve compatibility with LLD and MSVC LINK.
2017-12-01 20:22:12 +01:00
@@ -332,11 +332,11 @@ int main(int argc, char **argv) {
("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include");
} else {
ActivePrefix = CurrentExecPrefix;
- ActiveIncludeDir = ActivePrefix + "/include";
+ ActiveIncludeDir = "@PREFIX@/include/libLLVM";
llvm: updated to 5.0.0 5.0.0: Non-comprehensive list of changes in this release * LLVM’s WeakVH has been renamed to WeakTrackingVH and a new WeakVH has been introduced. The new WeakVH nulls itself out on deletion, but does not track values across RAUW. * A new library named BinaryFormat has been created which holds a collection of code which previously lived in Support. This includes the file_magic structure and identify_magic functions, as well as all the structure and type definitions for DWARF, ELF, COFF, WASM, and MachO file formats. * The tool llvm-pdbdump has been renamed llvm-pdbutil to better reflect its nature as a general purpose PDB manipulation / diagnostics tool that does more than just dumping contents. * The BBVectorize pass has been removed. It was fully replaced and no longer used back in 2014 but we didn’t get around to removing it. Now it is gone. The SLP vectorizer is the suggested non-loop vectorization pass. * A new tool opt-viewer.py has been added to visualize optimization remarks in HTML. The tool processes the YAML files produced by clang with the -fsave-optimization-record option. * A new CMake macro LLVM_REVERSE_ITERATION has been added. If enabled, all supported unordered LLVM containers would be iterated in reverse order. This is useful for uncovering non-determinism caused by iteration of unordered containers. Currently, it supports reverse iteration of SmallPtrSet and DenseMap. * A new tool llvm-dlltool has been added to create short import libraries from GNU style definition files. The tool utilizes the PE COFF SPEC Import Library Format and PE COFF Auxiliary Weak Externals Format to achieve compatibility with LLD and MSVC LINK.
2017-12-01 20:22:12 +01:00
SmallString<256> path(StringRef(LLVM_TOOLS_INSTALL_DIR));
sys::fs::make_absolute(ActivePrefix, path);
ActiveBinDir = path.str();
- ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
+ ActiveLibDir = "@PREFIX@/lib/libLLVM";
ActiveCMakeDir = ActiveLibDir + "/cmake/llvm";
ActiveIncludeOption = "-I" + ActiveIncludeDir;
}
llvm: updated to 5.0.0 5.0.0: Non-comprehensive list of changes in this release * LLVM’s WeakVH has been renamed to WeakTrackingVH and a new WeakVH has been introduced. The new WeakVH nulls itself out on deletion, but does not track values across RAUW. * A new library named BinaryFormat has been created which holds a collection of code which previously lived in Support. This includes the file_magic structure and identify_magic functions, as well as all the structure and type definitions for DWARF, ELF, COFF, WASM, and MachO file formats. * The tool llvm-pdbdump has been renamed llvm-pdbutil to better reflect its nature as a general purpose PDB manipulation / diagnostics tool that does more than just dumping contents. * The BBVectorize pass has been removed. It was fully replaced and no longer used back in 2014 but we didn’t get around to removing it. Now it is gone. The SLP vectorizer is the suggested non-loop vectorization pass. * A new tool opt-viewer.py has been added to visualize optimization remarks in HTML. The tool processes the YAML files produced by clang with the -fsave-optimization-record option. * A new CMake macro LLVM_REVERSE_ITERATION has been added. If enabled, all supported unordered LLVM containers would be iterated in reverse order. This is useful for uncovering non-determinism caused by iteration of unordered containers. Currently, it supports reverse iteration of SmallPtrSet and DenseMap. * A new tool llvm-dlltool has been added to create short import libraries from GNU style definition files. The tool utilizes the PE COFF SPEC Import Library Format and PE COFF Auxiliary Weak Externals Format to achieve compatibility with LLD and MSVC LINK.
2017-12-01 20:22:12 +01:00
@@ -372,14 +372,14 @@ int main(int argc, char **argv) {
StaticDir = ActiveLibDir;
} else if (HostTriple.isOSDarwin()) {
SharedExt = "dylib";
- SharedVersionedExt = LLVM_DYLIB_VERSION ".dylib";
+ SharedVersionedExt = ".dylib";
StaticExt = "a";
StaticDir = SharedDir = ActiveLibDir;
StaticPrefix = SharedPrefix = "lib";
} else {
// default to the unix values:
SharedExt = "so";
- SharedVersionedExt = LLVM_DYLIB_VERSION ".so";
+ SharedVersionedExt = "-@LLVM_MAJOR_MINOR@.so";
StaticExt = "a";
StaticDir = SharedDir = ActiveLibDir;
StaticPrefix = SharedPrefix = "lib";
llvm: updated to 5.0.0 5.0.0: Non-comprehensive list of changes in this release * LLVM’s WeakVH has been renamed to WeakTrackingVH and a new WeakVH has been introduced. The new WeakVH nulls itself out on deletion, but does not track values across RAUW. * A new library named BinaryFormat has been created which holds a collection of code which previously lived in Support. This includes the file_magic structure and identify_magic functions, as well as all the structure and type definitions for DWARF, ELF, COFF, WASM, and MachO file formats. * The tool llvm-pdbdump has been renamed llvm-pdbutil to better reflect its nature as a general purpose PDB manipulation / diagnostics tool that does more than just dumping contents. * The BBVectorize pass has been removed. It was fully replaced and no longer used back in 2014 but we didn’t get around to removing it. Now it is gone. The SLP vectorizer is the suggested non-loop vectorization pass. * A new tool opt-viewer.py has been added to visualize optimization remarks in HTML. The tool processes the YAML files produced by clang with the -fsave-optimization-record option. * A new CMake macro LLVM_REVERSE_ITERATION has been added. If enabled, all supported unordered LLVM containers would be iterated in reverse order. This is useful for uncovering non-determinism caused by iteration of unordered containers. Currently, it supports reverse iteration of SmallPtrSet and DenseMap. * A new tool llvm-dlltool has been added to create short import libraries from GNU style definition files. The tool utilizes the PE COFF SPEC Import Library Format and PE COFF Auxiliary Weak Externals Format to achieve compatibility with LLD and MSVC LINK.
2017-12-01 20:22:12 +01:00
@@ -392,7 +392,7 @@ int main(int argc, char **argv) {
bool DyLibExists = false;
const std::string DyLibName =
- (SharedPrefix + "LLVM-" + SharedVersionedExt).str();
+ (SharedPrefix + "LLVM" + SharedVersionedExt).str();
// If LLVM_LINK_DYLIB is ON, the single shared library will be returned
// for "--libs", etc, if they exist. This behaviour can be overridden with
llvm: updated to 5.0.0 5.0.0: Non-comprehensive list of changes in this release * LLVM’s WeakVH has been renamed to WeakTrackingVH and a new WeakVH has been introduced. The new WeakVH nulls itself out on deletion, but does not track values across RAUW. * A new library named BinaryFormat has been created which holds a collection of code which previously lived in Support. This includes the file_magic structure and identify_magic functions, as well as all the structure and type definitions for DWARF, ELF, COFF, WASM, and MachO file formats. * The tool llvm-pdbdump has been renamed llvm-pdbutil to better reflect its nature as a general purpose PDB manipulation / diagnostics tool that does more than just dumping contents. * The BBVectorize pass has been removed. It was fully replaced and no longer used back in 2014 but we didn’t get around to removing it. Now it is gone. The SLP vectorizer is the suggested non-loop vectorization pass. * A new tool opt-viewer.py has been added to visualize optimization remarks in HTML. The tool processes the YAML files produced by clang with the -fsave-optimization-record option. * A new CMake macro LLVM_REVERSE_ITERATION has been added. If enabled, all supported unordered LLVM containers would be iterated in reverse order. This is useful for uncovering non-determinism caused by iteration of unordered containers. Currently, it supports reverse iteration of SmallPtrSet and DenseMap. * A new tool llvm-dlltool has been added to create short import libraries from GNU style definition files. The tool utilizes the PE COFF SPEC Import Library Format and PE COFF Auxiliary Weak Externals Format to achieve compatibility with LLD and MSVC LINK.
2017-12-01 20:22:12 +01:00
@@ -493,7 +493,7 @@ int main(int argc, char **argv) {
OS << ActiveIncludeOption << ' ' << LLVM_CXXFLAGS << '\n';
} else if (Arg == "--ldflags") {
OS << ((HostTriple.isWindowsMSVCEnvironment()) ? "-LIBPATH:" : "-L")
- << ActiveLibDir << ' ' << LLVM_LDFLAGS << '\n';
+ << ActiveLibDir << " @COMPILER_RPATH_FLAG@" << ActiveLibDir << ' ' << LLVM_LDFLAGS << '\n';
} else if (Arg == "--system-libs") {
PrintSystemLibs = true;
} else if (Arg == "--libs") {