[llvm-commits] [compiler-rt] r158811 - in /compiler-rt/trunk/lib: CMakeLists.txt asan/CMakeLists.txt sanitizer_common/CMakeLists.txt
Kostya Serebryany
kcc at google.com
Wed Jun 20 03:39:22 PDT 2012
On Wed, Jun 20, 2012 at 2:18 PM, Chandler Carruth <chandlerc at gmail.com>wrote:
> Author: chandlerc
> Date: Wed Jun 20 05:18:43 2012
> New Revision: 158811
>
> URL: http://llvm.org/viewvc/llvm-project?rev=158811&view=rev
> Log:
> Resuming work on the compiler-rt CMake build at long long last. In order
> to get it working again, two changes were needed:
>
> - I had to give up on glob-based file expansion.
I never used cmake, but this sounds strange.
At least this is a regression compared to the old makefiles, which use
glob expansion.
Not a big deal, but until we switch to cmake completely, it'll be hard to
maintain it in working state.
Thanks anyway!
--kcc
> This just isn't well
> supported by CMake, and until we convince upstream there of its value,
> it's not worth dealing with the pain.
> - Add the common library as otherwise even ASan won't build.
>
> This now builds again, although the "correctness" of it is a touch
> debatable. ;] Specifically, there is no merging of the common runtime
> library with the asan runtime library into a single archive file. I'm
> not really sure what the best technique is for that, and it may be
> influenced by the ongoing discussion about how best to link runtime
> libraries.
>
> Note of course that this is still very much WIP. It doesn't entirely
> work yet, and remains disabled by the LLVM projects/CMakeLists.txt until
> it is in a working state.
>
> Added:
> compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt
> Modified:
> compiler-rt/trunk/lib/CMakeLists.txt
> compiler-rt/trunk/lib/asan/CMakeLists.txt
>
> Modified: compiler-rt/trunk/lib/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/CMakeLists.txt?rev=158811&r1=158810&r2=158811&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/CMakeLists.txt (original)
> +++ compiler-rt/trunk/lib/CMakeLists.txt Wed Jun 20 05:18:43 2012
> @@ -2,27 +2,172 @@
> # generic implementations of the core runtime library along with optimized
> # architecture-specific code in various subdirectories.
>
> -file(GLOB GENERIC_SOURCES . "*.c")
> -
> -# FIXME: We don't currently support building an atomic library, and as it
> must
> -# be a separate library from the runtime library, we need to remove its
> source
> -# code from the glob.
> -file(GLOB ATOMIC . "atomic.c")
> -list(REMOVE_ITEM GENERIC_SOURCES ${ATOMIC})
> +set(GENERIC_SOURCES
> + absvdi2.c
> + absvsi2.c
> + absvti2.c
> + adddf3.c
> + addsf3.c
> + addvdi3.c
> + addvsi3.c
> + addvti3.c
> + apple_versioning.c
> + ashldi3.c
> + ashlti3.c
> + ashrdi3.c
> + ashrti3.c
> + clear_cache.c
> + clzdi2.c
> + clzsi2.c
> + clzti2.c
> + cmpdi2.c
> + cmpti2.c
> + comparedf2.c
> + comparesf2.c
> + ctzdi2.c
> + ctzsi2.c
> + ctzti2.c
> + divdc3.c
> + divdf3.c
> + divdi3.c
> + divmoddi4.c
> + divmodsi4.c
> + divsc3.c
> + divsf3.c
> + divsi3.c
> + divti3.c
> + divxc3.c
> + enable_execute_stack.c
> + eprintf.c
> + extendsfdf2.c
> + ffsdi2.c
> + ffsti2.c
> + fixdfdi.c
> + fixdfsi.c
> + fixdfti.c
> + fixsfdi.c
> + fixsfsi.c
> + fixsfti.c
> + fixunsdfdi.c
> + fixunsdfsi.c
> + fixunsdfti.c
> + fixunssfdi.c
> + fixunssfsi.c
> + fixunssfti.c
> + fixunsxfdi.c
> + fixunsxfsi.c
> + fixunsxfti.c
> + fixxfdi.c
> + fixxfti.c
> + floatdidf.c
> + floatdisf.c
> + floatdixf.c
> + floatsidf.c
> + floatsisf.c
> + floattidf.c
> + floattisf.c
> + floattixf.c
> + floatundidf.c
> + floatundisf.c
> + floatundixf.c
> + floatunsidf.c
> + floatunsisf.c
> + floatuntidf.c
> + floatuntisf.c
> + floatuntixf.c
> + gcc_personality_v0.c
> + int_util.c
> + lshrdi3.c
> + lshrti3.c
> + moddi3.c
> + modsi3.c
> + modti3.c
> + muldc3.c
> + muldf3.c
> + muldi3.c
> + mulodi4.c
> + mulosi4.c
> + muloti4.c
> + mulsc3.c
> + mulsf3.c
> + multi3.c
> + mulvdi3.c
> + mulvsi3.c
> + mulvti3.c
> + mulxc3.c
> + negdf2.c
> + negdi2.c
> + negsf2.c
> + negti2.c
> + negvdi2.c
> + negvsi2.c
> + negvti2.c
> + paritydi2.c
> + paritysi2.c
> + parityti2.c
> + popcountdi2.c
> + popcountsi2.c
> + popcountti2.c
> + powidf2.c
> + powisf2.c
> + powitf2.c
> + powixf2.c
> + subdf3.c
> + subsf3.c
> + subvdi3.c
> + subvsi3.c
> + subvti3.c
> + trampoline_setup.c
> + truncdfsf2.c
> + ucmpdi2.c
> + ucmpti2.c
> + udivdi3.c
> + udivmoddi4.c
> + udivmodsi4.c
> + udivmodti4.c
> + udivsi3.c
> + udivti3.c
> + umoddi3.c
> + umodsi3.c
> + umodti3.c
> + )
>
> if(CAN_TARGET_X86_64)
> - file(GLOB X86_64_SOURCES . "*.c" "*.S")
> - add_library(clang_rt.x86_64 STATIC ${X86_64_SOURCES} ${GENERIC_SOURCES})
> + add_library(clang_rt.x86_64 STATIC
> + x86_64/floatdidf.c
> + x86_64/floatdisf.c
> + x86_64/floatdixf.c
> + x86_64/floatundidf.S
> + x86_64/floatundisf.S
> + x86_64/floatundixf.S
> + ${GENERIC_SOURCES}
> + )
> set_target_properties(clang_rt.x86_64 PROPERTIES COMPILE_FLAGS
> "${TARGET_X86_64_CFLAGS}")
> endif()
> if(CAN_TARGET_I386)
> - file(GLOB I386_SOURCES . "*.c" "*.S")
> - add_library(clang_rt.i386 STATIC ${I386_SOURCES} ${GENERIC_SOURCES})
> + add_library(clang_rt.i386 STATIC
> + i386/ashldi3.S
> + i386/ashrdi3.S
> + i386/divdi3.S
> + i386/floatdidf.S
> + i386/floatdisf.S
> + i386/floatdixf.S
> + i386/floatundidf.S
> + i386/floatundisf.S
> + i386/floatundixf.S
> + i386/lshrdi3.S
> + i386/moddi3.S
> + i386/muldi3.S
> + i386/udivdi3.S
> + i386/umoddi3.S
> + ${GENERIC_SOURCES}
> + )
> set_target_properties(clang_rt.i386 PROPERTIES COMPILE_FLAGS
> "${TARGET_I386_CFLAGS}")
> endif()
>
> # Also support building feature-based runtime libraries in their various
> # subdircetories.
> +add_subdirectory(sanitizer_common)
> add_subdirectory(asan)
>
> # FIXME: Add support for the profile library.
>
> Modified: compiler-rt/trunk/lib/asan/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/CMakeLists.txt?rev=158811&r1=158810&r2=158811&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/asan/CMakeLists.txt (original)
> +++ compiler-rt/trunk/lib/asan/CMakeLists.txt Wed Jun 20 05:18:43 2012
> @@ -1,6 +1,27 @@
> # Build for the AddressSanitizer runtime support library.
>
> -file(GLOB ASAN_SOURCES "*.cc")
> +include_directories(..)
> +
> +set(ASAN_SOURCES
> + asan_allocator.cc
> + asan_globals.cc
> + asan_interceptors.cc
> + asan_linux.cc
> + asan_mac.cc
> + asan_malloc_linux.cc
> + asan_malloc_mac.cc
> + asan_malloc_win.cc
> + asan_new_delete.cc
> + asan_poisoning.cc
> + asan_posix.cc
> + asan_printf.cc
> + asan_rtl.cc
> + asan_stack.cc
> + asan_stats.cc
> + asan_thread.cc
> + asan_thread_registry.cc
> + asan_win.cc
> + )
>
> if(CAN_TARGET_X86_64)
> add_library(clang_rt.asan-x86_64 STATIC ${ASAN_SOURCES})
>
> Added: compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt?rev=158811&view=auto
>
> ==============================================================================
> --- compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt (added)
> +++ compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt Wed Jun 20
> 05:18:43 2012
> @@ -0,0 +1,23 @@
> +# Build system for the common Sanitizer runtime support library
> components.
> +# These components are shared between AddressSanitizer and
> ThreadSanitizer.
> +
> +set(SANITIZER_SOURCES
> + sanitizer_allocator.cc
> + sanitizer_common.cc
> + sanitizer_libc.cc
> + sanitizer_linux.cc
> + sanitizer_mac.cc
> + sanitizer_posix.cc
> + sanitizer_printf.cc
> + sanitizer_symbolizer.cc
> + sanitizer_win.cc
> + )
> +
> +if(CAN_TARGET_X86_64)
> + add_library(clang_rt.sanitizer-x86_64 STATIC ${SANITIZER_SOURCES})
> + set_target_properties(clang_rt.sanitizer-x86_64 PROPERTIES
> COMPILE_FLAGS "${TARGET_X86_64_CFLAGS}")
> +endif()
> +if(CAN_TARGET_I386)
> + add_library(clang_rt.sanitizer-i386 STATIC ${SANITIZER_SOURCES})
> + set_target_properties(clang_rt.sanitizer-i386 PROPERTIES COMPILE_FLAGS
> "${TARGET_I386_CFLAGS}")
> +endif()
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120620/6571021f/attachment.html>
More information about the llvm-commits
mailing list