Code Monkey home page Code Monkey logo

Comments (4)

aguludunu avatar aguludunu commented on September 1, 2024 1

clang不支持-fdirectives-only和-fpreprocessed(clang-15已经支持-fdirectives-only)
在本地使用-frewrite-includes用clang进行预处理后,云端还是不能编译(因为clang不支持-fpreprocessed),使用"-x c++-cpp-output"也不行,返回的编译结果大小为0

from yadcc.

0x804d8000 avatar 0x804d8000 commented on September 1, 2024

二者的支持方式是类似的(本地预处理+远程编译),涉及到的命令行参数也基本一致(不过llvm额外支持了一个-frewrite-includes,可以进一步优化本地性能)。但是没有专门测试过llvm的兼容性。

可以测试一下直接套在llvm上面,如果有不兼容也可以贴上来看看(参考 https://github.com/Tencent/yadcc/blob/master/yadcc/doc/debugging.md#客户端 获得调试信息),比较简单的case的话也可以直接发mr

from yadcc.

wlii-by avatar wlii-by commented on September 1, 2024

我也遇到了-fdirectives-only和-fpreprocessed问题,所以是yadcc不支持clang?

from yadcc.

0x804d8000 avatar 0x804d8000 commented on September 1, 2024

看起来应该是不支持,我们目前没有在生产环境中尝试过分布式的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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.