Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
606 views
in Technique[技术] by (71.8m points)

clang - LLVM equivalent of gcc -D macro definition on commandline

I am looking for LLVM (or clang) equivalent of gcc's -D flag which enables macro definition at commandline.

Any pointers would be great.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

From clang --cc1 --help:

...
-D <macro>              Predefine the specified macro
...

As a rule of thumb, assume that Clang emulates GCC, unless proven otherwise!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...