Skip to content

Commit

Permalink
Add patch for LLVM-3.9+Clang+macOS Sierra (#18920)
Browse files Browse the repository at this point in the history
Removes hardcoded lower version bounds incompatible with Sierra
in CMake file for compiler-rt
  • Loading branch information
andreasnoack authored Oct 22, 2017
1 parent f0bade6 commit 0385a60
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
7 changes: 7 additions & 0 deletions deps/llvm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,13 @@ $(eval $(call LLVM_PATCH,llvm-D34078-vectorize-fdiv))
$(eval $(call LLVM_PATCH,llvm-4.0.0-D37576-NVPTX-sm_70)) # NVPTX, Remove for 6.0
endif # LLVM_VER

# Remove hardcoded OS X requirements in compilter-rt cmake build
ifeq ($(LLVM_VER_SHORT),3.9)
ifeq ($(BUILD_LLVM_CLANG),1)
$(eval $(call LLVM_PATCH,llvm-3.9-osx-10.12))
endif
endif

$(LLVM_BUILDDIR_withtype)/build-configured: $(LLVM_PATCH_PREV)

$(LLVM_BUILDDIR_withtype)/build-configured: $(LLVM_SRC_DIR)/source-extracted | $(llvm_python_workaround) $(LIBCXX_DEPENDENCY)
Expand Down
33 changes: 33 additions & 0 deletions deps/patches/llvm-3.9-osx-10.12.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
--- a/projects/compiler-rt/cmake/builtin-config-ix.cmake
+++ b/projects/compiler-rt/cmake/builtin-config-ix.cmake
@@ -57,9 +57,6 @@
find_darwin_sdk_dir(DARWIN_tvos_SYSROOT appletvos)

set(DARWIN_EMBEDDED_PLATFORMS)
- set(DARWIN_osx_BUILTIN_MIN_VER 10.5)
- set(DARWIN_osx_BUILTIN_MIN_VER_FLAG
- -mmacosx-version-min=${DARWIN_osx_BUILTIN_MIN_VER})

if(COMPILER_RT_ENABLE_IOS)
list(APPEND DARWIN_EMBEDDED_PLATFORMS ios)
@@ -101,20 +98,6 @@
set(CAN_TARGET_${arch} 1)
endforeach()

- # Need to build a 10.4 compatible libclang_rt
- set(DARWIN_10.4_SYSROOT ${DARWIN_osx_SYSROOT})
- set(DARWIN_10.4_BUILTIN_MIN_VER 10.4)
- set(DARWIN_10.4_BUILTIN_MIN_VER_FLAG
- -mmacosx-version-min=${DARWIN_10.4_BUILTIN_MIN_VER})
- set(DARWIN_10.4_SKIP_CC_KEXT On)
- darwin_test_archs(10.4 DARWIN_10.4_ARCHS i386 x86_64)
- message(STATUS "OSX 10.4 supported builtin arches: ${DARWIN_10.4_ARCHS}")
- if(DARWIN_10.4_ARCHS)
- # don't include the Haswell slice in the 10.4 compatibility library
- list(REMOVE_ITEM DARWIN_10.4_ARCHS x86_64h)
- list(APPEND BUILTIN_SUPPORTED_OS 10.4)
- endif()
-
foreach(platform ${DARWIN_EMBEDDED_PLATFORMS})
if(DARWIN_${platform}sim_SYSROOT)
set(DARWIN_${platform}sim_BUILTIN_MIN_VER

1 comment on commit 0385a60

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

Please sign in to comment.