[lldb][cmake] Move the remove_module_flags call to the right place in debugserver...
authorRaphael Isemann <teemperor@gmail.com>
Mon, 27 Apr 2020 14:03:37 +0000 (16:03 +0200)
committerRaphael Isemann <teemperor@gmail.com>
Mon, 27 Apr 2020 14:04:19 +0000 (16:04 +0200)
This code should always be executed, not just when building the debugserver
on its own. Fixes the modules build when building LLVM+LLDB together.

lldb/tools/debugserver/CMakeLists.txt

index 8bd0ecc..fc23cf3 100644 (file)
@@ -13,13 +13,13 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
   include(debugserverConfig)
   include(AddLLDB)
 
-  # debugserver contains ObjC++ code, so let's disable Clang modules
-  # in this subdirectory to avoid building ObjC++ modules (which often
-  # doesn't properly work).
-  remove_module_flags()
-
   set(LLDB_SOURCE_DIR "${CMAKE_SOURCE_DIR}/../../")
   include_directories(${LLDB_SOURCE_DIR}/include)
 endif()
 
+# debugserver contains ObjC++ code, so let's disable Clang modules
+# in this subdirectory to avoid building ObjC++ modules (which often
+# doesn't properly work).
+remove_module_flags()
+
 add_subdirectory(source)