Bug 1492663 - Upgrade most CI builds to clang 7 r=froydnj

The cctools-port linker links against libraries from clang (for LTO),
which have different SONAMEs depending on the clang version. Which means
the linker needs to be used along the same version of clang it was built
against. Thus we also make it depend on linux64-clang-7.

But changing the dependency is not enough, cf. bug 1471905, so also
touch its build script, which it turns out, we need to do anyways
because llvm-dsymutil was renamed to dsymutil.

Relatedly, all toolchains that are built using cctools-port need to use
linux64-clang-7 too.

Building compiler-rt 7 with the OSX 10.11 SDK fails because of some
newer APIs being used in compiler-rt for xray, but this is not a feature
we use, so disable that.

Differential Revision: https://phabricator.services.mozilla.com/D6766
This commit is contained in:
Mike Hommey 2018-09-27 15:33:42 +00:00
Родитель d99c6842d2
Коммит cd94fafb03
8 изменённых файлов: 29 добавлений и 30 удалений

Просмотреть файл

@ -235,6 +235,8 @@ def build_one_stage(cc, cxx, asm, ld, ar, ranlib, libtool,
"-DCMAKE_SYSTEM_NAME=Darwin",
"-DCMAKE_SYSTEM_VERSION=10.10",
"-DLLVM_ENABLE_THREADS=OFF",
# Xray requires a OSX 10.12 SDK (https://bugs.llvm.org/show_bug.cgi?id=38959)
"-DCOMPILER_RT_BUILD_XRAY=OFF",
"-DLIBCXXABI_LIBCXX_INCLUDES=%s" % libcxx_include_dir,
"-DCMAKE_OSX_SYSROOT=%s" % slashify_path(os.getenv("CROSS_SYSROOT")),
"-DCMAKE_FIND_ROOT_PATH=%s" % slashify_path(os.getenv("CROSS_CCTOOLS_PATH")), # noqa

Просмотреть файл

@ -1,16 +1,16 @@
{
"llvm_revision": "335538",
"llvm_revision": "342383",
"stages": "1",
"build_libcxx": true,
"build_type": "Release",
"assertions": false,
"osx_cross_compile": true,
"llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_601/final",
"clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_601/final",
"lld_repo": "https://llvm.org/svn/llvm-project/lld/tags/RELEASE_601/final",
"compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_601/final",
"libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_601/final",
"libcxxabi_repo": "https://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_601/final",
"llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_700/final",
"clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_700/final",
"lld_repo": "https://llvm.org/svn/llvm-project/lld/tags/RELEASE_700/final",
"compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_700/final",
"libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_700/final",
"libcxxabi_repo": "https://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_700/final",
"python_path": "/usr/bin/python2.7",
"gcc_dir": "/builds/worker/workspace/build/src/gcc",
"cc": "/builds/worker/workspace/build/src/clang/bin/clang",
@ -23,9 +23,6 @@
"patches": [
"static-llvm-symbolizer.patch",
"compiler-rt-cross-compile.patch",
"compiler-rt-no-codesign.patch",
"r322401.patch",
"r325356.patch",
"r339636.patch"
"compiler-rt-no-codesign.patch"
]
}

Просмотреть файл

@ -2,9 +2,9 @@ Disable codesign for macosx cross-compile toolchain. Codesign only works on OSX.
Index: cmake/Modules/AddCompilerRT.cmake
===================================================================
--- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake (revision 312553)
--- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake (revision 342374)
+++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake (working copy)
@@ -224,14 +224,6 @@
@@ -290,14 +290,6 @@
set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
endif()
@ -18,4 +18,4 @@ Index: cmake/Modules/AddCompilerRT.cmake
- endif()
endif()
install(TARGETS ${libname}
ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}
ARCHIVE DESTINATION ${install_dir_${libname}}

Просмотреть файл

@ -44,7 +44,6 @@ linux64-clang-6:
- 'build/build-clang/build-clang.py'
- 'build/build-clang/clang-6-linux64.json'
- 'taskcluster/scripts/misc/tooltool-download.sh'
toolchain-alias: linux64-clang
toolchain-artifact: public/build/clang.tar.xz
toolchains:
- linux64-gcc-4.9
@ -66,6 +65,7 @@ linux64-clang-7:
- 'build/build-clang/build-clang.py'
- 'build/build-clang/clang-7-linux64.json'
- 'taskcluster/scripts/misc/tooltool-download.sh'
toolchain-alias: linux64-clang
toolchain-artifact: public/build/clang.tar.xz
toolchains:
- linux64-gcc-4.9
@ -118,12 +118,12 @@ linux64-clang-trunk-mingw-x64:
toolchains:
- linux64-gcc-4.9
linux64-clang-6-macosx-cross:
description: "Clang 6 toolchain build with MacOS Compiler RT libs"
linux64-clang-7-macosx-cross:
description: "Clang 7 toolchain build with MacOS Compiler RT libs"
treeherder:
kind: build
platform: toolchains/opt
symbol: TL(clang6-macosx-cross)
symbol: TL(clang7-macosx-cross)
tier: 1
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
worker:
@ -132,17 +132,17 @@ linux64-clang-6-macosx-cross:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-clang.manifest"
run:
using: toolchain-script
script: build-clang-6-linux-macosx-cross.sh
script: build-clang-7-linux-macosx-cross.sh
resources:
- 'build/build-clang/build-clang.py'
- 'build/build-clang/clang-6-macosx64.json'
- 'build/build-clang/clang-7-macosx64.json'
- 'taskcluster/scripts/misc/tooltool-download.sh'
toolchain-alias: linux64-clang-macosx-cross
toolchain-artifact: public/build/clang.tar.xz
tooltool-downloads: internal
toolchains:
- linux64-cctools-port
- linux64-clang-6
- linux64-clang-7
- linux64-gcc-4.9
linux64-clang-tidy:
@ -354,7 +354,7 @@ linux64-cctools-port:
- 'taskcluster/scripts/misc/tooltool-download.sh'
toolchain-artifact: public/build/cctools.tar.xz
toolchains:
- linux64-clang-6
- linux64-clang-7
linux64-hfsplus:
description: "hfsplus toolchain build"

Просмотреть файл

@ -27,12 +27,12 @@ macosx64-clang:
tooltool-downloads: internal
resources:
- 'build/build-clang/build-clang.py'
- 'build/build-clang/clang-6-macosx64.json'
- 'build/build-clang/clang-7-macosx64.json'
- 'taskcluster/scripts/misc/tooltool-download.sh'
toolchain-artifact: public/build/clang.tar.xz
toolchains:
- linux64-cctools-port
- linux64-clang-6
- linux64-clang-7
- linux64-gcc-4.9
- linux64-node
@ -63,7 +63,7 @@ macosx64-clang-tidy:
toolchain-artifact: public/build/clang-tidy.tar.xz
toolchains:
- linux64-cctools-port
- linux64-clang-6
- linux64-clang-7
- linux64-gcc-4.9
- linux64-node
@ -88,7 +88,7 @@ macosx64-cctools-port:
toolchain-artifact: public/build/cctools.tar.bz2
toolchains:
- linux64-cctools-port
- linux64-clang-6
- linux64-clang-7
- linux64-node
macosx64-gn:
@ -113,7 +113,7 @@ macosx64-gn:
toolchain-artifact: public/build/gn.tar.xz
toolchains:
- linux64-cctools-port
- linux64-clang-6
- linux64-clang-7
- linux64-node
macosx64-node:

Просмотреть файл

@ -48,7 +48,7 @@ export LDFLAGS="-lpthread -Wl,-rpath-link,$CLANG_DIR/lib"
make -j `nproc --all` install
strip $CROSSTOOLS_BUILD_DIR/bin/*
# cctools-port doesn't include dsymutil but clang will need to find it.
cp $CLANG_DIR/bin/llvm-dsymutil $CROSSTOOLS_BUILD_DIR/bin/x86_64-apple-darwin11-dsymutil
cp $CLANG_DIR/bin/dsymutil $CROSSTOOLS_BUILD_DIR/bin/x86_64-apple-darwin11-dsymutil
# Put a tarball in the artifacts dir
mkdir -p $UPLOAD_DIR

Просмотреть файл

@ -25,7 +25,7 @@ set +x
cd build/build-clang
# |mach python| sets up a virtualenv for us!
../../mach python ./build-clang.py -c clang-6-macosx64.json --skip-tar
../../mach python ./build-clang.py -c clang-7-macosx64.json --skip-tar
# We now have a native macosx64 toolchain.
# What we want is a native linux64 toolchain which can target macosx64 and use the sanitizer dylibs.

Просмотреть файл

@ -24,7 +24,7 @@ set +x
cd build/build-clang
# |mach python| sets up a virtualenv for us!
../../mach python ./build-clang.py -c clang-6-macosx64.json
../../mach python ./build-clang.py -c clang-7-macosx64.json
set -x