-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Description
Bugzilla Link | 3979 |
Resolution | FIXED |
Resolved on | Feb 22, 2010 12:49 |
Version | unspecified |
OS | All |
Reporter | LLVM Bugzilla Contributor |
CC | @efriedma-quic |
Extended Description
Recently, a change was made to move platform-specific macro setup from the PP to clang-cc.cpp - InitializePredefinedMacros().
While the idea to de-couple it from the PP is nice, this poses a problem for users who are interested in writing tools that use clang as a library.
A tool should be able to initialize the PP with the default macros for his target triple without explicitly setting those macros and knowing about the specific macros. It should just call some library method in clang.
This used to be the case, as it was handled by the PP. However, it is no longer possible - since it is now done in a static method in clang-cc.cpp.
The alternative, to copy-paste a bunch of code that sets specific macros from clang-cc.cpp into one's ow app that uses clang as a library, really sucks.