Skip to content

Commit dfe9fcc

Browse files
[lldb][headers] Fix header staging target for RPC (#150355)
This commit fixes the target that stages headers in the build dir's include directory so that the headers are staged correctly so that the target for liblldbrpc-headers can depend on it properly
1 parent 7f66a83 commit dfe9fcc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lldb/source/API/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ list(REMOVE_ITEM root_public_headers ${root_private_headers})
302302

303303
find_program(unifdef_EXECUTABLE unifdef)
304304

305-
add_custom_target(liblldb-header-staging DEPENDS ${lldb_staged_headers} ${lldb_header_staging_dir}/lldb-defines.h)
305+
add_custom_target(liblldb-header-staging)
306306

307307
if (LLDB_BUILD_FRAMEWORK)
308308
add_custom_target(lldb-framework-fixup-all-headers)
@@ -326,6 +326,8 @@ foreach(header
326326
set(copy_command ${CMAKE_COMMAND} -E copy ${header} ${staged_header})
327327
endif()
328328

329+
add_custom_target(liblldb-stage-header-${basename} DEPENDS ${staged_header})
330+
add_dependencies(liblldb-header-staging liblldb-stage-header-${basename})
329331
add_custom_command(
330332
DEPENDS ${header} OUTPUT ${staged_header}
331333
COMMAND ${copy_command}

lldb/tools/lldb-rpc/LLDBRPCHeaders.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function(FixIncludePaths in subfolder out)
7979

8080
add_custom_command(OUTPUT ${parked_header}
8181
COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.py
82-
-f lldb_rpc -i ${in} -o ${parked_header} -p ${unifdef_EXECUTABLE} USWIG
82+
-f lldb_rpc -i ${in} -o ${parked_header} -p ${unifdef_EXECUTABLE} --unifdef_guards USWIG
8383
DEPENDS ${in}
8484
COMMENT "Fixing includes in ${in}"
8585
)

0 commit comments

Comments
 (0)