Comments (4)
clang不支持-fdirectives-only和-fpreprocessed(clang-15已经支持-fdirectives-only)
在本地使用-frewrite-includes用clang进行预处理后,云端还是不能编译(因为clang不支持-fpreprocessed),使用"-x c++-cpp-output"也不行,返回的编译结果大小为0
from yadcc.
二者的支持方式是类似的(本地预处理+远程编译),涉及到的命令行参数也基本一致(不过llvm额外支持了一个-frewrite-includes,可以进一步优化本地性能)。但是没有专门测试过llvm的兼容性。
可以测试一下直接套在llvm上面,如果有不兼容也可以贴上来看看(参考 https://github.com/Tencent/yadcc/blob/master/yadcc/doc/debugging.md#客户端 获得调试信息),比较简单的case的话也可以直接发mr
from yadcc.
我也遇到了-fdirectives-only和-fpreprocessed问题,所以是yadcc不支持clang?
from yadcc.
看起来应该是不支持,我们目前没有在生产环境中尝试过分布式的clang编译。
-fdirectives-only
并不是必须的,单纯的-E
也可以,但是性能会差一些。
初步(而且可能并不完善)的测试了一下,本地预处理+远程编译对于clang来说也是可以的,但是可能在yadcc的client(主要是RewriteFile
)和daemon(粗看感觉可能不用改)部分需要少量适配。
e.g.
$ cat > 1.cc
#include <iostream>
int main() {
std::cout << "Hello world." << std::endl;
}
$ clang++ -E ./1.cc -o 1.ii
$ clang++ -c 1.ii -o 1.o
$ clang++ 1.o
$ ./a.out
Hello world.
$
from yadcc.
Related Issues (20)
- 文件预处理是由客户端自己完成吗 HOT 9
- 技术原理请教 HOT 2
- Cannot contact delegate daemon. Daemon died? HOT 9
- 能否给daemon加个功能,当scheduler重启后自动重链 HOT 2
- 关于调度机制的问题 HOT 1
- yadcc编译时,提示ld链接无法找到pthread、m、c、dl等动态库 HOT 2
- [2023-01-29 20:02:30.532771] [INFO ] [yadcc/client/cxx/yadcc-cxx.cc:207] Failed on the cloud with [-126]. Failing back to local machine. HOT 2
- 无法缓存C++编译之后的文件 HOT 2
- 安装失败 HOT 2
- can not support CROSS_COMPILE HOT 8
- yadcc v1.x 版本编译报错 HOT 1
- failling back to local machine 126 HOT 3
- yadcc能不能用于安卓系统AOSP构建加速 HOT 3
- 经常编译报错. Child process exited unexpectedly with status HOT 1
- 当我运行./yadcc-daemon时,报Check failed: parts.size() >= 3 (2 vs. 3) Unexpected cgroup setting错误 HOT 2
- build latest llvm failed HOT 1
- 运行daemon错误 HOT 1
- --with-nghttp2 was specified but could not find libnghttp2 pkg-config file.
- 这个是否支持clang? HOT 3
- 如何使用如YADCC_IGNORE_TIMESTAMP_MACROS这样的参数去控制客户端的行为? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yadcc.