Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ppc64le #5350

Merged
merged 7 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/build-and-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,16 @@ jobs:
rustup target add riscv64gc-unknown-linux-gnu &&
npm run build:napi -- --release --target riscv64gc-unknown-linux-gnu &&
riscv64-linux-gnu-strip *.node
- host: ubuntu-latest
target: ppc64le-unknown-linux-gnu
setup: |
sudo apt-get update
sudo apt-get install gcc-powerpc64-linux-gnu -y
build: >-
set -e &&
rustup target add ppc64le-unknown-linux-gnu &&
npm run build:napi -- --release --target ppc64le-unknown-linux-gnu &&
ppc64le-unknown-linux-gnu-strip *.node
name: Build ${{ matrix.settings.name || matrix.settings.target }}
runs-on: ${{ matrix.settings.host }}
timeout-minutes: 30
Expand Down
1 change: 1 addition & 0 deletions native.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const bindingsByPlatformAndArch = {
linux: {
arm: { base: 'linux-arm-gnueabihf', musl: null },
arm64: { base: 'linux-arm64-gnu', musl: 'linux-arm64-musl' },
ppc64le: { base: 'linux-ppc64le-gnu', musl: null },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pavolloffay @lukastaegert
I guess this line and cpu field in package.json need to be ppc64 instead of ppc64le. process.arch seems to return ppc64.
https://github.com/konveyor/tackle2-ui/actions/runs/8150208242/job/22276088934#step:7:89

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you are right and process.arch always returns ppc64 - which in practice means ppc64le as Node hasn't been supporting big-endian Linux for a while. In theory there is also an os.machine interface that returns either ppc64 or ppc64le, but it doesn't seem necessary to use that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If anyone wants to make an educated PR to improve here, this would be very welcome! Otherwise, I can also have a look in the next days.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR here: #5460

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sapphi-red, just wondering whether the native ppc64le rollup work fors you now? It looks like tackle2-ui downgraded to rollup v3 in the meantime?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a ppc64le machine so I don't know 😅

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thanks!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I spend some hours setting up emulated smoke tests for some environments including ppc64le and I can confirm it works now 😀
#5477

riscv64: { base: 'linux-riscv64-gnu', musl: null },
x64: { base: 'linux-x64-gnu', musl: 'linux-x64-musl' }
},
Expand Down
3 changes: 3 additions & 0 deletions npm/linux-ppc64le-gnu/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@rollup/rollup-linux-ppc64le-gnu`

This is the **ppc64le-unknown-linux-gnu** binary for `rollup`
22 changes: 22 additions & 0 deletions npm/linux-ppc64le-gnu/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@rollup/rollup-linux-ppc64le-gnu",
"version": "0.0.0",
"os": [
"linux"
],
"cpu": [
"ppc64le"
],
"files": [
"rollup.linux-ppc64le-gnu.node"
],
"description": "Native bindings for Rollup",
"author": "Lukas Taegert-Atkinson",
"homepage": "https://rollupjs.org/",
"license": "MIT",
"repository": "rollup/rollup",
"libc": [
"glibc"
],
"main": "./rollup.linux-ppc64le-gnu.node"
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"armv7-unknown-linux-gnueabihf",
"i686-pc-windows-msvc",
"riscv64gc-unknown-linux-gnu",
"ppc64le-unknown-linux-gnu",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
"x86_64-unknown-linux-gnu",
Expand Down