Add linker tools
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- cmake, cpp, github-actions, typescript
- 领域
- build-system, ci-cd, tooling
调研方向
首先跟踪 setup-cpp CLI 和 GitHub Actions 对编译器工具的选项处理,并将其与任务中提到的 clangtidy 风格支持进行比较。查看 issue 中展示的 CMakeOptions.cmake 和 find_linker 用法,然后定义 lld、mold、sold 和 gold 在所述平台上的安装和选择行为。完成的标准是可以通过 CLI 和 Actions 配置选择所请求的 linker 选项。
由索引模型根据 Issue 内容生成。
描述
Tasks
-
lldcan be easily added as it is already supported. We just need to add a CLI and actions option for it. It should be treated the same asclangtidy, etc. - mold
- sold
- gold
Description
Hi,
I was using setup-cpp with project_options (in my docker build) and custemize the linker option, see find_linker.
Would be nice to install mold or one of the other (better) Linker, rather then (gcc) ld or gold.
Improving C++ Compilation Times: Tools & Techniques - Vittorio Romeo - ACCU 2023
So install (?) ...
mold(e.g. whencompilerisgcc)lldwhencompilerisllvm(default)soldfor Mac OS- windows: ???
npx setup-cpp --compiler gcc --linker mold --cmake true --ninja true --ccache true --vcpkg true
More Context
I was getting this Error: /usr/bin/ld.gold: separate-code: unknown -z option.
CMakeOptions.cmake
find_linker(PROJECT_OPTIONS_LINKER)
MESSAGE(STATUS "Use Linker: ${PROJECT_OPTIONS_LINKER}")
project_options(
...
LINKER
${PROJECT_OPTIONS_LINKER})
Compiler found: /usr/bin/g++-13
Use Linker: gold
After that I just installed mold and everything works:
RUN apt-get update -qq && \
# install nodejs
apt-get install -y --no-install-recommends nodejs npm && \
# install setup-cpp
npm install -g [email protected] && \
# install the compiler and tools
setup-cpp \
--nala true \
--compiler ${compiler} \
--cmake true \
--ninja true \
--task true \
--vcpkg true \
--cppcheck true \
--gcovr true \
--doxygen true \
--ccache true && \
# install custom linker
apt-get install -y --no-install-recommends mold && \
# cleanup
nala autoremove -y && \
nala autopurge -y && \
apt-get clean && \
nala clean --lists && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/*
- 主要语言
- TypeScript
- 星标
- 277
- 派生
- 37
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
aminya/setup-cpp 的其他 Issue
-
enhancement more-information-needed
难度 2/5 1-3 小时 新手友好度 35/100
-
Brew LLVM OpenMP可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 25/100
-
难度 5/5 一周以上 新手友好度 15/100
-
难度 5/5 一周以上 新手友好度 25/100
-
enhancement
难度 4/5 3-5 天 新手友好度 35/100
相似的 Issue
-
test: claim-conflict drop leaves both facts active and is never re-proposed (untested review cell)未关闭
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
[Feature]: Usage page should show API-equivalent cost and say when a connected plan shows info only未关闭enhancement from-x
难度 2/5 1-3 小时 新手友好度 66/100
nightly-labs/openbot#4867 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
egonSchiele/agency-lang#1377 ·
维护者通常 1 天内回复
-
normalizePath removes the Windows device namespace prefix可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
caprover/caprover-frontend#273 ·
维护者通常 1 天内回复