mirror of
https://github.com/VSCodium/vscodium.git
synced 2026-04-21 18:40:16 +10:00
wip(linux-reh-x64): add cxx11 verification (#2467)
This commit is contained in:
@@ -173,7 +173,7 @@ done
|
||||
if [[ "${VSCODE_ARCH}" == "x64" ]]; then
|
||||
pushd "remote"
|
||||
|
||||
for LIB in @parcel/watcher @vscode/spdlog kerberos
|
||||
for LIB in @parcel/watcher @vscode/spdlog kerberos node-pty
|
||||
do
|
||||
pushd "node_modules/${LIB}"
|
||||
|
||||
@@ -183,6 +183,8 @@ if [[ "${VSCODE_ARCH}" == "x64" ]]; then
|
||||
done
|
||||
|
||||
popd
|
||||
|
||||
VERIFY_CXX11=1
|
||||
fi
|
||||
|
||||
mv .npmrc.bak .npmrc
|
||||
@@ -198,6 +200,10 @@ if [[ "${SHOULD_BUILD_REH}" != "no" ]]; then
|
||||
|
||||
EXPECTED_GLIBC_VERSION="${EXPECTED_GLIBC_VERSION}" EXPECTED_GLIBCXX_VERSION="${GLIBCXX_VERSION}" SEARCH_PATH="../vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}" ./build/azure-pipelines/linux/verify-glibc-requirements.sh
|
||||
|
||||
if [[ -n "${VERIFY_CX11}" ]]; then
|
||||
SEARCH_PATH="../vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}" ../build/linux/verify_cxx11_requirements.sh
|
||||
fi
|
||||
|
||||
pushd "../vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}"
|
||||
|
||||
if [[ -f "../build/linux/${VSCODE_ARCH}/ripgrep.sh" ]]; then
|
||||
@@ -217,6 +223,10 @@ if [[ "${SHOULD_BUILD_REH_WEB}" != "no" ]]; then
|
||||
|
||||
EXPECTED_GLIBC_VERSION="${EXPECTED_GLIBC_VERSION}" EXPECTED_GLIBCXX_VERSION="${GLIBCXX_VERSION}" SEARCH_PATH="../vscode-reh-web-${VSCODE_PLATFORM}-${VSCODE_ARCH}" ./build/azure-pipelines/linux/verify-glibc-requirements.sh
|
||||
|
||||
if [[ -n "${VERIFY_CXX11}" ]]; then
|
||||
SEARCH_PATH="../vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}" ../build/linux/verify_cxx11_requirements.sh
|
||||
fi
|
||||
|
||||
pushd "../vscode-reh-web-${VSCODE_PLATFORM}-${VSCODE_ARCH}"
|
||||
|
||||
if [[ -f "../build/linux/${VSCODE_ARCH}/ripgrep.sh" ]]; then
|
||||
|
||||
29
build/linux/verify_abi_requirements.sh
Executable file
29
build/linux/verify_abi_requirements.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
FILES=$(
|
||||
find "${SEARCH_PATH}" -type f -executable -name "node"
|
||||
find "${SEARCH_PATH}" -name "*.node" -not -path "*prebuilds*" -not -path "*extensions/node_modules/@parcel/watcher*"
|
||||
)
|
||||
|
||||
echo "Verifying requirements for files: ${FILES}"
|
||||
|
||||
for FILE in ${FILES}; do
|
||||
CXXABI_VERSION="0.0.0"
|
||||
|
||||
while IFS= read -r LINE; do
|
||||
VERSION=${LINE#*_}
|
||||
|
||||
if [[ $( printf "%s\n%s" "${VERSION}" "${CXXABI_VERSION}" | sort -V | tail -n1 ) == "${VERSION}" ]]; then
|
||||
CXXABI_VERSION="${VERSION}"
|
||||
fi
|
||||
done < <( strings "${FILE}" | grep -i ^CXXABI )
|
||||
|
||||
if [[ $( printf "%s\n%s" "${EXPECTED_CXXABI_VERSION}" "${CXXABI_VERSION}" | sort -V | tail -n1 ) == "${EXPECTED_CXXABI_VERSION}" ]]; then
|
||||
echo "File ${FILE} has dependency on ABI ${CXXABI_VERSION} <= ${EXPECTED_CXXABI_VERSION}"
|
||||
else
|
||||
echo "Error: File ${FILE} has dependency on ABI ${CXXABI_VERSION} > ${EXPECTED_CXXABI_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
14
build/linux/verify_cxx11_requirements.sh
Executable file
14
build/linux/verify_cxx11_requirements.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
FILES=$( find "${SEARCH_PATH}" -name "*.node" -not -path "*prebuilds*" -not -path "*extensions/node_modules/@parcel/watcher*" )
|
||||
|
||||
echo "Verifying requirements for files: ${FILES}"
|
||||
|
||||
for FILE in ${FILES}; do
|
||||
if [[ -n "$( strings "${FILE}" | grep cxx11 | tail -n1 )" ]]; then
|
||||
echo "Error: File ${FILE} has dependency on ABI ${CXXABI_VERSION} > ${EXPECTED_CXXABI_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user