diff options
author | James Y Knight <jyknight@google.com> | 2017-06-14 17:01:18 +0000 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2017-06-14 17:01:18 +0000 |
commit | 1bc0fd65768207f29db8881463167c0956893b19 (patch) | |
tree | fe0f6b916dd0d2e28b0eae3c5121e9f8ea63b234 /lib/Basic/Targets.cpp | |
parent | 6bdfcedff7e717de354bac2159980464181618d8 (diff) |
Define _GNU_SOURCE for rtems c++
This is required by the libc++ locale support.
Patch by Walter Lee.
Differential Revision: https://reviews.llvm.org/D34105
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305399 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Targets.cpp')
-rw-r--r-- | lib/Basic/Targets.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index a3b8330707..3bf20fef5d 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -4734,6 +4734,9 @@ protected: Builder.defineMacro("__rtems__"); Builder.defineMacro("__ELF__"); + // Required by the libc++ locale support. + if (Opts.CPlusPlus) + Builder.defineMacro("_GNU_SOURCE"); } public: |