[PATCH] D21554: [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:41:13 PDT 2016


etienneb updated this revision to Diff 61370.
etienneb added a comment.

split


http://reviews.llvm.org/D21554

Files:
  cmake/Modules/AddCompilerRT.cmake
  cmake/Modules/CompilerRTUtils.cmake

Index: cmake/Modules/CompilerRTUtils.cmake
===================================================================
--- cmake/Modules/CompilerRTUtils.cmake
+++ cmake/Modules/CompilerRTUtils.cmake
@@ -107,6 +107,7 @@
 # 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}")
Index: cmake/Modules/AddCompilerRT.cmake
===================================================================
--- cmake/Modules/AddCompilerRT.cmake
+++ cmake/Modules/AddCompilerRT.cmake
@@ -106,7 +106,8 @@
         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()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21554.61370.patch
Type: text/x-patch
Size: 1192 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160621/0aff28e2/attachment.bin>


More information about the llvm-commits mailing list