Backed out 3 changesets (bug 1414287) for causing bug 1497029 a=backout

Backed out changeset b8da3d4e6da0 (bug 1414287)
Backed out changeset 273e84414434 (bug 1414287)
Backed out changeset 76fafdaa9216 (bug 1414287)
This commit is contained in:
Noemi Erli 2018-10-09 05:07:54 +03:00
parent 31184dddce
commit 8e3fe95bfb
9 changed files with 95 additions and 22 deletions

View File

@ -10,10 +10,8 @@ ac_add_options --enable-optimize
ac_add_options --enable-clang-plugin
. $topsrcdir/build/win32/mozconfig.vs-latest
# Regardless of what mozconfig.vs-latest sets, lld-link that comes with the old
# clang version used for static analysis fails to link multiple things. So
# until bug 1427808 is resolved, use the Microsoft linker.
# Regardless of what mozconfig.vs-latest sets, clang-plugin builds need to use
# the Microsoft linker until at least bugs 1414287 and 1427808 are resolved.
export LINKER=link
. "$topsrcdir/build/mozconfig.common.override"

View File

@ -11,10 +11,8 @@ ac_add_options --enable-debug
ac_add_options --enable-clang-plugin
. $topsrcdir/build/win32/mozconfig.vs-latest
# Regardless of what mozconfig.vs-latest sets, lld-link that comes with the old
# clang version used for static analysis fails to link multiple things. So
# until bug 1427808 is resolved, use the Microsoft linker.
# Regardless of what mozconfig.vs-latest sets, clang-plugin builds need to use
# the Microsoft linker until at least bugs 1414287 and 1427808 are resolved.
export LINKER=link
. "$topsrcdir/build/mozconfig.common.override"

View File

@ -0,0 +1,22 @@
{
"llvm_revision": "317840",
"stages": "3",
"build_libcxx": false,
"build_type": "Release",
"assertions": false,
"llvm_repo": "https://llvm.org/svn/llvm-project/llvm/trunk",
"clang_repo": "https://llvm.org/svn/llvm-project/cfe/trunk",
"lld_repo": "https://llvm.org/svn/llvm-project/lld/trunk",
"compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/trunk",
"libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/trunk",
"python_path": "c:/mozilla-build/python/python.exe",
"cc": "cl.exe",
"cxx": "cl.exe",
"patches": [
"r318309.patch",
"r320462.patch",
"msvc-host-x64.patch",
"aarch64-vastart-checking.patch",
"loosen-msvc-detection.patch"
]
}

View File

@ -0,0 +1,17 @@
When looking for a linker, 32-bit clang-cl.exe wants to use the 32-bit-native link.exe located in Hostx86/x86, but this executable does not exist in our releng package, because we only use 64-bit-host toolchains.
This patch makes clang-cl use the Hostx64/x86 linker instead. Ideally we wouldn't be using 32-bit clang-cl.exe in the first place. Bug 1414287 is on file to do so and remove this hack.
diff --git a/clang/lib/Driver/ToolChains/MSVC.cpp b/clang/lib/Driver/ToolChains/MSVC.cpp
--- a/clang/lib/Driver/ToolChains/MSVC.cpp
+++ b/clang/lib/Driver/ToolChains/MSVC.cpp
@@ -817,8 +816,7 @@
switch (Type) {
case SubDirectoryType::Bin:
if (VSLayout == ToolsetLayout::VS2017OrNewer) {
- const bool HostIsX64 =
- llvm::Triple(llvm::sys::getProcessTriple()).isArch64Bit();
+ const bool HostIsX64 = true;
const char *const HostName = HostIsX64 ? "HostX64" : "HostX86";
llvm::sys::path::append(Path, "bin", HostName, SubdirName);
} else { // OlderVS or DevDivInternal

View File

@ -21,9 +21,6 @@ if [ -d "${VSPATH}" ]; then
export WIN64_LIB="${VSPATH}/VC/lib/x64:${VSPATH}/VC/atlmfc/lib/x64:${VSPATH}/SDK/Lib/10.0.17134.0/ucrt/x64:${VSPATH}/SDK/Lib/10.0.17134.0/um/x64:${VSPATH}/DIA SDK/lib/amd64"
fi
ac_add_options --target=i686-pc-mingw32
ac_add_options --host=x86_64-pc-mingw32
. $topsrcdir/build/mozconfig.vs-common
mk_export_correct_style WINDOWSSDKDIR

View File

@ -201,13 +201,6 @@ HOST_CFLAGS = $(COMPUTED_HOST_CFLAGS) $(_DEPEND_CFLAGS)
HOST_CXXFLAGS = $(COMPUTED_HOST_CXXFLAGS) $(_DEPEND_CFLAGS)
HOST_C_LDFLAGS = $(COMPUTED_HOST_C_LDFLAGS)
HOST_CXX_LDFLAGS = $(COMPUTED_HOST_CXX_LDFLAGS)
# Win32 Cross-builds on win64 need to override LIB when invoking the linker,
# which we do for rust through cargo-linker.bat, so we abuse it here.
# Ideally, we'd empty LIB and pass -LIBPATH options to the linker somehow but
# we don't have this in place for rust, so...
ifdef WIN64_CARGO_LINKER
HOST_LINKER = $(topobjdir)/build/win64/cargo-linker.bat
endif
ifdef MOZ_LTO
ifeq (Darwin,$(OS_TARGET))

View File

@ -48,8 +48,8 @@ jobs:
- builds/taskcluster_base_win32.py
- builds/taskcluster_sub_win32/clang_debug.py
toolchains:
- win64-clang-cl-st-an
- win64-rust
- win32-clang-cl-st-an
- win32-rust
- win64-cbindgen
- win64-sccache
- win64-node
@ -79,8 +79,8 @@ jobs:
- builds/taskcluster_base_win32.py
- builds/taskcluster_sub_win32/clang.py
toolchains:
- win64-clang-cl-st-an
- win64-rust
- win32-clang-cl-st-an
- win32-rust
- win64-cbindgen
- win64-sccache
- win64-node

View File

@ -23,6 +23,27 @@ win64-clang-cl:
- 'taskcluster/scripts/misc/build-clang-windows-helper64.sh'
toolchain-artifact: public/build/clang.tar.bz2
win32-clang-cl-st-an:
description: "Clang-cl static analysis toolchain build"
treeherder:
kind: build
platform: toolchains/opt
symbol: TW32(clang-cl-st-an)
tier: 1
worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
worker:
max-run-time: 7200
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/build-clang-cl.manifest"
run:
using: toolchain-script
script: build-clang32-st-an-windows.sh
resources:
- 'build/build-clang/build-clang.py'
- 'build/build-clang/clang-win32-st-an.json'
- 'taskcluster/scripts/misc/build-clang-windows-helper32.sh'
toolchain-artifact: public/build/clang.tar.bz2
win64-clang-cl-st-an:
description: "Clang-cl static analysis toolchain build"
treeherder:
@ -188,6 +209,30 @@ win64-node:
arguments: ['win64']
toolchain-artifact: public/build/node.tar.bz2
win32-rust-1.29:
description: "rust repack"
treeherder:
kind: build
platform: toolchains/opt
symbol: TW32(rust)
tier: 1
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
worker:
docker-image: {in-tree: toolchain-build}
max-run-time: 7200
env:
UPLOAD_DIR: artifacts
run:
using: toolchain-script
script: repack_rust.py
arguments: [
'--channel', '1.29.0',
'--host', 'i686-pc-windows-msvc',
'--target', 'i686-pc-windows-msvc',
]
toolchain-alias: win32-rust
toolchain-artifact: public/build/rustc.tar.bz2
mingw32-rust-1.29:
description: "rust repack"
treeherder:

View File

@ -0,0 +1,3 @@
#!/bin/bash
source build/src/taskcluster/scripts/misc/build-clang-windows-helper32.sh clang-win32-st-an.json