Skip to content

Commit dfa32f6

Browse files
justincadymahesh-attarde
authored andcommitted
[lldb] Avoid copying header just to overwrite it (llvm#160555)
The build script copies lldb-defines.h into the staging area but it gets overwritten by version-header-fix.py. This flow assumes that the lldb-defines.h from the source was writable originally (thus the copy maintains that permission). This is problematic for systems that integrate LLVM source as read only. This change skips the initial copy of lldb-defines.h, which prevents lldb build failures when the source is not writable.
1 parent a165126 commit dfa32f6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lldb/source/API/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@ set(generated_public_headers ${LLDB_OBJ_DIR}/include/lldb/API/SBLanguages.h)
299299
file(GLOB root_public_headers ${LLDB_SOURCE_DIR}/include/lldb/lldb-*.h)
300300
file(GLOB root_private_headers ${LLDB_SOURCE_DIR}/include/lldb/lldb-private*.h)
301301
list(REMOVE_ITEM root_public_headers ${root_private_headers})
302+
# Skip the initial copy of lldb-defines.h. The fixed version is generated at build time.
303+
list(REMOVE_ITEM root_public_headers ${LLDB_SOURCE_DIR}/include/lldb/lldb-defines.h)
302304

303305
find_program(unifdef_EXECUTABLE unifdef)
304306

0 commit comments

Comments
 (0)