wasm
This commit is contained in:
parent
afe9e5c93f
commit
4eb6142cd1
1 changed files with 3 additions and 2 deletions
5
wasm.nix
5
wasm.nix
|
@ -1,16 +1,17 @@
|
||||||
{ stdenv, clang, wasilibc }:
|
{ stdenv, clang, pkgsCross }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "triangle";
|
name = "triangle";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
||||||
nativeBuildInputs = [ clang wasilibc ];
|
nativeBuildInputs = [ clang ];
|
||||||
|
|
||||||
|
|
||||||
configurePhase = "";
|
configurePhase = "";
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
clang \
|
clang \
|
||||||
--target=wasm32-unknown-wasi \
|
--target=wasm32-unknown-wasi \
|
||||||
|
--sysroot ${pkgsCross.wasi32.wasilibc} \
|
||||||
-O3 \
|
-O3 \
|
||||||
-flto \
|
-flto \
|
||||||
-nostdlib \
|
-nostdlib \
|
||||||
|
|
Loading…
Reference in a new issue