================
@@ -41,6 +46,23 @@ function(add_lldb_unittest test_name)
     COMMAND "${CMAKE_COMMAND}" -E make_directory 
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Inputs)
 
   target_link_libraries(${test_name} PRIVATE ${ARG_LINK_LIBS})
+
+  if (LLDB_UNITTEST_STRIP_DEBUG_INFO)
+    if (MSVC)
+      target_link_options(${test_name} PRIVATE
+        "LINKER:/DEBUG:NONE"
+        "LINKER:/INCREMENTAL:NO"
+        "LINKER:/OPT:REF"
+        "LINKER:/OPT:ICF")
+    else()
+      target_compile_options(${test_name} PRIVATE -g0)
+      if (APPLE)
+        target_link_options(${test_name} PRIVATE "LINKER:-S")
----------------
adrian-prantl wrote:

I wouldn't even implement this for non-Windows; there is really no situation 
where this would be useful.

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

Reply via email to