@@ -883,7 +883,7 @@ endfunction(add_llvm_pass_plugin)
883
883
# Also correctly set lib dependencies between plugins and tools.
884
884
function (process_llvm_pass_plugins)
885
885
get_property (LLVM_EXTENSIONS GLOBAL PROPERTY LLVM_COMPILE_EXTENSIONS)
886
- file (WRITE "${CMAKE_BINARY_DIR } /include/llvm/Support/Extension.def.tmp" "//extension handlers\n " )
886
+ file (WRITE "${LLVM_BINARY_DIR } /include/llvm/Support/Extension.def.tmp" "//extension handlers\n " )
887
887
foreach (llvm_extension ${LLVM_EXTENSIONS} )
888
888
string (TOLOWER ${llvm_extension} llvm_extension_lower)
889
889
@@ -893,23 +893,25 @@ function(process_llvm_pass_plugins)
893
893
string (CONCAT llvm_extension_project ${llvm_extension_upper_first} ${llvm_extension_lower_tail} )
894
894
895
895
if (LLVM_${llvm_extension_upper} _LINK_INTO_TOOLS)
896
- file (APPEND "${CMAKE_BINARY_DIR } /include/llvm/Support/Extension.def.tmp" "HANDLE_EXTENSION(${llvm_extension_project} )\n " )
896
+ file (APPEND "${LLVM_BINARY_DIR } /include/llvm/Support/Extension.def.tmp" "HANDLE_EXTENSION(${llvm_extension_project} )\n " )
897
897
898
- get_property (llvm_plugin_targets GLOBAL PROPERTY LLVM_PLUGIN_TARGETS)
899
- foreach (llvm_plugin_target ${llvm_plugin_targets} )
900
- set_property (TARGET ${llvm_plugin_target} APPEND PROPERTY LINK_LIBRARIES ${llvm_extension} )
901
- set_property (TARGET ${llvm_plugin_target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${llvm_extension} )
902
- endforeach ()
898
+ get_property (llvm_plugin_targets GLOBAL PROPERTY LLVM_PLUGIN_TARGETS)
899
+ foreach (llvm_plugin_target ${llvm_plugin_targets} )
900
+ set_property (TARGET ${llvm_plugin_target} APPEND PROPERTY LINK_LIBRARIES ${llvm_extension} )
901
+ set_property (TARGET ${llvm_plugin_target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${llvm_extension} )
902
+ endforeach ()
903
903
else ()
904
904
add_llvm_library(${llvm_extension_lower} MODULE obj.${llvm_extension_lower} )
905
905
endif ()
906
906
907
907
endforeach ()
908
- file (APPEND "${CMAKE_BINARY_DIR } /include/llvm/Support/Extension.def.tmp" "#undef HANDLE_EXTENSION\n " )
908
+ file (APPEND "${LLVM_BINARY_DIR } /include/llvm/Support/Extension.def.tmp" "#undef HANDLE_EXTENSION\n " )
909
909
910
910
# only replace if there's an actual change
911
- execute_process (COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_BINARY_DIR} /include/llvm/Support/Extension.def.tmp" "${CMAKE_BINARY_DIR} /include/llvm/Support/Extension.def" )
912
- file (REMOVE "${CMAKE_BINARY_DIR} /include/llvm/Support/Extension.def.tmp" )
911
+ execute_process (COMMAND ${CMAKE_COMMAND} -E copy_if_different
912
+ "${LLVM_BINARY_DIR} /include/llvm/Support/Extension.def.tmp"
913
+ "${LLVM_BINARY_DIR} /include/llvm/Support/Extension.def" )
914
+ file (REMOVE "${LLVM_BINARY_DIR} /include/llvm/Support/Extension.def.tmp" )
913
915
endfunction ()
914
916
915
917
function (export_executable_symbols target )
0 commit comments