[compiler-rt] r258916 - [compiler-rt] list_union() is actually an intersect operation. Rename it.

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 27 10:49:09 PST 2016


Merged in r258963.

Thanks,
Hans

On Wed, Jan 27, 2016 at 9:53 AM, Alexey Samsonov <samsonov at google.com> wrote:
> Ouch. Yes, let's merge it to avoid confusion.
>
> On Wed, Jan 27, 2016 at 9:24 AM, Hans Wennborg <hans at chromium.org> wrote:
>>
>> +Alexey who owns the CMake build in compiler-rt.
>>
>> On Wed, Jan 27, 2016 at 1:41 AM, Daniel Sanders
>> <Daniel.Sanders at imgtec.com> wrote:
>> > Hi Hans,
>> >
>> > This isn't associated with any bug but I think we ought to merge it. Is
>> > it ok to merge?
>> >
>> >> -----Original Message-----
>> >> From: llvm-commits [mailto:llvm-commits-bounces at lists.llvm.org] On
>> >> Behalf
>> >> Of Daniel Sanders via llvm-commits
>> >> Sent: 27 January 2016 09:28
>> >> To: llvm-commits at lists.llvm.org
>> >> Subject: [compiler-rt] r258916 - [compiler-rt] list_union() is actually
>> >> an
>> >> intersect operation. Rename it.
>> >>
>> >> Author: dsanders
>> >> Date: Wed Jan 27 03:28:01 2016
>> >> New Revision: 258916
>> >>
>> >> URL: http://llvm.org/viewvc/llvm-project?rev=258916&view=rev
>> >> Log:
>> >> [compiler-rt] list_union() is actually an intersect operation. Rename
>> >> it.
>> >>
>> >> Summary:
>> >> Given:
>> >>   set(T1 a b c)
>> >>   set(T2 b c d)
>> >>   message("T1=${T1}")
>> >>   message("T2=${T2}")
>> >>   list_union(T3 T1 T2)
>> >>   message("T3=${T3}")
>> >> cmake emitted:
>> >>   T1=a;b;c
>> >>   T2=b;c;d
>> >>   T3=b;c
>> >>
>> >> Reviewers: beanz
>> >>
>> >> Subscribers: llvm-commits
>> >>
>> >> Differential Revision: http://reviews.llvm.org/D16580
>> >>
>> >> Modified:
>> >>     compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
>> >>     compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake
>> >>     compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake
>> >>     compiler-rt/trunk/cmake/config-ix.cmake
>> >>
>> >> Modified: compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
>> >> URL: http://llvm.org/viewvc/llvm-project/compiler-
>> >> rt/trunk/cmake/Modules/AddCompilerRT.cmake?rev=258916&r1=258915&r
>> >> 2=258916&view=diff
>> >> ==========================================================
>> >> ====================
>> >> --- compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake (original)
>> >> +++ compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake Wed Jan 27
>> >> 03:28:01 2016
>> >> @@ -19,7 +19,7 @@ function(add_compiler_rt_object_librarie
>> >>        set(libname "${name}.${os}")
>> >>        set(libnames ${libnames} ${libname})
>> >>        set(extra_cflags_${libname} ${DARWIN_${os}_CFLAGS})
>> >> -      list_union(LIB_ARCHS_${libname} DARWIN_${os}_ARCHS LIB_ARCHS)
>> >> +      list_intersect(LIB_ARCHS_${libname} DARWIN_${os}_ARCHS
>> >> LIB_ARCHS)
>> >>      endforeach()
>> >>    else()
>> >>      foreach(arch ${LIB_ARCHS})
>> >> @@ -87,7 +87,7 @@ function(add_compiler_rt_runtime name ty
>> >>          set(libname "${name}_${os}_dynamic")
>> >>          set(extra_linkflags_${libname} ${DARWIN_${os}_LINKFLAGS}
>> >> ${LIB_LINKFLAGS})
>> >>        endif()
>> >> -      list_union(LIB_ARCHS_${libname} DARWIN_${os}_ARCHS LIB_ARCHS)
>> >> +      list_intersect(LIB_ARCHS_${libname} DARWIN_${os}_ARCHS
>> >> LIB_ARCHS)
>> >>        if(LIB_ARCHS_${libname})
>> >>          list(APPEND libnames ${libname})
>> >>          set(extra_cflags_${libname} ${DARWIN_${os}_CFLAGS}
>> >> ${LIB_CFLAGS})
>> >>
>> >> Modified: compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake
>> >> URL: http://llvm.org/viewvc/llvm-project/compiler-
>> >> rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake?rev=258916&r1=25
>> >> 8915&r2=258916&view=diff
>> >> ==========================================================
>> >> ====================
>> >> --- compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake
>> >> (original)
>> >> +++ compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake Wed
>> >> Jan 27 03:28:01 2016
>> >> @@ -91,7 +91,7 @@ endfunction()
>> >>  # This function checks the host cpusubtype to see if it is
>> >> post-haswell.
>> >> Haswell
>> >>  # and later machines can run x86_64h binaries. Haswell is cpusubtype
>> >> 8.
>> >>  function(darwin_filter_host_archs input output)
>> >> -  list_union(tmp_var DARWIN_osx_ARCHS ${input})
>> >> +  list_intersect(tmp_var DARWIN_osx_ARCHS ${input})
>> >>    execute_process(
>> >>      COMMAND sysctl hw.cpusubtype
>> >>      OUTPUT_VARIABLE SUBTYPE)
>> >> @@ -285,7 +285,7 @@ macro(darwin_add_builtin_libraries)
>> >>                        ../profile/InstrProfilingPlatformDarwin
>> >>                        ../profile/InstrProfilingWriter)
>> >>    foreach (os ${ARGN})
>> >> -    list_union(DARWIN_BUILTIN_ARCHS DARWIN_${os}_ARCHS
>> >> BUILTIN_SUPPORTED_ARCH)
>> >> +    list_intersect(DARWIN_BUILTIN_ARCHS DARWIN_${os}_ARCHS
>> >> BUILTIN_SUPPORTED_ARCH)
>> >>      foreach (arch ${DARWIN_BUILTIN_ARCHS})
>> >>
>> >> darwin_find_excluded_builtins_list(${arch}_${os}_EXCLUDED_BUILTINS
>> >>                                OS ${os}
>> >>
>> >> Modified: compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake
>> >> URL: http://llvm.org/viewvc/llvm-project/compiler-
>> >> rt/trunk/cmake/Modules/CompilerRTUtils.cmake?rev=258916&r1=258915&r
>> >> 2=258916&view=diff
>> >> ==========================================================
>> >> ====================
>> >> --- compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake (original)
>> >> +++ compiler-rt/trunk/cmake/Modules/CompilerRTUtils.cmake Wed Jan 27
>> >> 03:28:01 2016
>> >> @@ -58,7 +58,7 @@ macro(append_have_file_definition filena
>> >>    list(APPEND ${list} "${varname}=${${varname}}")
>> >>  endmacro()
>> >>
>> >> -macro(list_union output input1 input2)
>> >> +macro(list_intersect output input1 input2)
>> >>    set(${output})
>> >>    foreach(it ${${input1}})
>> >>      list(FIND ${input2} ${it} index)
>> >>
>> >> Modified: compiler-rt/trunk/cmake/config-ix.cmake
>> >> URL:
>> >> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-
>> >> ix.cmake?rev=258916&r1=258915&r2=258916&view=diff
>> >> ==========================================================
>> >> ====================
>> >> --- compiler-rt/trunk/cmake/config-ix.cmake (original)
>> >> +++ compiler-rt/trunk/cmake/config-ix.cmake Wed Jan 27 03:28:01 2016
>> >> @@ -488,42 +488,42 @@ if(APPLE)
>> >>      endforeach()
>> >>    endif()
>> >>
>> >> -  # for list_union
>> >> +  # for list_intersect
>> >>    include(CompilerRTUtils)
>> >>
>> >> -  list_union(BUILTIN_SUPPORTED_ARCH ALL_BUILTIN_SUPPORTED_ARCH
>> >> toolchain_arches)
>> >> +  list_intersect(BUILTIN_SUPPORTED_ARCH
>> >> ALL_BUILTIN_SUPPORTED_ARCH toolchain_arches)
>> >>
>> >> -  list_union(SANITIZER_COMMON_SUPPORTED_ARCH
>> >> +  list_intersect(SANITIZER_COMMON_SUPPORTED_ARCH
>> >>      ALL_SANITIZER_COMMON_SUPPORTED_ARCH
>> >>      COMPILER_RT_SUPPORTED_ARCH
>> >>      )
>> >>    set(LSAN_COMMON_SUPPORTED_ARCH
>> >> ${SANITIZER_COMMON_SUPPORTED_ARCH})
>> >>    set(UBSAN_COMMON_SUPPORTED_ARCH
>> >> ${SANITIZER_COMMON_SUPPORTED_ARCH})
>> >> -  list_union(ASAN_SUPPORTED_ARCH
>> >> +  list_intersect(ASAN_SUPPORTED_ARCH
>> >>      ALL_ASAN_SUPPORTED_ARCH
>> >>      SANITIZER_COMMON_SUPPORTED_ARCH)
>> >> -  list_union(DFSAN_SUPPORTED_ARCH
>> >> +  list_intersect(DFSAN_SUPPORTED_ARCH
>> >>      ALL_DFSAN_SUPPORTED_ARCH
>> >>      SANITIZER_COMMON_SUPPORTED_ARCH)
>> >> -  list_union(LSAN_SUPPORTED_ARCH
>> >> +  list_intersect(LSAN_SUPPORTED_ARCH
>> >>      ALL_LSAN_SUPPORTED_ARCH
>> >>      SANITIZER_COMMON_SUPPORTED_ARCH)
>> >> -  list_union(MSAN_SUPPORTED_ARCH
>> >> +  list_intersect(MSAN_SUPPORTED_ARCH
>> >>      ALL_MSAN_SUPPORTED_ARCH
>> >>      SANITIZER_COMMON_SUPPORTED_ARCH)
>> >> -  list_union(PROFILE_SUPPORTED_ARCH
>> >> +  list_intersect(PROFILE_SUPPORTED_ARCH
>> >>      ALL_PROFILE_SUPPORTED_ARCH
>> >>      SANITIZER_COMMON_SUPPORTED_ARCH)
>> >> -  list_union(TSAN_SUPPORTED_ARCH
>> >> +  list_intersect(TSAN_SUPPORTED_ARCH
>> >>      ALL_TSAN_SUPPORTED_ARCH
>> >>      SANITIZER_COMMON_SUPPORTED_ARCH)
>> >> -  list_union(UBSAN_SUPPORTED_ARCH
>> >> +  list_intersect(UBSAN_SUPPORTED_ARCH
>> >>      ALL_UBSAN_SUPPORTED_ARCH
>> >>      SANITIZER_COMMON_SUPPORTED_ARCH)
>> >> -  list_union(SAFESTACK_SUPPORTED_ARCH
>> >> +  list_intersect(SAFESTACK_SUPPORTED_ARCH
>> >>      ALL_SAFESTACK_SUPPORTED_ARCH
>> >>      SANITIZER_COMMON_SUPPORTED_ARCH)
>> >> -  list_union(CFI_SUPPORTED_ARCH
>> >> +  list_intersect(CFI_SUPPORTED_ARCH
>> >>      ALL_CFI_SUPPORTED_ARCH
>> >>      SANITIZER_COMMON_SUPPORTED_ARCH)
>> >>  else()
>> >>
>> >>
>> >> _______________________________________________
>> >> llvm-commits mailing list
>> >> llvm-commits at lists.llvm.org
>> >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
>
>
> --
> Alexey Samsonov, Mountain View, CA


More information about the llvm-commits mailing list