summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2015-09-08 07:42:06 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2015-09-08 07:42:06 +0000
commitbb7483dd77bc48e3af2dd534d8ca65f6accd315f (patch)
tree141c2d880e2bbf9a9a65a481e15e3271e74d137b
parentdec0f0885f4266a0c9b1ec2c913b97550332e49e (diff)
downloadbcm5719-llvm-bb7483dd77bc48e3af2dd534d8ca65f6accd315f.tar.gz
bcm5719-llvm-bb7483dd77bc48e3af2dd534d8ca65f6accd315f.zip
[CMake][CMP0051] Avoid for user of objlib to use llvm_update_compile_flags().
$<TARGET_OBJECTS> shouldn't require compile flags. Flags are set in obj.${name}. llvm-svn: 246984
-rw-r--r--llvm/cmake/modules/AddLLVM.cmake10
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 0f3b660b95f..840a860b016 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/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})
+ # $<TARGET_OBJECTS> 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})
+ # $<TARGET_OBJECTS> 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
OpenPOWER on IntegriCloud