Skip to content

Commit 09be99b

Browse files
committed
Teach export_executable_symbols about ALIAS target
1 parent 0957656 commit 09be99b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

llvm/cmake/modules/AddLLVM.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,6 +1359,14 @@ function(export_executable_symbols target)
13591359
while(NOT "${new_libs}" STREQUAL "")
13601360
foreach(lib ${new_libs})
13611361
if(TARGET ${lib})
1362+
# If this is a ALIAS target, continue with its aliasee instead.
1363+
get_target_property(aliased_lib ${lib} ALIASED_TARGET)
1364+
if(aliased_lib)
1365+
set(new_libs ${lib_aliased_target})
1366+
list(APPEND newer_libs ${aliased_lib})
1367+
continue()
1368+
endif()
1369+
13621370
get_target_property(lib_type ${lib} TYPE)
13631371
if("${lib_type}" STREQUAL "STATIC_LIBRARY")
13641372
list(APPEND static_libs ${lib})

0 commit comments

Comments
 (0)