electron/rebuild

Cross Compile on Linux

jkroepke opened this issue · 0 comments

Hi,

cross compile on linux does not work out of the box with node-gyp in backend. If I run @electron/rebuild -a arm64 on a amd64 system, the output will be still a amd64 binary.

If I define

export CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++

Before running the rebuild command, it works find.

However, in a multi-arch build this is not possible. Running electron-builder with —x64 —amd64 would call rebuild twice.

It should be considered if electron-builder could set the CC variables, if host and target arch does not match.