[PATCH] Add clang headers that fix machine-dependent definitions	on FreeBSD 9.2
    Viktor Kutuzov 
    vkutuzov at accesssoftek.com
       
    Thu Jul 17 08:12:14 PDT 2014
    
    
  
Right, somehow missed it.
The trunk output reads:
  ...
  # 1 "/Users/tobias/llvm/bin/../lib/clang/3.5.0/include/_types.h" 1 3 4
  # 62 "/Users/tobias/llvm/bin/../lib/clang/3.5.0/include/_types.h" 3 4
  # 1 "/usr/include/machine/_types.h" 1 3 4
  # 32 "/usr/include/machine/_types.h" 3 4
  ...
what means 'machine/_types.h' has been copied to 'include/_types.h' and not 'include/machine/_types.h' as it should be.
Does your test source compile successfully if you move _types.h under /machine manually?
The code that copies the headers is in clang/lib/Headers/CMakeLists.txt:
  set(out_files)
  foreach( f ${files} )
    set( src ${CMAKE_CURRENT_SOURCE_DIR}/${f} )
    set( dst ${output_dir}/${f} )
    add_custom_command(OUTPUT ${dst}
      DEPENDS ${src}
      COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
      COMMENT "Copying clang's ${f}...")
    list(APPEND out_files ${dst})
  endforeach( f )
So it seems like cmake's copy_if_different doesn't create new directories on Darwin. Can you please confirm that?
http://reviews.llvm.org/D3908
    
    
More information about the llvm-commits
mailing list