当前位置:网站首页>To sort out messy header files, I use include what you use
To sort out messy header files, I use include what you use
2022-07-04 19:22:00 【InfoQ】
background
brief introduction
install
cd llvm-project
git checkout llvmorg-14.0.0
cd llvm-project
mkdir build && cd build
cmake -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Release -G “Unix Makefiles” …/llvm
make -j48
IWYU install
git checkeout clang_14
mkdir build && cd build
cmake -G “Unix Makefiles” -DCMAKE_PREFIX_PATH=…/llvm/llvm-project/llvm/ …/include-what-you-use/
![null](/img/5a/a33e4da290709826a30d5c5f4eac25.png)
cd …/include-what-you-use/
make -j48
![null](/img/5e/86efd0f6506e217f9a91fe9c655644.png)
ln -s /the/path/of/include-what-you-use/bin/include-what-you-use /usr/bin/iwyu
![null](/img/da/a8a7a83e83489ed6d8f7006e2e0eb0.png)
Use
- Set up compiler
![null](/img/49/7b4d0dea3bcc0ee45a186e46020391.png)
- Set compilation options
![null](/img/b7/156aa5f22afed1d8893d0fc86b0362.png)
- Compile the project
![null](/img/98/17ae8ab8254a6af746089776a29bf2.png)
- The result processing
![null](/img/d4/0aaa7fa8f97012cbc9f38ae1800a18.png)
![null](/img/73/bc650f79c2469e079f4c60bbc58313.png)
- [1] IWYU Home page
- [2] Clang Build guidance
边栏推荐
- Nebula Importer 数据导入实践
- 1672. Total assets of the richest customers
- Torchdrug tutorial
- 爬虫(6) - 网页数据解析(2) | BeautifulSoup4在爬虫中的使用
- What if the self incrementing ID of online MySQL is exhausted?
- Cache é JSON uses JSON adapters
- php伪原创api对接方法
- 其他InterSystems %Net工具
- Guys, for help, I use MySQL CDC 2.2.1 (Flink 1.14.5) to write Kafka and set
- Principle and application of ThreadLocal
猜你喜欢
redis分布式锁的8大坑总结梳理
Nebula importer data import practice
Scala basic tutorial -- 19 -- actor
Go微服务(二)——Protobuf详细入门
与二值化阈值处理相关的OpenCV函数、方法汇总,便于对比和拿来使用
ByteDance dev better technology salon was successfully held, and we joined hands with Huatai to share our experience in improving the efficiency of web research and development
Don't just learn Oracle and MySQL!
英特尔集成光电研究最新进展推动共封装光学和光互连技术进步
【uniapp】uniapp开发app在线预览pdf文件
基于unity的愤怒的小鸟设计
随机推荐
How to modify icons in VBS or VBE
模板_判断素数_开方 / 六素数法
php伪原创api对接方法
The CDC of sqlserver can read the data for the first time, but it can't read the data after adding, deleting and modifying. What's the reason
What if the self incrementing ID of online MySQL is exhausted?
2022-07-04: what is the output of the following go language code? A:true; B:false; C: Compilation error. package main import 'fmt' func
Guys, for help, I use MySQL CDC 2.2.1 (Flink 1.14.5) to write Kafka and set
Scala basic tutorial -- 12 -- Reading and writing data
IBM WebSphere MQ检索邮件
Wireshark网络抓包
Use canal and rocketmq to listen to MySQL binlog logs
《看完就懂系列》字符串截取方法substr() 、 slice() 和 substring()之间的区别和用法
【uniapp】uniapp开发app在线预览pdf文件
性能优化之关键渲染路径
[发布] 一个测试 WebService 和数据库连接的工具 - DBTest v1.0
876. 链表的中间结点
使用canal配合rocketmq监听mysql的binlog日志
2022健康展,北京健博会,中国健康展,大健康展11月13日
redis分布式锁的8大坑总结梳理
Rookie post station management system based on C language