You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Welcome to the LLVM project in the openEuler community! This warehouse is the downstream warehouse of [llvm-project](https://github.com/llvm/llvm-project).
4
4
5
-
This repository contains the source code for LLVM, a toolkit for the
6
-
construction of highly optimized compilers, optimizers, and run-time
7
-
environments.
5
+
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
8
6
9
-
The LLVM project has multiple components. The core of the project is
10
-
itself called "LLVM". This contains all of the tools, libraries, and header
11
-
files needed to process intermediate representations and convert them into
12
-
object files. Tools include an assembler, disassembler, bitcode analyzer, and
13
-
bitcode optimizer.
7
+
The LLVM project has multiple components. The core of the project is itself called "LLVM". This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
14
8
15
-
C-like languages use the [Clang](http://clang.llvm.org/) frontend. This
16
-
component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode
17
-
-- and from there into object files, using LLVM.
9
+
C-like languages use the [Clang](https://clang.llvm.org/) frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
18
10
19
-
Other components include:
20
-
the [libc++ C++ standard library](https://libcxx.llvm.org),
21
-
the [LLD linker](https://lld.llvm.org), and more.
11
+
Other components include: the [libc++ C++ standard library](https://libcxx.llvm.org/), the [LLD linker](https://lld.llvm.org/), and more.
22
12
23
-
## Getting the Source Code and Building LLVM
13
+
## 2. Construction Guide
24
14
25
-
Consult the
26
-
[Getting Started with LLVM](https://llvm.org/docs/GettingStarted.html#getting-the-source-code-and-building-llvm)
27
-
page for information on building and running LLVM.
15
+
You can use `git` to download the source code, and then use the `build.sh` script to build the LLVM in one-click mode. There are two build modes: `build with command line` and `build with container`.
28
16
29
-
For information on how to contribute to the LLVM project, please take a look at
30
-
the [Contributing to LLVM](https://llvm.org/docs/Contributing.html) guide.
17
+
### 2.1. Build with command line directly
31
18
32
-
## Getting in touch
19
+
You are advised to use the `openEuler` for building. If you use other operating systems, you are advised to use the containerized building mode.
33
20
34
-
Join the [LLVM Discourse forums](https://discourse.llvm.org/), [Discord
35
-
chat](https://discord.gg/xS7Z362), or #llvm IRC channel on
36
-
[OFTC](https://oftc.net/).
21
+
Ensure that the dependency software packages are installed. You can run the following command to install the software packages:
37
22
38
-
The LLVM project has adopted a [code of conduct](https://llvm.org/docs/CodeOfConduct.html) for
39
-
participants to all modes of communication within the project.
23
+
`` `
24
+
yum install -y gcc g++ make cmake openssl-devel python3 \
You can run the `./build.sh -h` command to view the build options supported by the current project. Run the following command to perform a one-click build:
29
+
30
+
`` `
31
+
./build.sh -r -b release -X X86 -j 8
32
+
`` `
33
+
34
+
### 2.2 Build with container
35
+
36
+
The openEuler LLVM project provides a containerized building mode to solve the problems of build failures and binary differences of build products caused by development environment differences. Thanks to the [openEuler container image project](https://gitee.com/openeuler/openeuler-docker-images), the [llvm-build-deps container image](https://gitee.com/openeuler/openeuler-docker-images/tree/master/llvm-build-deps) is created in advance. Developers can enable containerized builds using the `-C` option of the `build.sh` script. For example:
* The Docker application must be correctly installed in the development environment.
44
+
* The user is added to the docker user group so that the `sudo` command is not required when the `build.sh` script executes the docker command. You can run the following command to add the current user to the docker user group:
45
+
46
+
`` `
47
+
sudo usermod -aG docker ${USER}
48
+
`` `
49
+
50
+
Note: When you perform a containerized build for the first time, the script automatically pulls the `llvm-build-deps container image` from the image repository.
51
+
52
+
## 3. Contribution guidance
53
+
54
+
1. Fork This Warehouse
55
+
2. Create the Feat_xxx branch.
56
+
3. Submit the code.
57
+
4. Create a Pull Request.
58
+
59
+
## 4. Discussion and help-seeking
60
+
61
+
### 4.1 Upstream Community
62
+
* Join the [Discourse Forum](https://discourse.llvm.org/) .
63
+
64
+
*[Code of Conduct](https://llvm.org/docs/CodeOfConduct.html) for Community Participants.
65
+
66
+
### 4.1. Compiler SIG of the openEuler community
67
+
There are several ways:
68
+
* Subscribe to the [Compiler SIG mailing list](https://mailweb.openeuler.org/postorius/lists/[email protected]/)
69
+
* Post a discussion at the [openEuler forum](https://forum.openeuler.org/?locale=zh_CN).
70
+
* WeChat communication group: Please add the WeChat name `Compiler_Assistant` first.
0 commit comments