================
@@ -116,6 +116,9 @@ void HexagonTargetInfo::getTargetDefines(const LangOptions 
&Opts,
   Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2");
   Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4");
   Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8");
+
+  if (Opts.CPlusPlus)
+    Builder.defineMacro("_GNU_SOURCE");
----------------
quic-k wrote:

I think this is a compiler property, clang should probably be declaring this 
macro for C++ mode, but we cannot decide for clang, we can decide for Hexagon

we do need this macro for baremetal as well, the libcxx built for baremetal 
will also need this macro, I don't think this is an OS property

https://github.com/llvm/llvm-project/pull/201599
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to