mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
CMake: Build system fixes for XCode. llvm-config still causes us some serious trouble, but it's less serious than it used to be
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67056 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b451a0cdec
commit
4752bd3b40
@ -13,7 +13,7 @@ macro(add_partially_linked_object lib)
|
||||
if( MSVC )
|
||||
add_llvm_library( ${lib} ${ARGN})
|
||||
else( MSVC )
|
||||
set(pll ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/${lib}.o)
|
||||
set(pll ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${lib}.o)
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/temp_lib)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/temp_lib)
|
||||
llvm_process_sources( ALL_FILES ${ARGN} )
|
||||
@ -27,7 +27,7 @@ macro(add_partially_linked_object lib)
|
||||
add_custom_command(OUTPUT ${pll}
|
||||
COMMENT "Building ${lib}.o..."
|
||||
DEPENDS ${lib}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/temp_lib
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/temp_lib/${CMAKE_CFG_INTDIR}
|
||||
COMMAND ar x ${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
COMMAND ${CMAKE_LINKER} "${LLVM_PLO_FLAGS}" -r "*${CMAKE_CXX_OUTPUT_EXTENSION}" -o ${pll}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove -f *${CMAKE_CXX_OUTPUT_EXTENSION}
|
||||
|
@ -131,7 +131,7 @@ macro(nix_llvm_config executable)
|
||||
if(c MATCHES ".*\\.o")
|
||||
get_filename_component(fn ${c} NAME)
|
||||
target_link_libraries(${executable}
|
||||
${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/${fn})
|
||||
${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${fn})
|
||||
else(c MATCHES ".*\\.o")
|
||||
string(REPLACE "-l" "" fn ${c})
|
||||
target_link_libraries(${executable} ${fn})
|
||||
|
@ -68,7 +68,7 @@ if( NOT NM_PATH )
|
||||
endif()
|
||||
|
||||
add_custom_command(OUTPUT ${LIBDEPS_TMP}
|
||||
COMMAND ${PERL_EXECUTABLE} ${LLVM_MAIN_SRC_DIR}/utils/GenLibDeps.pl -flat ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} ${NM_PATH} > ${LIBDEPS_TMP}
|
||||
COMMAND ${PERL_EXECUTABLE} ${LLVM_MAIN_SRC_DIR}/utils/GenLibDeps.pl -flat ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR} ${NM_PATH} > ${LIBDEPS_TMP}
|
||||
DEPENDS ${llvm_libs}
|
||||
COMMENT "Regenerating ${LIBDEPS_TMP}")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user