r178372 - [cmake] Add clang-headers as a dependency of libclang and if we have to copy them

Argyrios Kyrtzidis akyrtzi at gmail.com
Thu Apr 18 11:56:01 PDT 2013


Should be fixed in r179782.

On Apr 18, 2013, at 7:04 AM, Will Wilson <will at indefiant.com> wrote:

> Hi Argytios,
> 
> It seems r178372 has caused issues with my Xcode build setup. I checked out fresh LLVM & clang repros from SVN and then ran:
> 
> mkdir llvm_build
> cd llvm_build
> cmake -G "Unix Makefiles" ../llvm
> make -j 8
> 
> cd ..
> mkdir clang_build
> cd clang_build
> cmake -G Xcode -DCLANG_PATH_TO_LLVM_SOURCE=../llvm -DCLANG_PATH_TO_LLVM_BUILD=../llvm_build -DCMAKE_BUILD_TYPE=Debug ../llvm/tools/clang
> 
> I than attempted to build clang in Xcode and got this error in clang-headers:
> 
> /Applications/CMake\ 2.8-10.app/Contents/bin/cmake -E create_symlink /Users/willw/clang_svn/clang_build/bin/lib/clang /Users/willw/clang_svn/clang_build/lib/Debug/clang
> make: *** [clang-headers_buildpart_0] Error 1
> Command /bin/sh failed with exit code 2
> 
> Reverting r178372 let me build again.
> 
> - Will.
> 
> 
> 
> On 29 March 2013 22:51, Argyrios Kyrtzidis <akyrtzi at gmail.com> wrote:
> Author: akirtzidis
> Date: Fri Mar 29 16:51:40 2013
> New Revision: 178372
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=178372&view=rev
> Log:
> [cmake] Add clang-headers as a dependency of libclang and if we have to copy them
> for the IDE case, also create a symlink inside the libclang.dylib directory.
> 
> Modified:
>     cfe/trunk/lib/Headers/CMakeLists.txt
>     cfe/trunk/tools/libclang/CMakeLists.txt
> 
> Modified: cfe/trunk/lib/Headers/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/CMakeLists.txt?rev=178372&r1=178371&r2=178372&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Headers/CMakeLists.txt (original)
> +++ cfe/trunk/lib/Headers/CMakeLists.txt Fri Mar 29 16:51:40 2013
> @@ -95,6 +95,13 @@ endif ()
>  add_custom_target(clang-headers ALL DEPENDS ${out_files})
>  set_target_properties(clang-headers PROPERTIES FOLDER "Misc")
> 
> +if (other_output_dir)
> +       if(UNIX)
> +               add_custom_command(TARGET clang-headers POST_BUILD
> +               COMMAND ${CMAKE_COMMAND} -E create_symlink "${LLVM_BINARY_DIR}/bin/lib/clang" "${LLVM_BINARY_DIR}/lib/${CMAKE_CFG_INTDIR}/clang")
> +       endif()
> +endif ()
> +
>  install(FILES ${files} ${output_dir}/arm_neon.h
>    PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
>    DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
> 
> Modified: cfe/trunk/tools/libclang/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CMakeLists.txt?rev=178372&r1=178371&r2=178372&view=diff
> ==============================================================================
> --- cfe/trunk/tools/libclang/CMakeLists.txt (original)
> +++ cfe/trunk/tools/libclang/CMakeLists.txt Fri Mar 29 16:51:40 2013
> @@ -74,7 +74,7 @@ if( LLVM_ENABLE_PIC )
>    set(SHARED_LIBRARY TRUE)
>    add_clang_library(libclang ${SOURCES})
>    target_link_libraries(libclang ${LIBRARIES})
> -  add_dependencies(libclang ${GENERATED_HEADERS})
> +  add_dependencies(libclang ${GENERATED_HEADERS} clang-headers)
> 
>    if(WIN32)
>      set_target_properties(libclang
> @@ -108,7 +108,7 @@ endif()
>  if( NOT BUILD_SHARED_LIBS AND NOT WIN32 )
>    add_clang_library(${LIBCLANG_STATIC_TARGET_NAME} STATIC ${SOURCES})
>    target_link_libraries(${LIBCLANG_STATIC_TARGET_NAME} ${LIBRARIES})
> -  add_dependencies(${LIBCLANG_STATIC_TARGET_NAME} ${GENERATED_HEADERS})
> +  add_dependencies(${LIBCLANG_STATIC_TARGET_NAME} ${GENERATED_HEADERS} clang-headers)
> 
>    set_target_properties(${LIBCLANG_STATIC_TARGET_NAME}
>      PROPERTIES
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 
> 
> 
> -- 
> Indefiant Ltd.
> 
> Firsby Lodge, New Main Road, Scamblesby, Louth, Lincs LN11 9XH UK
> Tel: +44 20 8123 7663 England Registered No. 07936820 VAT No. 128556202

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130418/884f19a0/attachment.html>


More information about the cfe-commits mailing list