diff options
author | Stephen Hines <srhines@google.com> | 2014-12-01 14:51:49 -0800 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-12-02 16:08:10 -0800 |
commit | 37ed9c199ca639565f6ce88105f9e39e898d82d0 (patch) | |
tree | 8fb36d3910e3ee4c4e1b7422f4f017108efc52f5 /cmake/modules/TableGen.cmake | |
parent | d2327b22152ced7bc46dc629fc908959e8a52d03 (diff) | |
download | external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.zip external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.tar.gz external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.tar.bz2 |
Update aosp/master LLVM for rebase to r222494.
Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
Diffstat (limited to 'cmake/modules/TableGen.cmake')
-rw-r--r-- | cmake/modules/TableGen.cmake | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/cmake/modules/TableGen.cmake b/cmake/modules/TableGen.cmake index 34b0343..67031a5 100644 --- a/cmake/modules/TableGen.cmake +++ b/cmake/modules/TableGen.cmake @@ -70,26 +70,6 @@ function(add_public_tablegen_target target) set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} ${target} PARENT_SCOPE) endfunction() -if(CMAKE_CROSSCOMPILING) - set(CX_NATIVE_TG_DIR "${CMAKE_BINARY_DIR}/native") - - add_custom_command(OUTPUT ${CX_NATIVE_TG_DIR} - COMMAND ${CMAKE_COMMAND} -E make_directory ${CX_NATIVE_TG_DIR} - COMMENT "Creating ${CX_NATIVE_TG_DIR}...") - - add_custom_command(OUTPUT ${CX_NATIVE_TG_DIR}/CMakeCache.txt - COMMAND ${CMAKE_COMMAND} -UMAKE_TOOLCHAIN_FILE -DCMAKE_BUILD_TYPE=Release - -DLLVM_BUILD_POLLY=OFF - -G "${CMAKE_GENERATOR}" ${CMAKE_SOURCE_DIR} - WORKING_DIRECTORY ${CX_NATIVE_TG_DIR} - DEPENDS ${CX_NATIVE_TG_DIR} - COMMENT "Configuring native TableGen...") - - add_custom_target(ConfigureNativeTableGen DEPENDS ${CX_NATIVE_TG_DIR}/CMakeCache.txt) - - set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${CX_NATIVE_TG_DIR}) -endif() - macro(add_tablegen target project) set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS}) set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen) @@ -113,16 +93,16 @@ macro(add_tablegen target project) if(CMAKE_CROSSCOMPILING) if( ${${project}_TABLEGEN} STREQUAL "${target}" ) - set(${project}_TABLEGEN_EXE "${CX_NATIVE_TG_DIR}/bin/${target}") + set(${project}_TABLEGEN_EXE "${LLVM_NATIVE_BUILD}/bin/${target}") set(${project}_TABLEGEN_EXE ${${project}_TABLEGEN_EXE} PARENT_SCOPE) add_custom_command(OUTPUT ${${project}_TABLEGEN_EXE} - COMMAND ${CMAKE_BUILD_TOOL} ${target} - DEPENDS ${CX_NATIVE_TG_DIR}/CMakeCache.txt - WORKING_DIRECTORY ${CX_NATIVE_TG_DIR} + COMMAND ${CMAKE_COMMAND} --build . --target ${target} --config $<CONFIGURATION> + DEPENDS ${LLVM_NATIVE_BUILD}/CMakeCache.txt + WORKING_DIRECTORY ${LLVM_NATIVE_BUILD} COMMENT "Building native TableGen...") add_custom_target(${project}NativeTableGen DEPENDS ${${project}_TABLEGEN_EXE}) - add_dependencies(${project}NativeTableGen ConfigureNativeTableGen) + add_dependencies(${project}NativeTableGen ConfigureNativeLLVM) add_dependencies(${target} ${project}NativeTableGen) endif() |