Backed out changeset fc265b3a728e (bug 1625696) for causing bug 1634877 and bug 1634916

This commit is contained in:
Andreea Pavel 2020-05-03 05:22:37 +03:00
parent 005270cdd1
commit 81629d9476
8 changed files with 43 additions and 10 deletions

View File

@ -30,7 +30,7 @@ unset VC_PATH
fi
export WINCHECKSEC="${MOZ_FETCHES_DIR}/winchecksec/winchecksec"
export WINCHECKSEC="${MOZ_FETCHES_DIR}/winchecksec/winchecksec.exe"
if [ ! -f "${WINCHECKSEC}" ]; then
unset WINCHECKSEC
fi

View File

@ -31,7 +31,7 @@ unset VC_PATH
fi
export WINCHECKSEC="${MOZ_FETCHES_DIR}/winchecksec/winchecksec"
export WINCHECKSEC="${MOZ_FETCHES_DIR}/winchecksec/winchecksec.exe"
if [ ! -f "${WINCHECKSEC}" ]; then
unset WINCHECKSEC
fi

View File

@ -30,7 +30,7 @@ unset VC_PATH
fi
export WINCHECKSEC="${MOZ_FETCHES_DIR}/winchecksec/winchecksec"
export WINCHECKSEC="${MOZ_FETCHES_DIR}/winchecksec/winchecksec.exe"
if [ ! -f "${WINCHECKSEC}" ]; then
unset WINCHECKSEC
fi

View File

@ -29,7 +29,7 @@ except KeyError:
sys.exit(1)
wine = buildconfig.substs.get('WINE')
if wine and winchecksec_path.lower().endswith('.exe'):
if wine:
cmd = [wine, winchecksec_path]
else:
cmd = [winchecksec_path]

View File

@ -485,4 +485,4 @@ winchecksec:
fetch:
type: git
repo: https://github.com/trailofbits/winchecksec/
revision: 93ffe67dbfc757bf6f440d80b8acf88e652ed60a
revision: 8143f621359616f16eaa265e22d10a7962536634

View File

@ -289,6 +289,8 @@ win64-winchecksec:
symbol: TW64(winchecksec)
worker:
docker-image: {in-tree: deb10-toolchain-build}
env:
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/vs2017.manifest"
run:
script: build-winchecksec.sh
toolchain-artifact: public/build/winchecksec.tar.bz2
@ -296,3 +298,6 @@ win64-winchecksec:
fetches:
fetch:
- winchecksec
toolchain:
- linux64-clang-win-cross
- linux64-liblowercase

View File

@ -1,17 +1,45 @@
#!/bin/bash
set -e -v -x
mkdir -p $UPLOAD_DIR
cd $MOZ_FETCHES_DIR/winchecksec
export PATH="$MOZ_FETCHES_DIR/clang/bin:$PATH"
export LD_PRELOAD=$MOZ_FETCHES_DIR/liblowercase/liblowercase.so
export LOWERCASE_DIRS=$MOZ_FETCHES_DIR/vs2017_15.8.4
. $GECKO_PATH/taskcluster/scripts/misc/vs-setup.sh
. $GECKO_PATH/taskcluster/scripts/misc/tooltool-download.sh
# Patch pe-parse because clang-cl doesn't support /analyze.
patch -p1 <<'EOF'
--- a/pe-parse/cmake/compilation_flags.cmake
+++ b/pe-parse/cmake/compilation_flags.cmake
@@ -1,5 +1,5 @@
if (MSVC)
- list(APPEND DEFAULT_CXX_FLAGS /W4 /analyze)
+ list(APPEND DEFAULT_CXX_FLAGS /W4)
if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
list(APPEND DEFAULT_CXX_FLAGS /Zi)
EOF
cmake \
-GNinja \
-DCMAKE_CXX_COMPILER=clang-cl \
-DCMAKE_C_COMPILER=clang-cl \
-DCMAKE_LINKER=lld-link \
-DCMAKE_C_FLAGS=-fuse-ld=lld \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld \
-EHsc" \
-DCMAKE_RC_COMPILER=llvm-rc \
-DCMAKE_MT=llvm-mt \
-DCMAKE_SYSTEM_NAME=Windows \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=Off
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
ninja -v
cd ..
tar -caf winchecksec.tar.bz2 winchecksec/winchecksec
tar -caf winchecksec.tar.bz2 winchecksec/winchecksec.{dll,exe}
cp winchecksec.tar.bz2 $UPLOAD_DIR/

View File

@ -2019,7 +2019,7 @@ def allow_missing_winchecksec(automation, c_compiler):
if c_compiler and c_compiler.type != 'clang-cl':
return True
check_prog('WINCHECKSEC', ['winchecksec.exe', 'winchecksec'], paths=toolchain_search_path,
check_prog('WINCHECKSEC', ['winchecksec.exe'], paths=toolchain_search_path,
allow_missing=allow_missing_winchecksec,
when=compile_environment & target_is_windows)