Skip to content

Commit 6f1bae2

Browse files
committed
Fix Windows build failures caused by r349839
llvm-svn: 349846
1 parent 0876cae commit 6f1bae2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

llvm/cmake/modules/AddLLVM.cmake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,10 @@ macro(add_llvm_library name)
635635
set_property( GLOBAL APPEND PROPERTY LLVM_LIBS ${name} )
636636
endif()
637637

638-
if( EXCLUDE_FROM_ALL )
638+
if (ARG_MODULE AND NOT TARGET ${name})
639+
# Add empty "phony" target
640+
add_custom_target(${name})
641+
elseif( EXCLUDE_FROM_ALL )
639642
set_target_properties( ${name} PROPERTIES EXCLUDE_FROM_ALL ON)
640643
elseif(ARG_BUILDTREE_ONLY)
641644
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS_BUILDTREE_ONLY ${name})
@@ -674,13 +677,10 @@ macro(add_llvm_library name)
674677
endif()
675678
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
676679
endif()
677-
set_target_properties(${name} PROPERTIES FOLDER "Libraries")
678-
if(NOT TARGET ${name})
679-
# Add empty "phony" target
680-
add_custom_target(${name})
681-
endif()
682680
if (ARG_MODULE)
683681
set_target_properties(${name} PROPERTIES FOLDER "Loadable modules")
682+
else()
683+
set_target_properties(${name} PROPERTIES FOLDER "Libraries")
684684
endif()
685685
endmacro(add_llvm_library name)
686686

0 commit comments

Comments
 (0)