X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=cmake%2Fmodules%2FAddLLVM.cmake;h=840a860b0163aad402e30b6dafc4bc3c336b3566;hp=0f3b660b95f81fbd6ed402e63011ce2083f06223;hb=734139208045d50c630dde13487e1c655e3f8d3a;hpb=27828d7a5e1624965699cdb6bc0716005ded310e diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index 0f3b660b95f..840a860b016 100644 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -399,7 +399,10 @@ function(llvm_add_library name) endif() set_output_directory(${name} ${LLVM_RUNTIME_OUTPUT_INTDIR} ${LLVM_LIBRARY_OUTPUT_INTDIR}) - llvm_update_compile_flags(${name}) + # $ doesn't require compile flags. + if(NOT obj_name) + llvm_update_compile_flags(${name}) + endif() add_link_opts( ${name} ) if(ARG_OUTPUT_NAME) set_target_properties(${name} @@ -597,7 +600,10 @@ macro(add_llvm_executable name) set_windows_version_resource_properties(${name} ${windows_resource_file}) endif() - llvm_update_compile_flags(${name}) + # $ doesn't require compile flags. + if(NOT LLVM_ENABLE_OBJLIB) + llvm_update_compile_flags(${name}) + endif() add_link_opts( ${name} ) # Do not add -Dname_EXPORTS to the command-line when building files in this