Skip to content

Commit dd512c5

Browse files
committed
Initial commit
0 parents  commit dd512c5

File tree

6,636 files changed

+1859446
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,636 files changed

+1859446
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Prebuilt LLVM Libraries
2+
3+
This repo contains prebuilt LLVM 7.1.0 Libraries for Windows and Linux.
4+
5+
These libraries are required by rustc_codegen_nvvm, however, LLVM is difficult to
6+
build, especially older versions of LLVM. Therefore, we ship prebuilt compressed
7+
7zip files which contain:
8+
- `include/llvm` and `include/llvm-c`, these are required for building the LLVM shim.
9+
- `lib/*`, these are the actual `.lib` files we tell rustc to include when building the codegen.
10+
11+
We do not include binaries because they aren't needed for us.
12+
13+
The prebuilt libraries are pulled from the following locations:
14+
- linux-aarch64: LLVM prebuilt downloads 7.1.0, AArch64 Linux
15+
- linux-x86_64: LLVM prebuilt downloads 7.1.0, Ubuntu 14.04
16+
- linux-x86: LLVM prebuilt downloads 7.1.0, FreeBSD11 i386
17+
- windows-x86_64: https://github.com/vovkos/llvm-package-windows llvm-7.1.0-windows-amd64-msvc15-msvcrt
18+
- windows-x86: https://github.com/vovkos/llvm-package-windows llvm-7.1.0-windows-x86-msvc15-msvcrt
19+
20+
We do not ship mac binaries because currently we only support CUDA 11 and up, and CUDA dropped MacOS support.

prebuilt/linux-aarch64.7z

15.9 MB
Binary file not shown.

prebuilt/linux-x86.7z

16.9 MB
Binary file not shown.

prebuilt/linux-x86_64.7z

17.4 MB
Binary file not shown.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*===-- llvm-c/Analysis.h - Analysis Library C Interface --------*- C++ -*-===*\
2+
|* *|
3+
|* The LLVM Compiler Infrastructure *|
4+
|* *|
5+
|* This file is distributed under the University of Illinois Open Source *|
6+
|* License. See LICENSE.TXT for details. *|
7+
|* *|
8+
|*===----------------------------------------------------------------------===*|
9+
|* *|
10+
|* This header declares the C interface to libLLVMAnalysis.a, which *|
11+
|* implements various analyses of the LLVM IR. *|
12+
|* *|
13+
|* Many exotic languages can interoperate with C code but have a harder time *|
14+
|* with C++ due to name mangling. So in addition to C, this interface enables *|
15+
|* tools written in such languages. *|
16+
|* *|
17+
\*===----------------------------------------------------------------------===*/
18+
19+
#ifndef LLVM_C_ANALYSIS_H
20+
#define LLVM_C_ANALYSIS_H
21+
22+
#include "llvm-c/Types.h"
23+
24+
#ifdef __cplusplus
25+
extern "C" {
26+
#endif
27+
28+
/**
29+
* @defgroup LLVMCAnalysis Analysis
30+
* @ingroup LLVMC
31+
*
32+
* @{
33+
*/
34+
35+
typedef enum {
36+
LLVMAbortProcessAction, /* verifier will print to stderr and abort() */
37+
LLVMPrintMessageAction, /* verifier will print to stderr and return 1 */
38+
LLVMReturnStatusAction /* verifier will just return 1 */
39+
} LLVMVerifierFailureAction;
40+
41+
42+
/* Verifies that a module is valid, taking the specified action if not.
43+
Optionally returns a human-readable description of any invalid constructs.
44+
OutMessage must be disposed with LLVMDisposeMessage. */
45+
LLVMBool LLVMVerifyModule(LLVMModuleRef M, LLVMVerifierFailureAction Action,
46+
char **OutMessage);
47+
48+
/* Verifies that a single function is valid, taking the specified action. Useful
49+
for debugging. */
50+
LLVMBool LLVMVerifyFunction(LLVMValueRef Fn, LLVMVerifierFailureAction Action);
51+
52+
/* Open up a ghostview window that displays the CFG of the current function.
53+
Useful for debugging. */
54+
void LLVMViewFunctionCFG(LLVMValueRef Fn);
55+
void LLVMViewFunctionCFGOnly(LLVMValueRef Fn);
56+
57+
/**
58+
* @}
59+
*/
60+
61+
#ifdef __cplusplus
62+
}
63+
#endif
64+
65+
#endif
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
/*===-- llvm-c/BitReader.h - BitReader Library C Interface ------*- C++ -*-===*\
2+
|* *|
3+
|* The LLVM Compiler Infrastructure *|
4+
|* *|
5+
|* This file is distributed under the University of Illinois Open Source *|
6+
|* License. See LICENSE.TXT for details. *|
7+
|* *|
8+
|*===----------------------------------------------------------------------===*|
9+
|* *|
10+
|* This header declares the C interface to libLLVMBitReader.a, which *|
11+
|* implements input of the LLVM bitcode format. *|
12+
|* *|
13+
|* Many exotic languages can interoperate with C code but have a harder time *|
14+
|* with C++ due to name mangling. So in addition to C, this interface enables *|
15+
|* tools written in such languages. *|
16+
|* *|
17+
\*===----------------------------------------------------------------------===*/
18+
19+
#ifndef LLVM_C_BITREADER_H
20+
#define LLVM_C_BITREADER_H
21+
22+
#include "llvm-c/Types.h"
23+
24+
#ifdef __cplusplus
25+
extern "C" {
26+
#endif
27+
28+
/**
29+
* @defgroup LLVMCBitReader Bit Reader
30+
* @ingroup LLVMC
31+
*
32+
* @{
33+
*/
34+
35+
/* Builds a module from the bitcode in the specified memory buffer, returning a
36+
reference to the module via the OutModule parameter. Returns 0 on success.
37+
Optionally returns a human-readable error message via OutMessage.
38+
39+
This is deprecated. Use LLVMParseBitcode2. */
40+
LLVMBool LLVMParseBitcode(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule,
41+
char **OutMessage);
42+
43+
/* Builds a module from the bitcode in the specified memory buffer, returning a
44+
reference to the module via the OutModule parameter. Returns 0 on success. */
45+
LLVMBool LLVMParseBitcode2(LLVMMemoryBufferRef MemBuf,
46+
LLVMModuleRef *OutModule);
47+
48+
/* This is deprecated. Use LLVMParseBitcodeInContext2. */
49+
LLVMBool LLVMParseBitcodeInContext(LLVMContextRef ContextRef,
50+
LLVMMemoryBufferRef MemBuf,
51+
LLVMModuleRef *OutModule, char **OutMessage);
52+
53+
LLVMBool LLVMParseBitcodeInContext2(LLVMContextRef ContextRef,
54+
LLVMMemoryBufferRef MemBuf,
55+
LLVMModuleRef *OutModule);
56+
57+
/** Reads a module from the specified path, returning via the OutMP parameter
58+
a module provider which performs lazy deserialization. Returns 0 on success.
59+
Optionally returns a human-readable error message via OutMessage.
60+
This is deprecated. Use LLVMGetBitcodeModuleInContext2. */
61+
LLVMBool LLVMGetBitcodeModuleInContext(LLVMContextRef ContextRef,
62+
LLVMMemoryBufferRef MemBuf,
63+
LLVMModuleRef *OutM, char **OutMessage);
64+
65+
/** Reads a module from the specified path, returning via the OutMP parameter a
66+
* module provider which performs lazy deserialization. Returns 0 on success. */
67+
LLVMBool LLVMGetBitcodeModuleInContext2(LLVMContextRef ContextRef,
68+
LLVMMemoryBufferRef MemBuf,
69+
LLVMModuleRef *OutM);
70+
71+
/* This is deprecated. Use LLVMGetBitcodeModule2. */
72+
LLVMBool LLVMGetBitcodeModule(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM,
73+
char **OutMessage);
74+
75+
LLVMBool LLVMGetBitcodeModule2(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM);
76+
77+
/**
78+
* @}
79+
*/
80+
81+
#ifdef __cplusplus
82+
}
83+
#endif
84+
85+
#endif
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*===-- llvm-c/BitWriter.h - BitWriter Library C Interface ------*- C++ -*-===*\
2+
|* *|
3+
|* The LLVM Compiler Infrastructure *|
4+
|* *|
5+
|* This file is distributed under the University of Illinois Open Source *|
6+
|* License. See LICENSE.TXT for details. *|
7+
|* *|
8+
|*===----------------------------------------------------------------------===*|
9+
|* *|
10+
|* This header declares the C interface to libLLVMBitWriter.a, which *|
11+
|* implements output of the LLVM bitcode format. *|
12+
|* *|
13+
|* Many exotic languages can interoperate with C code but have a harder time *|
14+
|* with C++ due to name mangling. So in addition to C, this interface enables *|
15+
|* tools written in such languages. *|
16+
|* *|
17+
\*===----------------------------------------------------------------------===*/
18+
19+
#ifndef LLVM_C_BITWRITER_H
20+
#define LLVM_C_BITWRITER_H
21+
22+
#include "llvm-c/Types.h"
23+
24+
#ifdef __cplusplus
25+
extern "C" {
26+
#endif
27+
28+
/**
29+
* @defgroup LLVMCBitWriter Bit Writer
30+
* @ingroup LLVMC
31+
*
32+
* @{
33+
*/
34+
35+
/*===-- Operations on modules ---------------------------------------------===*/
36+
37+
/** Writes a module to the specified path. Returns 0 on success. */
38+
int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path);
39+
40+
/** Writes a module to an open file descriptor. Returns 0 on success. */
41+
int LLVMWriteBitcodeToFD(LLVMModuleRef M, int FD, int ShouldClose,
42+
int Unbuffered);
43+
44+
/** Deprecated for LLVMWriteBitcodeToFD. Writes a module to an open file
45+
descriptor. Returns 0 on success. Closes the Handle. */
46+
int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int Handle);
47+
48+
/** Writes a module to a new memory buffer and returns it. */
49+
LLVMMemoryBufferRef LLVMWriteBitcodeToMemoryBuffer(LLVMModuleRef M);
50+
51+
/**
52+
* @}
53+
*/
54+
55+
#ifdef __cplusplus
56+
}
57+
#endif
58+
59+
#endif
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/*===-- llvm-c/Comdat.h - Module Comdat C Interface -------------*- C++ -*-===*\
2+
|* *|
3+
|* The LLVM Compiler Infrastructure *|
4+
|* *|
5+
|* This file is distributed under the University of Illinois Open Source *|
6+
|* License. See LICENSE.TXT for details. *|
7+
|* *|
8+
|*===----------------------------------------------------------------------===*|
9+
|* *|
10+
|* This file defines the C interface to COMDAT. *|
11+
|* *|
12+
\*===----------------------------------------------------------------------===*/
13+
14+
#ifndef LLVM_C_COMDAT_H
15+
#define LLVM_C_COMDAT_H
16+
17+
#include "llvm-c/Types.h"
18+
19+
#ifdef __cplusplus
20+
extern "C" {
21+
#endif
22+
23+
typedef enum {
24+
LLVMAnyComdatSelectionKind, ///< The linker may choose any COMDAT.
25+
LLVMExactMatchComdatSelectionKind, ///< The data referenced by the COMDAT must
26+
///< be the same.
27+
LLVMLargestComdatSelectionKind, ///< The linker will choose the largest
28+
///< COMDAT.
29+
LLVMNoDuplicatesComdatSelectionKind, ///< No other Module may specify this
30+
///< COMDAT.
31+
LLVMSameSizeComdatSelectionKind ///< The data referenced by the COMDAT must be
32+
///< the same size.
33+
} LLVMComdatSelectionKind;
34+
35+
/**
36+
* Return the Comdat in the module with the specified name. It is created
37+
* if it didn't already exist.
38+
*
39+
* @see llvm::Module::getOrInsertComdat()
40+
*/
41+
LLVMComdatRef LLVMGetOrInsertComdat(LLVMModuleRef M, const char *Name);
42+
43+
/**
44+
* Get the Comdat assigned to the given global object.
45+
*
46+
* @see llvm::GlobalObject::getComdat()
47+
*/
48+
LLVMComdatRef LLVMGetComdat(LLVMValueRef V);
49+
50+
/**
51+
* Assign the Comdat to the given global object.
52+
*
53+
* @see llvm::GlobalObject::setComdat()
54+
*/
55+
void LLVMSetComdat(LLVMValueRef V, LLVMComdatRef C);
56+
57+
/*
58+
* Get the conflict resolution selection kind for the Comdat.
59+
*
60+
* @see llvm::Comdat::getSelectionKind()
61+
*/
62+
LLVMComdatSelectionKind LLVMGetComdatSelectionKind(LLVMComdatRef C);
63+
64+
/*
65+
* Set the conflict resolution selection kind for the Comdat.
66+
*
67+
* @see llvm::Comdat::setSelectionKind()
68+
*/
69+
void LLVMSetComdatSelectionKind(LLVMComdatRef C, LLVMComdatSelectionKind Kind);
70+
71+
#ifdef __cplusplus
72+
}
73+
#endif
74+
75+
#endif

0 commit comments

Comments
 (0)