Juergen
Juergen

Reputation: 3743

Compile with clang as if with g++

Say you have a complex compilation call with g++:

g++ -c -Wall -Werror -I/usr/include... bla bla

and you want the very same call to output exactly the same with clang:

clang -c -Wall -Werror -I/usr/include... bla bla

Is there an option for clang to compile exactly like g++?

The problem is that in our project we get no warnings/errors with the g++ call, but many warnings with the clang call.

It would be nice to have a switch which disables all default options of clang and just parses the actual call parameters.

Upvotes: 1

Views: 242

Answers (1)

Mihai8
Mihai8

Reputation: 3147

First, take a look to Clang users manual, wikipedia Clang and to LibTooling. A good tutorial about using Clang API is compiling code Clang.

Upvotes: 1

Related Questions