r229554 - Remove support for building sanitizers from Makefile/autoconf build.

Matthias Braun mbraun at apple.com
Tue Feb 17 15:37:53 PST 2015


Hi Alexey,

I reverted the commit for now to unbreak our bots / resolve merge conflicts. You can discuss the details with Anna or Kuba.

Greetings
    Matthias

> On Feb 17, 2015, at 1:53 PM, Alexey Samsonov <vonosmas at gmail.com> wrote:
> 
> Author: samsonov
> Date: Tue Feb 17 15:53:22 2015
> New Revision: 229554
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=229554&view=rev
> Log:
> Remove support for building sanitizers from Makefile/autoconf build.
> 
> They autotools build has a number of missing features, supports less
> OS, architectures, build configurations, doesn't have any tests and
> is hard to support in sync with CMake build.
> 
> Modified:
>    cfe/trunk/docs/AddressSanitizer.rst
>    cfe/trunk/docs/MemorySanitizer.rst
>    cfe/trunk/docs/ThreadSanitizer.rst
>    cfe/trunk/runtime/compiler-rt/Makefile
> 
> Modified: cfe/trunk/docs/AddressSanitizer.rst
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/AddressSanitizer.rst?rev=229554&r1=229553&r2=229554&view=diff
> ==============================================================================
> --- cfe/trunk/docs/AddressSanitizer.rst (original)
> +++ cfe/trunk/docs/AddressSanitizer.rst Tue Feb 17 15:53:22 2015
> @@ -23,8 +23,7 @@ Typical slowdown introduced by AddressSa
> How to build
> ============
> 
> -Follow the `clang build instructions <../get_started.html>`_. CMake build is
> -supported.
> +Build LLVM/Clang with `CMake <http://llvm.org/docs/CMake.html>`_.
> 
> Usage
> =====
> 
> Modified: cfe/trunk/docs/MemorySanitizer.rst
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/MemorySanitizer.rst?rev=229554&r1=229553&r2=229554&view=diff
> ==============================================================================
> --- cfe/trunk/docs/MemorySanitizer.rst (original)
> +++ cfe/trunk/docs/MemorySanitizer.rst Tue Feb 17 15:53:22 2015
> @@ -16,8 +16,7 @@ Typical slowdown introduced by MemorySan
> How to build
> ============
> 
> -Follow the `clang build instructions <../get_started.html>`_. CMake
> -build is supported.
> +Build LLVM/Clang with `CMake <http://llvm.org/docs/CMake.html>`_.
> 
> Usage
> =====
> 
> Modified: cfe/trunk/docs/ThreadSanitizer.rst
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/ThreadSanitizer.rst?rev=229554&r1=229553&r2=229554&view=diff
> ==============================================================================
> --- cfe/trunk/docs/ThreadSanitizer.rst (original)
> +++ cfe/trunk/docs/ThreadSanitizer.rst Tue Feb 17 15:53:22 2015
> @@ -12,8 +12,7 @@ ThreadSanitizer is about **5x-10x**.
> How to build
> ------------
> 
> -Follow the `Clang build instructions <../get_started.html>`_.  CMake build is
> -supported.
> +Build LLVM/Clang with `CMake <http://llvm.org/docs/CMake.html>`_.
> 
> Supported Platforms
> -------------------
> 
> Modified: cfe/trunk/runtime/compiler-rt/Makefile
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/runtime/compiler-rt/Makefile?rev=229554&r1=229553&r2=229554&view=diff
> ==============================================================================
> --- cfe/trunk/runtime/compiler-rt/Makefile (original)
> +++ cfe/trunk/runtime/compiler-rt/Makefile Tue Feb 17 15:53:22 2015
> @@ -23,9 +23,7 @@ ResourceDir := $(PROJ_OBJ_ROOT)/$(BuildM
> PROJ_resources := $(DESTDIR)$(PROJ_prefix)/lib/clang/$(CLANG_VERSION)
> 
> ResourceLibDir := $(ResourceDir)/lib
> -ResourceIncludeDir := $(ResourceDir)/include
> PROJ_resources_lib := $(PROJ_resources)/lib
> -PROJ_resources_include := $(PROJ_resources)/include
> 
> # Expect compiler-rt to be in llvm/projects/compiler-rt
> COMPILERRT_SRC_ROOT := $(LLVM_SRC_ROOT)/projects/compiler-rt
> @@ -77,9 +75,7 @@ ifeq ($(OS),Darwin)
> RuntimeDirs += darwin macho_embedded
> RuntimeLibrary.darwin.Configs := \
> 	eprintf.a 10.4.a osx.a cc_kext.a \
> -	asan_osx_dynamic.dylib \
> -	profile_osx.a \
> -	ubsan_osx.a
> +	profile_osx.a
> 
> IOS_SDK := $(shell xcrun --show-sdk-path -sdk iphoneos 2> /dev/null)
> IOSSIM_SDK := $(shell xcrun --show-sdk-path -sdk iphonesimulator 2> /dev/null)
> @@ -92,10 +88,6 @@ ifneq ($(IOS_SDK),)
> RuntimeLibrary.darwin.Configs += cc_kext_ios5.a
> endif
> 
> -ifneq ($(IOSSIM_SDK),)
> -RuntimeLibrary.darwin.Configs += asan_iossim_dynamic.dylib
> -endif
> -
> RuntimeLibrary.macho_embedded.Configs := \
> 	hard_static.a hard_pic.a
> ifneq (,$(findstring ARM,$(TARGETS_TO_BUILD)))
> @@ -122,8 +114,7 @@ TryCompile = \
> 
> # We try to build 32-bit runtimes both on 32-bit hosts and 64-bit hosts.
> Runtime32BitConfigs = \
> -	builtins-i386.a profile-i386.a san-i386.a asan-i386.a asan_cxx-i386.a \
> -	ubsan-i386.a ubsan_cxx-i386.a
> +	builtins-i386.a profile-i386.a
> 
> # We currently only try to generate runtime libraries on x86.
> ifeq ($(ARCH),x86)
> @@ -132,21 +123,15 @@ endif
> 
> ifeq ($(ARCH),x86_64)
> RuntimeLibrary.linux.Configs += \
> -	builtins-x86_64.a profile-x86_64.a san-x86_64.a asan-x86_64.a \
> -	asan_cxx-x86_64.a tsan-x86_64.a msan-x86_64.a ubsan-x86_64.a \
> -	ubsan_cxx-x86_64.a dfsan-x86_64.a lsan-x86_64.a
> -# We need to build 32-bit ASan/UBsan libraries on 64-bit platform, and add them
> -# to the list of runtime libraries to make
> -# "clang -fsanitize=(address|undefined) -m32" work.
> +	builtins-x86_64.a profile-x86_64.a
> +# We need to build 32-bit libraries on 64-bit platform, and add them
> +# to the list of runtime libraries to make "clang -m32" work.
> # We check that Clang can produce working 32-bit binaries by compiling a simple
> # executable.
> test_source = $(LLVM_SRC_ROOT)/tools/clang/runtime/compiler-rt/clang_linux_test_input.c
> ifeq ($(call TryCompile,$(ToolDir)/clang,$(test_source),-m32),0)
> RuntimeLibrary.linux.Configs += $(Runtime32BitConfigs)
> endif
> -ifneq ($(LLVM_ANDROID_TOOLCHAIN_DIR),)
> -RuntimeLibrary.linux.Configs += asan-arm-android.so
> -endif
> endif
> 
> endif
> @@ -166,7 +151,6 @@ BuildRuntimeLibraries:
> 	  ProjObjRoot=$(PROJ_OBJ_DIR) \
> 	  CC="$(ToolDir)/clang" \
> 	  VERBOSE=$(VERBOSE) \
> -	  LLVM_ANDROID_TOOLCHAIN_DIR="$(LLVM_ANDROID_TOOLCHAIN_DIR)" \
> 	  $(RuntimeDirs:%=clang_%)
> .PHONY: BuildRuntimeLibraries
> CleanRuntimeLibraries:
> @@ -176,18 +160,10 @@ CleanRuntimeLibraries:
> 	  VERBOSE=$(VERBOSE) \
> 	  clean
> .PHONY: CleanRuntimeLibraries
> -RuntimeHeader: $(ResourceIncludeDir)/sanitizer
> 
> $(PROJ_resources_lib):
> 	$(Verb) $(MKDIR) $@
> 
> -$(ResourceIncludeDir):
> -	$(Verb) $(MKDIR) $@
> -
> -$(ResourceIncludeDir)/sanitizer: $(ResourceIncludeDir)
> -	$(Verb) $(MKDIR) $@
> -	$(Verb) cp $(COMPILERRT_SRC_ROOT)/include/sanitizer/*.h $@
> -
> # Expand rules for copying/installing each individual library. We can't use
> # implicit rules here because we need to match against multiple things.
> define RuntimeLibraryTemplate
> @@ -242,21 +218,9 @@ RuntimeLibraryInstall.$1: \
> endef
> $(foreach lib,$(RuntimeDirs), $(eval $(call RuntimeLibraryTemplate,$(lib))))
> 
> -$(PROJ_resources_include):
> -	$(Verb) $(MKDIR) $@
> -
> -$(PROJ_resources_include)/sanitizer: $(ResourceIncludeDir)/sanitizer $(PROJ_resources_include)
> -	$(Verb) $(MKDIR) $@
> -	$(Echo) Installing compiler runtime headers
> -	$(Verb) $(DataInstall) $(ResourceIncludeDir)/sanitizer/* \
> -                               $(PROJ_resources_include)/sanitizer
> -
> -RuntimeHeaderInstall: $(PROJ_resources_include)/sanitizer
> -.PHONY: RuntimeHeaderInstall
> -
> # Hook into the standard Makefile rules.
> -all-local:: $(RuntimeDirs:%=RuntimeLibrary.%) RuntimeHeader
> -install-local:: $(RuntimeDirs:%=RuntimeLibraryInstall.%) RuntimeHeaderInstall
> +all-local:: $(RuntimeDirs:%=RuntimeLibrary.%)
> +install-local:: $(RuntimeDirs:%=RuntimeLibraryInstall.%)
> clean-local:: CleanRuntimeLibraries
> 
> endif
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits





More information about the cfe-commits mailing list