| ... | ... | @@ -16,19 +16,31 @@ ZIG="$PREFIX/bin/zig" |
| 16 | 16 | |
| 17 | 17 | export PATH="$HOME/deps/wasmtime-v2.0.2-aarch64-linux:$PATH" |
| 18 | 18 | |
| 19 | # Make the `zig version` number consistent. |
| 20 | # This will affect the cmake command below. |
| 21 | git config core.abbrev 9 |
| 22 | git fetch --unshallow || true |
| 23 | git fetch --tags |
| 24 | |
| 25 | export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" |
| 26 | export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" |
| 27 | |
| 19 | 28 | mkdir build-release |
| 20 | 29 | cd build-release |
| 21 | 30 | cmake .. \ |
| 22 | 31 | -DCMAKE_INSTALL_PREFIX="stage3-release" \ |
| 23 | 32 | -DCMAKE_PREFIX_PATH="$PREFIX" \ |
| 24 | 33 | -DCMAKE_BUILD_TYPE=Release \ |
| 25 | | -DCMAKE_C_COMPILER="$ZIG;cc;-target;$TARGET;-mcpu=$MCPU" \ |
| 26 | | -DCMAKE_CXX_COMPILER="$ZIG;c++;-target;$TARGET;-mcpu=$MCPU" \ |
| 27 | 34 | -DZIG_TARGET_TRIPLE="$TARGET" \ |
| 28 | 35 | -DZIG_TARGET_MCPU="$MCPU" \ |
| 29 | 36 | -DZIG_STATIC=ON \ |
| 30 | 37 | -GNinja |
| 31 | 38 | |
| 39 | # Now cmake will use zig as the C/C++ compiler. We reset the environment variables |
| 40 | # so that installation and testing do not get affected by them. |
| 41 | unset CC |
| 42 | unset CXX |
| 43 | |
| 32 | 44 | ninja install |
| 33 | 45 | |
| 34 | 46 | # TODO: add -fqemu back to this line |