[Lldb-commits] [lldb] [lldb][AIX] Introducing _ALL_SOURCE macro into driver CMakeLists (PR #120607)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 20 04:56:30 PST 2024


================
@@ -11,6 +11,11 @@ if(APPLE)
   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_BINARY_DIR}/lldb-Info.plist")
 endif()
 
+if (UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "AIX")                               
+  remove_definitions("-D_XOPEN_SOURCE=700")                                    
----------------
labath wrote:

> It may be better to do a -U_XOPEN_SOURCE

.. which, at least according to my experiments, isn't possible it seems. However, also according to my experiments, `remove_definitions` doesn't actually remove macros defined by `add_compile_definitions` (only `add_definitions`), which brings up another question: Is this actually needed? Would it be sufficient to define _ALL_SOURCE as well?

https://github.com/llvm/llvm-project/pull/120607


More information about the lldb-commits mailing list