Skip to content

[lldb] Reinstate lldb-sbapi-dwarf-enums target (NFC) #91390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2024

Conversation

JDevlieghere
Copy link
Member

Alex pointed out in #91254 that we only need the custom target if we had more than one target depending on it. This isn't the case upstream, but on our downstream fork, we have a second dependency. Reintroduce the target so that everything can depend on that, without the single-dependency foot-gun.

Alex pointed out in llvm#91254 that we only need the custom target if we had
more than one target depending on it. This isn't the case upstream, but
on our downstream fork, we have a second dependency. Reintroduce the
target so that everything can depend on that, without the
single-dependency foot-gun.
@llvmbot
Copy link
Member

llvmbot commented May 7, 2024

@llvm/pr-subscribers-lldb

Author: Jonas Devlieghere (JDevlieghere)

Changes

Alex pointed out in #91254 that we only need the custom target if we had more than one target depending on it. This isn't the case upstream, but on our downstream fork, we have a second dependency. Reintroduce the target so that everything can depend on that, without the single-dependency foot-gun.


Full diff: https://github.com/llvm/llvm-project/pull/91390.diff

1 Files Affected:

  • (modified) lldb/source/API/CMakeLists.txt (+6-2)
diff --git a/lldb/source/API/CMakeLists.txt b/lldb/source/API/CMakeLists.txt
index 798a92874f13..aa31caddfde3 100644
--- a/lldb/source/API/CMakeLists.txt
+++ b/lldb/source/API/CMakeLists.txt
@@ -20,7 +20,7 @@ if(LLDB_ENABLE_LUA)
   set(lldb_lua_wrapper ${lua_bindings_dir}/LLDBWrapLua.cpp)
 endif()
 
-# Target to generate SBLanguages.h from Dwarf.def.
+# Generate SBLanguages.h from Dwarf.def.
 set(sb_languages_file
   ${CMAKE_CURRENT_BINARY_DIR}/../../include/lldb/API/SBLanguages.h)
 add_custom_command(
@@ -33,6 +33,8 @@ add_custom_command(
   DEPENDS ${LLVM_MAIN_INCLUDE_DIR}/llvm/BinaryFormat/Dwarf.def
   WORKING_DIRECTORY ${LLVM_LIBRARY_OUTPUT_INTDIR}
 )
+add_custom_target(lldb-sbapi-dwarf-enums
+  DEPENDS ${sb_languages_file})
 
 add_lldb_library(liblldb SHARED ${option_framework}
   SBAddress.cpp
@@ -113,7 +115,9 @@ add_lldb_library(liblldb SHARED ${option_framework}
   SystemInitializerFull.cpp
   ${lldb_python_wrapper}
   ${lldb_lua_wrapper}
-  ${sb_languages_file}
+
+  DEPENDS
+    lldb-sbapi-dwarf-enums
 
   LINK_LIBS
     lldbBreakpoint

Copy link
Member

@bulbazord bulbazord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of that.

@JDevlieghere JDevlieghere merged commit dad1109 into llvm:main May 7, 2024
@JDevlieghere JDevlieghere deleted the lldb-sbapi-dwarf-enums-target branch May 7, 2024 20:12
JDevlieghere added a commit to swiftlang/llvm-project that referenced this pull request May 7, 2024
Alex pointed out in llvm#91254 that we only need the custom target if we had
more than one target depending on it. This isn't the case upstream, but
on our downstream fork, we have a second dependency. Reintroduce the
target so that everything can depend on that, without the
single-dependency foot-gun.

(cherry picked from commit dad1109)
adrian-prantl pushed a commit to adrian-prantl/llvm-project that referenced this pull request Jun 12, 2024
Alex pointed out in llvm#91254 that we only need the custom target if we had
more than one target depending on it. This isn't the case upstream, but
on our downstream fork, we have a second dependency. Reintroduce the
target so that everything can depend on that, without the
single-dependency foot-gun.

(cherry picked from commit dad1109)
(cherry picked from commit 26f8029)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants