使用 LLVM 15.0.7 Toolset
安装和使用 LLVM 15.0.7 Toolset
摘要
使开源包含更多 复制链接链接已复制到粘贴板!
红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。我们从这四个术语开始:master、slave、黑名单和白名单。由于此项工作十分艰巨,这些更改将在即将推出的几个发行版本中逐步实施。有关更多详情,请参阅我们的首席技术官 Chris Wright 提供的消息。
第 1 章 LLVM Toolset 复制链接链接已复制到粘贴板!
LLVM Toolset 是 Red Hat Enterprise Linux (RHEL)上开发人员的产品。它提供了 LLVM 编译器基础架构框架、Clang 编译器用于 C 和 C++ 语言、LLDB 调试器以及用于代码分析的相关工具。
LLVM Toolset 作为 Red Hat Enterprise Linux 7 的 Red Hat Developer Tools 的一部分发布。对于 Red Hat Enterprise Linux 8,LLVM Toolset 作为一个模块提供。LLVM Toolset 作为 Red Hat Enterprise Linux 9 的软件包提供。
1.1. LLVM Toolset 组件 复制链接链接已复制到粘贴板!
以下组件作为 LLVM Toolset 的一部分提供:
| Name | 版本 | Description |
|---|---|---|
| clang | 15.0.7 | C 和 C++ 的 LLVM 编译器前端。 |
| lldb | 15.0.7 | 使用 LLVM 的部分 C 和 C++ 调试器。 |
| compiler-rt | 15.0.7 | LLVM 和 Clang 的运行时库。 |
| llvm | 15.0.7 | 一组模块化和可重复使用的编译器和工具链技术。 |
| libomp | 15.0.7 | 用于并行编程的 Open MP API 规格的库。 |
| lld | 15.0.7 | LLVM 链接器。 |
| python-lit | 15.0.7 | 用于 LLVM 和 Clang 测试套件的软件测试工具。 |
CMake 构建管理器不是 LLVM Toolset 的一部分。在 Red Hat Enterprise Linux 7 中,CMake 作为单独的软件包提供。在 Red Hat Enterprise Linux 8 中,CMake 在系统存储库中可用。在 Red Hat Enterprise Linux 9 中,CMake 包括在系统存储库中。有关如何安装 CMake 的更多信息,请参阅在 Red Hat Enterprise Linux 上安装 CMake。
1.2. LLVM Toolset 兼容性 复制链接链接已复制到粘贴板!
在以下构架中,Red Hat Enterprise Linux 7 和 Red Hat Enterprise Linux 8 和 Red Hat Enterprise Linux 9 提供了 LLVM Toolset:
- AMD 和 Intel 64 位
- 64 位 ARM (RHEL 8 和 RHEL 9)
- IBM Power Systems, Little Endian
- IBM Power Systems,Mintle Endian (仅限 RHEL 7)
- 64-bit IBM Z
1.3. 在 Red Hat Enterprise Linux 7 上访问 LLVM Toolset 复制链接链接已复制到粘贴板!
为了能够在 Red Hat Enterprise Linux 7 上安装 LLVM Toolset,您必须访问并启用 Red Hat Developer Tools 和 Red Hat Software Collections 软件仓库。
如果这些软件仓库已附加到您的系统,请参阅安装 LLVM Toolset。
流程
运行以下命令安装
Wget:yum install wget
# yum install wgetCopy to Clipboard Copied! Toggle word wrap Toggle overflow 运行以下命令下载最新的订阅数据:
subscription-manager refresh
# subscription-manager refreshCopy to Clipboard Copied! Toggle word wrap Toggle overflow 运行以下命令注册您的系统:
subscription-manager register
# subscription-manager registerCopy to Clipboard Copied! Toggle word wrap Toggle overflow 要使用图形用户界面(GUI) 注册您的系统,请按照注册和取消注册系统 指南进行操作。
显示所有可用订阅列表,并运行以下命令来识别池 ID:
subscription-manager list --available
# subscription-manager list --availableCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
在以池 ID 开头的行中找到
池 ID。 运行以下命令,将提供对
Red Hat Developer Tools存储库的访问权限的订阅附加:subscription-manager attach --pool=<pool ID from the subscription>
# subscription-manager attach --pool=<pool ID from the subscription>Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
将 subscription > 中的 < pool ID 替换为您在上一步中标识的池 ID。
-
运行以下命令验证哪些订阅是否已附加到您的系统:
sudo subscription-manager list --consumed
# sudo subscription-manager list --consumedCopy to Clipboard Copied! Toggle word wrap Toggle overflow 运行以下命令启用
rhel-7-变体-devtools-rpms存储库:subscription-manager repos --enable rhel-7-<variant>-devtools-rpms
# subscription-manager repos --enable rhel-7-<variant>-devtools-rpmsCopy to Clipboard Copied! Toggle word wrap Toggle overflow 将
<variant> 替换为您的 Red Hat Enterprise Linux 系统变体:server或workstation。使用
server访问广泛的开发工具。
运行以下命令启用
rhel-variant-RHSCL-7-rpms存储库:subscription-manager repos --enable rhel-<variant>-rhscl-7-rpms
# subscription-manager repos --enable rhel-<variant>-rhscl-7-rpmsCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
将
<variant> 替换为您的 Red Hat Enterprise Linux 系统变体:server或workstation。
-
将
运行以下命令,在您的系统中添加 Red Hat Developer Tools GPG 密钥:
cd /etc/pki/rpm-gpg wget -O RPM-GPG-KEY-redhat-devel https://www.redhat.com/security/data/a5787476.txt rpm --import RPM-GPG-KEY-redhat-devel
# cd /etc/pki/rpm-gpg # wget -O RPM-GPG-KEY-redhat-devel https://www.redhat.com/security/data/a5787476.txt # rpm --import RPM-GPG-KEY-redhat-develCopy to Clipboard Copied! Toggle word wrap Toggle overflow
1.4. 安装 LLVM Toolset 复制链接链接已复制到粘贴板!
完成以下步骤,安装 LLVM Toolset,包括所有开发和调试工具以及依赖软件包。
先决条件
-
在 Red Hat Enterprise Linux 7 中,提供对 Red Hat Developer Tools 内容集合的访问权限的订阅已附加到您的系统中。
要附加订阅,请参阅 获取 Red Hat Enterprise Linux 7 中的 LLVM Toolset 的访问权限。 - 已安装所有可用的 Red Hat Enterprise Linux 更新。
流程
在 Red Hat Enterprise Linux 7 中,运行以下命令安装 llvm-toolset-15.0 集合:
yum install llvm-toolset-15.0
# yum install llvm-toolset-15.0
这不会在 Red Hat Enterprise Linux 7 上安装 LLDB 调试器。要安装 LLDB 调试器,请运行:
yum install llvm-toolset-15.0-lldb
# yum install llvm-toolset-15.0-lldb
在 Red Hat Enterprise Linux 8 中,运行以下命令安装 llvm-toolset 模块:
yum module install llvm-toolset
# yum module install llvm-toolset
这不会在 Red Hat Enterprise Linux 8 上安装 LLDB 调试器或 python3-lit 软件包。要安装 LLDB 调试器和 python3-lit 软件包,请运行:
yum install lldb python3-lit
# yum install lldb python3-lit
在 Red Hat Enterprise Linux 9 中,运行以下命令安装 llvm-toolset 软件包:
dnf install llvm-toolset
# dnf install llvm-toolset
这不会在 Red Hat Enterprise Linux 9 上安装 LLDB 调试器或 python3-lit 软件包。要安装 LLDB 调试器和 python3-lit 软件包,请运行:
dnf install lldb python3-lit
# dnf install lldb python3-lit
1.5. 安装 CMake 构建管理器 复制链接链接已复制到粘贴板!
CMake 构建管理器是一种工具,它独立于您的编译器管理源代码的构建过程。Cmake 可以生成原生构建环境,以编译源代码、创建库、生成打包程序和构建可执行文件。
完成以下步骤以安装 CMake 构建管理器。
先决条件
-
已安装 LLVM Toolset。
如需更多信息,请参阅安装 LLVM Toolset。
流程
要安装 CMake,请运行以下命令:
- 在 Red Hat Enterprise Linux 7 上:
yum install llvm-toolset-15.0-cmake
# yum install llvm-toolset-15.0-cmake
- 在 Red Hat Enterprise Linux 8 中:
yum install cmake
# yum install cmake
- 在 Red Hat Enterprise Linux 9 中:
dnf install cmake
# dnf install cmake
1.6. 安装 LLVM Toolset 文档 复制链接链接已复制到粘贴板!
您可以在本地系统中安装 LLVM Toolset 的文档。
先决条件
-
已安装 LLVM Toolset。
如需更多信息,请参阅安装 LLVM Toolset。
流程
要安装 llvm-doc 软件包,请运行以下命令:
在 Red Hat Enterprise Linux 7 上:
yum install llvm-toolset-15.0-llvm-doc
# yum install llvm-toolset-15.0-llvm-docCopy to Clipboard Copied! Toggle word wrap Toggle overflow 您可以在以下路径中找到文档:
/opt/rh/llvm-toolset-15.0/root/usr/share/doc/llvm-toolset-15.0-llvm-15.0.7/html/index.html。在 Red Hat Enterprise Linux 8 中:
yum install llvm-doc
# yum install llvm-docCopy to Clipboard Copied! Toggle word wrap Toggle overflow 您可以在以下路径中找到文档:
/usr/share/doc/llvm/html/index.html。在 Red Hat Enterprise Linux 9 中:
dnf install llvm-doc
# dnf install llvm-docCopy to Clipboard Copied! Toggle word wrap Toggle overflow 您可以在以下路径中找到文档:
/usr/share/doc/llvm/html/index.html。
1.7. 安装 CMake 文档 复制链接链接已复制到粘贴板!
您可以在本地系统中安装 CMake 构建管理器的文档。
先决条件
-
已安装了 cmake。
如需更多信息 ,请参阅安装 CMake 构建管理器。
流程
要安装 cmake-doc 软件包,请运行以下命令:
在 Red Hat Enterprise Linux 7 上:
yum install llvm-toolset-15.0-cmake-doc
# yum install llvm-toolset-15.0-cmake-docCopy to Clipboard Copied! Toggle word wrap Toggle overflow 您可以在以下路径中找到文档:Opt
/rh/llvm-toolset-15.0/root/usr/share/doc/llvm-toolset-15.0-cmake-3.18.2/html/index.html。在 Red Hat Enterprise Linux 8 中:
yum install cmake-doc
# yum install cmake-docCopy to Clipboard Copied! Toggle word wrap Toggle overflow 您可以在以下路径中找到文档:
/usr/share/doc/cmake/html/index.html。在 Red Hat Enterprise Linux 9 中:
dnf install cmake-doc
# dnf install cmake-docCopy to Clipboard Copied! Toggle word wrap Toggle overflow 您可以在以下路径中找到文档:
/usr/share/doc/cmake/html/index.html。
第 2 章 Clang 编译器 复制链接链接已复制到粘贴板!
clang 是基于 C、C++、目标 C/C++、OpenCL 和 Cuda 的 LLVM 编译器前端。
LLVM 工具集随 Clang 15.0.7 一起分发。
2.1. 先决条件 复制链接链接已复制到粘贴板!
-
已安装 LLVM Toolset。
如需更多信息,请参阅安装 LLVM Toolset。
2.2. 编译源文件 复制链接链接已复制到粘贴板!
使用 Clang 编译器编译源文件以及编译语言源文件。clang 创建一个可执行文件,从而进行编译。为了调试代码,请通过在 Clang 命令中添加 -g 标志来启用调试信息。
要编译 C++ 程序,请使用 clang++ 而不是 clang。
流程
要编译您的程序,请运行以下命令:
在 Red Hat Enterprise Linux 7 上:
scl enable llvm-toolset-15.0 'clang -o -g <binary_file> <source_file>'
$ scl enable llvm-toolset-15.0 'clang -o -g <binary_file> <source_file>'Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
将
<binary_file> 替换为输出文件所需的名称,<source_file> 替换为您的源文件的名称。
-
将
在 Red Hat Enterprise Linux 8 中:
clang -o -g <binary_file> <source_file>
$ clang -o -g <binary_file> <source_file>Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
将
<binary_file> 替换为输出文件所需的名称,<source_file> 替换为您的源文件的名称。
-
将
在 Red Hat Enterprise Linux 9 中:
clang -o -g <binary_file> <source_file>
$ clang -o -g <binary_file> <source_file>Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
将
<binary_file> 替换为输出文件所需的名称,<source_file> 替换为您的源文件的名称。
-
将
2.3. 运行安装程序 复制链接链接已复制到粘贴板!
Clang 编译器创建可执行二进制文件,从而进行编译。完成以下步骤以执行此文件并运行安装程序。
先决条件
-
您的程序已编译。
有关如何编译程序的更多信息,请参阅 编译源文件。
流程
要运行程序,请在包含可执行文件的目录中运行:
./<binary_file>
$ ./<binary_file>
-
将
<binary_file> 替换为可执行文件的名称。
2.4. 将目标文件链接在一起 复制链接链接已复制到粘贴板!
通过将目标文件链接在一起,您只能编译包含更改的源文件,而不是整个项目。
当您处理由多个源文件组成的项目时,请使用 Clang 编译器为每个源文件编译对象文件。在下一步中,将这些目标文件链接在一起。clang 会自动生成一个包含链接目标文件的可执行文件。编译后,将目标文件再次链接在一起。
要编译 C++ 程序,请使用 clang++ 而不是 clang。
流程
要将源文件编译到目标文件中,请运行以下命令:
在 Red Hat Enterprise Linux 7 上:
scl enable llvm-toolset-15.0 'clang -o <object_file> -c <source_file>'
$ scl enable llvm-toolset-15.0 'clang -o <object_file> -c <source_file>'Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
将
<object_file> 替换为对象文件所需的名称,<source_file> 替换为您的源文件的名称。
-
将
在 Red Hat Enterprise Linux 8 中:
clang -o <object_file> -c <source_file>
$ clang -o <object_file> -c <source_file>Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
将
<object_file> 替换为对象文件所需的名称,<source_file> 替换为您的源文件的名称。
-
将
在 Red Hat Enterprise Linux 9 中:
clang -o <object_file> -c <source_file>
$ clang -o <object_file> -c <source_file>Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
将
<object_file> 替换为对象文件所需的名称,<source_file> 替换为您的源文件的名称。
-
将
要将目标文件链接在一起,请运行以下命令:
在 Red Hat Enterprise Linux 7 上:
scl enable llvm-toolset-15.0 'clang -o <output_file> <object_file_0> <object_file_1>'
$ scl enable llvm-toolset-15.0 'clang -o <output_file> <object_file_0> <object_file_1>'Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
将
<output_file> 替换为输出文件所需的名称,将 <object_file> 替换为您要链接的对象文件的名称。
-
将
在 Red Hat Enterprise Linux 8 中:
clang -o <output_file> <object_file_0> <object_file_1>
$ clang -o <output_file> <object_file_0> <object_file_1>Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
将
<output_file> 替换为输出文件所需的名称,将 <object_file> 替换为您要链接的对象文件的名称。
-
将
在 Red Hat Enterprise Linux 9 中:
clang -o <output_file> <object_file_0> <object_file_1>
$ clang -o <output_file> <object_file_0> <object_file_1>Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
将
<output_file> 替换为输出文件所需的名称,将 <object_file> 替换为您要链接的对象文件的名称。
-
将
目前,某些库功能被静态链接到使用 LLVM Toolset 构建的应用程序,以支持它们在多个 Red Hat Enterprise Linux 版本上执行。这会造成小的安全风险。如果由于这个风险,红帽会在需要重建应用程序时发布安全勘误。
红帽建议不要静态地链接整个应用程序。
第 3 章 LLDB 调试器 复制链接链接已复制到粘贴板!
LLDB 调试器是用于调试 C 和 C++ 程序的命令行工具。使用 LLDB 检查正在调试的代码中的内存,控制代码的执行状态,并检测代码的特定部分的执行。
LLVM 工具集随 LLDB 15.0.7 一起分发。
3.1. 先决条件 复制链接链接已复制到粘贴板!
-
已安装 LLVM Toolset。
如需更多信息,请参阅安装 LLVM Toolset。 -
您的编译器被配置为创建调试信息。
有关配置 Clang 编译器的说明,请参阅 Clang Compiler 用户手册中的控制调试信息。http://clang.llvm.org/docs/UsersManual.html#controlling-debug-information
有关配置 GCC 编译器的说明,请参阅 Red Hat Developer Toolset 用户指南中的 准备用于调试的程序。
3.2. 启动调试会话 复制链接链接已复制到粘贴板!
使用 LLDB 启动交互式调试会话。
流程
要在您要调试的程序上运行 LLDB,请使用以下命令:
在 Red Hat Enterprise Linux 7 上:
scl enable llvm-toolset-15.0 'lldb <binary_file>'
$ scl enable llvm-toolset-15.0 'lldb <binary_file>'Copy to Clipboard Copied! Toggle word wrap Toggle overflow 将
<binary_file> 替换为编译的程序的名称。您已以交互模式启动 LLDB 调试会话。您的命令行终端现在显示默认提示
(lldb)。
在 Red Hat Enterprise Linux 8 中:
lldb <binary_file_name>
$ lldb <binary_file_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow 将
<binary_file> 替换为编译的程序的名称。您已以交互模式启动 LLDB 调试会话。您的命令行终端现在显示默认提示
(lldb)。
在 Red Hat Enterprise Linux 9 中:
lldb <binary_file>
$ lldb <binary_file>Copy to Clipboard Copied! Toggle word wrap Toggle overflow 将
<binary_file> 替换为编译的程序的名称。您已以交互模式启动 LLDB 调试会话。您的命令行终端现在显示默认提示
(lldb)。
- 要退出调试会话并返回到 shell 提示符,请运行以下命令:
(lldb) quit
(lldb) quit
3.3. 在调试会话中执行程序 复制链接链接已复制到粘贴板!
使用 LLDB 在调试会话期间执行您的程序。当达到第一个断点、发生错误或程序终止时,您的程序的执行会停止。
先决条件
-
您已启动交互式调试会话。
如需更多信息,请参阅使用 LLDB 启动调试会话。
流程
要执行您要调试的程序,请运行:
(lldb) run
(lldb) runCopy to Clipboard Copied! Toggle word wrap Toggle overflow 要执行使用特定参数调试的程序,请运行:
(lldb) run <argument>
(lldb) run <argument>Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
将< parameter > 替换为您要使用的命令行参数。
-
3.4. 使用断点 复制链接链接已复制到粘贴板!
使用断点在源代码中的集合点暂停程序的执行。
先决条件
-
您已启动交互式调试会话。
如需更多信息,请参阅使用 LLDB 启动调试会话。
流程
要在特定行中设置一个新的断点,请运行以下命令:
(lldb) breakpoint set --file <source_file_name> --line <line_number>
(lldb) breakpoint set --file <source_file_name> --line <line_number>Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
将
<source_file_name> 替换为源文件的名称,将 <line_number> 替换为您要设置断点的行号。
-
将
要在特定功能上设置断点,请运行以下命令:
(lldb) breakpoint set --name <function_name>
(lldb) breakpoint set --name <function_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
将 <
function_name> 替换为您要设置断点的函数名称。
-
将 <
要显示当前设置的断点列表,请运行以下命令:
(lldb) breakpoint list
(lldb) breakpoint listCopy to Clipboard Copied! Toggle word wrap Toggle overflow 要删除断点,请运行:
(lldb) breakpoint clear -f <source_file_name> -l <line_number>
(lldb) breakpoint clear -f <source_file_name> -l <line_number>Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
将
<source_file_name> 替换为源文件的名称,将 <line_number> 替换为您要删除的断点的行号。
-
将
要在到达断点后恢复程序的执行,请运行:
(lldb) continue
(lldb) continueCopy to Clipboard Copied! Toggle word wrap Toggle overflow 要跳过特定数量的断点,请运行以下命令:
(lldb) continue -i <breakpoints_to_skip>
(lldb) continue -i <breakpoints_to_skip>Copy to Clipboard Copied! Toggle word wrap Toggle overflow 将
<breakpoints_to_skip> 替换为您要跳过的断点数。注意要跳过循环,请设置 <
breakpoints_to_skip>,以匹配循环迭代计数。
3.5. 逐步浏览代码 复制链接链接已复制到粘贴板!
您可以使用 LLDB 逐步执行程序代码,以在行指针后仅执行一行代码。
先决条件
-
您已启动交互式调试会话。
如需更多信息,请参阅使用 LLDB 启动调试会话。
流程
逐步执行一行代码:
- 将行指针设置为您要执行的行。
运行以下命令:
(lldb) step
(lldb) stepCopy to Clipboard Copied! Toggle word wrap Toggle overflow
要逐步执行特定数量的代码:
- 将行指针设置为您要执行的行。
运行以下命令:
(lldb) step -c <number>
(lldb) step -c <number>Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
将
<number> 替换为您要执行的行数。
-
将
3.6. 列出源代码 复制链接链接已复制到粘贴板!
在执行您要调试的程序前,LLDB 调试器会自动显示源代码的前 10 行。每次停止程序执行时,LLDB 会显示它停止的源代码行及其周带的行。您可以使用 LLDB 在调试会话期间手动触发源代码的显示。
先决条件
-
您已启动交互式调试会话。
如需更多信息,请参阅使用 LLDB 启动调试会话。
流程
要列出您要调试的程序的源代码的前 10 行,请运行:
(lldb) list
(lldb) listCopy to Clipboard Copied! Toggle word wrap Toggle overflow 要从特定行显示源代码,请运行:
(lldb) list <source_file_name>:<line_number>
(lldb) list <source_file_name>:<line_number>Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
将
<source_file_name> 替换为源文件的名称,将 <line_number> 替换为您要显示的行号。
-
将
3.7. 显示当前程序数据 复制链接链接已复制到粘贴板!
LLDB 调试器为任意复杂性、任何有效表达式和函数调用返回值的变量提供数据。您可以使用 LLDB 显示与程序状态相关的数据。
先决条件
-
您已启动交互式调试会话。
如需更多信息,请参阅使用 LLDB 启动调试会话。
流程
要显示特定变量、表达式或返回值的当前值,请运行:
(lldb) print <data_name>
(lldb) print <data_name>
-
将
<data_name> 替换为您要显示的数据。
第 4 章 在 RHEL 8 上使用 LLVM Toolset 的容器镜像 复制链接链接已复制到粘贴板!
在 RHEL 8 中,您可以使用 Containerfiles 在 Red Hat Universal Base Images (UBI)容器之上构建自己的 LLVM Toolset 容器镜像。
4.1. 在 RHEL 8 上创建 LLVM Toolset 的容器镜像 复制链接链接已复制到粘贴板!
在 RHEL 8 中,LLVM Toolset 软件包是 Red Hat Universal Base Images (UBI)存储库的一部分。要保持容器镜像大小小,请只安装单独的软件包而不是整个 LLVM Toolset。
先决条件
-
现有的 Containerfile。
有关创建 Containerfiles 的详情,请参考 Dockerfile 参考 页面。
流程
- 访问 红帽容器目录。
- 选择 UBI。
- 点 Get this image 并按照说明进行操作。
- 要创建包含 LLVM Toolset 的容器镜像,请在 Containerfile 中添加以下行:
FROM registry.access.redhat.com/ubi8/ubi:latest RUN yum module install -y llvm-toolset
FROM registry.access.redhat.com/ubi8/ubi:latest
RUN yum module install -y llvm-toolset
要创建仅包含单个软件包的容器镜像,请在 Containerfile 中添加以下行:
RUN yum install -y <package-name>
RUN yum install -y <package-name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
将 <
package-name> 替换为您要安装的软件包的名称。
-
将 <
第 5 章 LLVM Toolset 中的更改 复制链接链接已复制到粘贴板!
LLVM Toolset 已从 RHEL 7、RHEL 8 和 RHEL 9 版本 14.0.6 更新至 15.0.7。主要变更包括:
-
-Wimplicit-function-declaration和-Wimplicit-int警告在 C99 及更新版本中默认启用。在 Clang 16 及更高版本中,这些警告将默认出现错误。