Skip to content

Commit

Permalink
fix(linux): build ppc64 (#2077)
Browse files Browse the repository at this point in the history
  • Loading branch information
daiyam authored Oct 29, 2024
1 parent 1125a02 commit 2b8134a
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion package_linux_reh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if [[ "${VSCODE_ARCH}" == "x64" || "${VSCODE_ARCH}" == "arm64" ]]; then
elif [[ "${VSCODE_ARCH}" == "armhf" ]]; then
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:bionic-devtoolset-arm32v7"
elif [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:focal-devtoolset-ppc64le"
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:bionic-devtoolset-ppc64le"
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
export VSCODE_SYSROOT_REPO='VSCodium/vscode-linux-build-agent'
Expand Down Expand Up @@ -72,6 +72,28 @@ if [[ -d "../patches/linux/reh/" ]]; then
done
fi

if [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then
INCLUDES=$(cat <<EOF
{
"target_defaults": {
"conditions": [
["OS=='linux'", {
'cflags_cc!': [ '-std=gnu++20' ],
'cflags_cc': [ '-std=gnu++2a' ],
}]
]
}
}
EOF
)

if [ ! -d "$HOME/.gyp" ]; then
mkdir -p "$HOME/.gyp"
fi

echo "${INCLUDES}" > "$HOME/.gyp/include.gypi"
fi

for i in {1..5}; do # try 5 times
npm ci --prefix build && break
if [[ $i == 3 ]]; then
Expand Down

0 comments on commit 2b8134a

Please sign in to comment.