[compiler-rt] r273265 - [compiler-rt] Split cflags and link flags to avoid warnings
Etienne Bergeron via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 21 07:46:32 PDT 2016
Author: etienneb
Date: Tue Jun 21 09:46:32 2016
New Revision: 273265
URL: http://llvm.org/viewvc/llvm-project?rev=273265&view=rev
Log:
[compiler-rt] Split cflags and link flags to avoid warnings
Summary:
The MSVC compiler is complaining about invalid flags. The CFLAGS are passed
to the linker (i.e. /Gy-, ...).
Reviewers: rnk
Subscribers: llvm-commits, kubabrecka, chrisha
Differential Revision: http://reviews.llvm.org/D21554
Modified:
compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake
Modified: compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake?rev=273265&r1=273264&r2=273265&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake (original)
+++ compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake Tue Jun 21 09:46:32 2016
@@ -106,7 +106,8 @@ function(add_compiler_rt_runtime name ty
set(output_name_${libname} ${libname}${COMPILER_RT_OS_SUFFIX})
else()
set(libname "${name}-dynamic-${arch}")
- set(extra_linkflags_${libname} ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS} ${LIB_LINKFLAGS})
+ set(extra_cflags_${libname} ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS})
+ set(extra_linkflags_${libname} ${TARGET_${arch}_LINKFLAGS} ${LIB_LINKFLAGS})
if(WIN32)
set(output_name_${libname} ${name}_dynamic-${arch}${COMPILER_RT_OS_SUFFIX})
else()
Modified: compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake?rev=273265&r1=273264&r2=273265&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake (original)
+++ compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake Tue Jun 21 09:46:32 2016
@@ -107,6 +107,7 @@ endfunction()
# If successful, saves target flags for this architecture.
macro(test_target_arch arch def)
set(TARGET_${arch}_CFLAGS ${ARGN})
+ set(TARGET_${arch}_LINKFLAGS ${ARGN})
set(argstring "")
foreach(arg ${ARGN})
set(argstring "${argstring} ${arg}")
More information about the llvm-commits
mailing list