Bug 1331957 - Part 9: Upgrade cctools used for building clang on OS X for ld 264.3.102; r=froydnj
☠☠ backed out by 2a51c94218f2 ☠ ☠
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 23 Jan 2017 00:26:42 -0500
changeset 379019 6631f35829200fb92dcd40755ce2d2edb0734168
parent 379018 ccefeba51cf6596d717a7e78f8719cde4f947bd9
child 379020 f74c7a543525d772ca744c06b5523cda5178cd09
push id7198
push userjlorenzo@mozilla.com
push dateTue, 18 Apr 2017 12:07:49 +0000
treeherdermozilla-beta@d57aa49c3948 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1331957
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1331957 - Part 9: Upgrade cctools used for building clang on OS X for ld 264.3.102; r=froydnj
browser/config/tooltool-manifests/macosx64/cross-clang.manifest
build/build-clang/build-clang.py
build/build-clang/clang-static-analysis-macosx64.json
build/build-clang/clang-tidy-macosx64.json
build/build-clang/compiler-rt-cross-compile.patch
taskcluster/scripts/misc/build-clang-macosx.sh
taskcluster/scripts/misc/build-clang-tidy-macosx.sh
--- a/browser/config/tooltool-manifests/macosx64/cross-clang.manifest
+++ b/browser/config/tooltool-manifests/macosx64/cross-clang.manifest
@@ -11,22 +11,22 @@
 "version": "gcc 4.9.4 + PR64905",
 "size": 101297752,
 "digest": "42aa2e3fdd232b5e390472a788e7f7db71a1fee4221e260b6cb58c9a1d73e6cdd10afcbac137f7844290169cd6b561b424ecc92b159e9726b0ad5de3f478a8be",
 "algorithm": "sha512",
 "filename": "gcc.tar.xz",
 "unpack": true
 },
 {
-"size": 3008804,
+"size": 1349196,
 "visibility": "public",
-"digest": "ba6937f14f3d8b26dcb2d39490dee6b0a8afb60f672f5debb71d7b62c1ec52103201b4b1a3d258f945567de531384b36ddb2ce4aa73dc63d72305b11c146847c",
+"digest": "438a36523a74cbc4a58226647e0501fa64a1b63f32931dc364a75d699df8accb45afdf26f4cb61c6ac7f58be530205acb6da22008bec19603c6f6fda3a12a8cc",
 "algorithm": "sha512",
 "unpack": true,
-"filename": "cctools.tar.gz"
+"filename": "cctools.tar.xz"
 },
 {
 "size": 30823112,
 "visibility": "internal",
 "digest": "0c58e06a3ea8f4641c991a7406fc8733c574f0b4aa773bce0feaa5468d2b8440fa33cea056e16fad2b8a7ef4409ca7228113eb12adc87c3e115129d8a3b3b565",
 "algorithm": "sha512",
 "unpack": true,
 "filename": "MacOSX10.10.sdk.tar.xz"
--- a/build/build-clang/build-clang.py
+++ b/build/build-clang/build-clang.py
@@ -254,17 +254,17 @@ def build_one_stage(cc, cxx, asm, ld, ar
                        "-DCMAKE_OSX_SYSROOT=%s" % slashify_path(os.getenv("CROSS_SYSROOT")),
                        "-DCMAKE_FIND_ROOT_PATH=%s" % slashify_path(os.getenv("CROSS_CCTOOLS_PATH")),
                        "-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER",
                        "-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY",
                        "-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY",
                        "-DCMAKE_MACOSX_RPATH=@executable_path",
                        "-DCMAKE_OSX_ARCHITECTURES=x86_64",
                        "-DDARWIN_osx_ARCHS=x86_64",
-                       "-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-apple-darwin10"]
+                       "-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-apple-darwin11"]
     build_package(build_dir, cmake_args)
 
     if is_linux():
         install_libgcc(gcc_dir, inst_dir)
     # For some reasons the import library clang.lib of clang.exe is not
     # installed, so we copy it by ourselves.
     if is_windows():
         install_import_library(build_dir, inst_dir)
@@ -554,17 +554,17 @@ if __name__ == "__main__":
 
     if osx_cross_compile:
         # undo the damage done in the is_linux() block above, and also simulate
         # the is_darwin() block above.
         extra_cflags = []
         extra_cxxflags = ["-stdlib=libc++"]
         extra_cxxflags2 = ["-stdlib=libc++"]
 
-        extra_flags = ["-target", "x86_64-apple-darwin10", "-mlinker-version=136",
+        extra_flags = ["-target", "x86_64-apple-darwin11", "-mlinker-version=137",
                        "-B", "%s/bin" %  os.getenv("CROSS_CCTOOLS_PATH"),
                        "-isysroot", os.getenv("CROSS_SYSROOT"),
                        # technically the sysroot flag there should be enough to deduce this,
                        # but clang needs some help to figure this out.
                        "-I%s/usr/include" % os.getenv("CROSS_SYSROOT"),
                        "-iframework", "%s/System/Library/Frameworks" % os.getenv("CROSS_SYSROOT")]
         extra_cflags += extra_flags
         extra_cxxflags += extra_flags
--- a/build/build-clang/clang-static-analysis-macosx64.json
+++ b/build/build-clang/clang-static-analysis-macosx64.json
@@ -10,18 +10,18 @@
     "compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_390/final",
     "libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_390/final",
     "libcxxabi_repo": "https://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_390/final",
     "python_path": "/usr/bin/python2.7",
     "gcc_dir": "/home/worker/workspace/build/src/gcc",
     "cc": "/home/worker/workspace/build/src/clang/bin/clang",
     "cxx": "/home/worker/workspace/build/src/clang/bin/clang++",
     "as": "/home/worker/workspace/build/src/clang/bin/clang",
-    "ar": "/home/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin10-ar",
-    "ranlib": "/home/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin10-ranlib",
+    "ar": "/home/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin11-ar",
+    "ranlib": "/home/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin11-ranlib",
     "ld": "/home/worker/workspace/build/src/clang/bin/clang",
     "patches": {
         "macosx64": [
           "llvm-debug-frame.patch",
           "compiler-rt-cross-compile.patch",
           "pr28831-r280042.patch",
           "r277806.patch",
           "r285657.patch"
--- a/build/build-clang/clang-tidy-macosx64.json
+++ b/build/build-clang/clang-tidy-macosx64.json
@@ -12,18 +12,18 @@
     "compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/trunk",
     "libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/trunk",
     "libcxxabi_repo": "https://llvm.org/svn/llvm-project/libcxxabi/trunk",
     "python_path": "/usr/bin/python2.7",
     "gcc_dir": "/home/worker/workspace/build/src/gcc",
     "cc": "/home/worker/workspace/build/src/clang/bin/clang",
     "cxx": "/home/worker/workspace/build/src/clang/bin/clang++",
     "as": "/home/worker/workspace/build/src/clang/bin/clang",
-    "ar": "/home/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin10-ar",
-    "ranlib": "/home/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin10-ranlib",
+    "ar": "/home/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin11-ar",
+    "ranlib": "/home/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin11-ranlib",
     "ld": "/home/worker/workspace/build/src/clang/bin/clang",
     "patches": {
         "macosx64": [
           "llvm-debug-frame.patch",
           "compiler-rt-cross-compile.patch"
         ],
         "linux64": [
           "llvm-debug-frame.patch",
--- a/build/build-clang/compiler-rt-cross-compile.patch
+++ b/build/build-clang/compiler-rt-cross-compile.patch
@@ -1,15 +1,15 @@
-Add `-target x86_64-apple-darwin10' to the compiler-rt overridden CFLAGS
+Add `-target x86_64-apple-darwin11' to the compiler-rt overridden CFLAGS
 
 diff --git a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
 index 28d398672..aac68bf36 100644
 --- a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
 +++ b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
 @@ -265,7 +265,7 @@ endfunction()
  macro(darwin_add_builtin_libraries)
    set(DARWIN_EXCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Darwin-excludes)
  
 -  set(CFLAGS "-fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer")
-+  set(CFLAGS "-fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer -target x86_64-apple-darwin10 -isysroot ${CMAKE_OSX_SYSROOT} -I${CMAKE_OSX_SYSROOT}/usr/include")
++  set(CFLAGS "-fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer -target x86_64-apple-darwin11 -isysroot ${CMAKE_OSX_SYSROOT} -I${CMAKE_OSX_SYSROOT}/usr/include")
    set(CMAKE_C_FLAGS "")
    set(CMAKE_CXX_FLAGS "")
    set(CMAKE_ASM_FLAGS "")
--- a/taskcluster/scripts/misc/build-clang-macosx.sh
+++ b/taskcluster/scripts/misc/build-clang-macosx.sh
@@ -13,17 +13,17 @@ TOOLTOOL_MANIFEST=browser/config/tooltoo
 . taskcluster/scripts/misc/tooltool-download.sh
 
 # ld needs libLTO.so from llvm
 export LD_LIBRARY_PATH=$HOME_DIR/src/clang/lib
 # these variables are used in build-clang.py
 export CROSS_CCTOOLS_PATH=$HOME_DIR/src/cctools
 export CROSS_SYSROOT=$HOME_DIR/src/MacOSX10.10.sdk
 # cmake doesn't allow us to specify a path to lipo on the command line.
-ln -sf $CROSS_CCTOOLS_PATH/bin/x86_64-apple-darwin10-lipo /usr/bin/lipo
+ln -sf $CROSS_CCTOOLS_PATH/bin/x86_64-apple-darwin11-lipo /usr/bin/lipo
 
 # gets a bit too verbose here
 set +x
 
 cd build/build-clang
 # |mach python| sets up a virtualenv for us!
 ../../mach python ./build-clang.py -c clang-static-analysis-macosx64.json
 
--- a/taskcluster/scripts/misc/build-clang-tidy-macosx.sh
+++ b/taskcluster/scripts/misc/build-clang-tidy-macosx.sh
@@ -13,17 +13,17 @@ TOOLTOOL_MANIFEST=browser/config/tooltoo
 . taskcluster/scripts/misc/tooltool-download.sh
 
 # ld needs libLTO.so from llvm
 export LD_LIBRARY_PATH=$HOME_DIR/src/clang/lib
 # these variables are used in build-clang.py
 export CROSS_CCTOOLS_PATH=$HOME_DIR/src/cctools
 export CROSS_SYSROOT=$HOME_DIR/src/MacOSX10.10.sdk
 # cmake doesn't allow us to specify a path to lipo on the command line.
-ln -sf $CROSS_CCTOOLS_PATH/bin/x86_64-apple-darwin10-lipo /usr/bin/lipo
+ln -sf $CROSS_CCTOOLS_PATH/bin/x86_64-apple-darwin11-lipo /usr/bin/lipo
 
 # gets a bit too verbose here
 set +x
 
 cd build/build-clang
 # |mach python| sets up a virtualenv for us!
 ../../mach python ./build-clang.py -c clang-tidy-macosx64.json