Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Unified Diff: lib/Basic/Targets.cpp

Issue 7748035: PNaClTargetInfo: add __ELF__, _REENTRANT and _GNU_SOURCE defines and update the test. (Closed) Base URL: https://llvm.org/svn/llvm-project/cfe/trunk/
Patch Set: include <stdio.h> in the test Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/Driver/le32-unknown-nacl.cpp » ('j') | test/Driver/le32-unknown-nacl.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Basic/Targets.cpp
===================================================================
--- lib/Basic/Targets.cpp (revision 138489)
+++ lib/Basic/Targets.cpp (working copy)
@@ -2870,6 +2870,13 @@
}
virtual void getTargetDefines(const LangOptions &Opts,
MacroBuilder &Builder) const {
+ DefineStd(Builder, "unix", Opts);
+ Builder.defineMacro("__ELF__");
+ if (Opts.POSIXThreads)
+ Builder.defineMacro("_REENTRANT");
+ if (Opts.CPlusPlus)
+ Builder.defineMacro("_GNU_SOURCE");
+
Builder.defineMacro("__native_client__");
getArchDefines(Opts, Builder);
}
« no previous file with comments | « no previous file | test/Driver/le32-unknown-nacl.cpp » ('j') | test/Driver/le32-unknown-nacl.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698