Skip to content

Commit

Permalink
20.0.1pre
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Feb 10, 2024
1 parent 442cce6 commit 96f5e31
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 22 deletions.
7 changes: 4 additions & 3 deletions config
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash
if [[ -z ${CONFIG_ENV+z} ]]
then
CONFIG_ENV=true
export LC_ALL=C
export ROOT=${ROOT:-$(pwd)}
export SDKROOT=${SDKROOT:-$ROOT}
Expand Down Expand Up @@ -102,8 +105,6 @@ NIMSDK=${NIMSDK:-"${SDKROOT}/nimsdk"}





#OLDPATH=${PATH}

PATH=/usr/bin:/bin
Expand Down Expand Up @@ -137,4 +138,4 @@ done
export GITGET="git clone --recursive --no-tags --depth 1 --single-branch --branch"
export LD_LIBRARY_PATH="${HOST_PREFIX}/lib:$LD_LIBRARY_PATH"
export PATH="${HOST_PREFIX}/bin:$PATH"

fi
35 changes: 19 additions & 16 deletions python-nim-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,29 +57,32 @@ var ARCH="$(arch)"
var SDKROOT = getEnv("SDKROOT","${SDKROOT}")
--colors:on
--threads:off
--define:release
echo fmt" ==== Panda3D: generic config {ARCH=} from {SDKROOT=} ===="
--cc:clang
--os:linux
--threads:off
#--noCppExceptions
--exceptions:quirky
--define:noCppExceptions
#--define:usemalloc
--define:usemalloc
# gc : bohem => need libgc.so.1
--mm:orc
--define:noSignalHandler
#--define:noSignalHandler
#
--define:static
# better debug but optionnal/tweakable
--parallelBuild:1
--opt:speed
--opt:none
--define:debug
when defined(wasi):
Expand All @@ -93,30 +96,30 @@ when defined(wasi):
--define:emscripten
--define:static
# component model aka reactor
--noMain
--cpu:wasm32
switch("clibdir", fmt"{SDKROOT}/devices/{ARCH}/usr/lib/wasm32-wasi")
switch("passC", fmt"-m32 -Djmp_buf=int")
switch("passC", "-O0 -g3 -mllvm -inline-threshold=1")
switch("passL","-lstdc++ ")
switch("clibdir", fmt"{SDKROOT}/devices/{ARCH}/usr/lib/wasm32-wasi")
# more compat but in the long term workaround Panda3D instead
# wasi emulations
switch("passC", "-D_GNU_SOURCE")
switch("passC", "-D_WASI_EMULATED_MMAN -D_WASI_EMULATED_SIGNAL -D_WASI_EMULATED_PROCESS_CLOCKS -D_WASI_EMULATED_GETPID")
switch("passL", "-lwasi-emulated-getpid -lwasi-emulated-mman -lwasi-emulated-signal -lwasi-emulated-process-clocks")
switch("passL","-lstdc++")
# don't use _start/main but _initialize instead
switch("passL", "-Wl,--export-all -mexec-model=reactor")
switch("passL", "-Wl,--no-entry,--export-all -mexec-model=reactor")
# component model aka reactor
--noMain
# FIXME
switch("passC", fmt"-m32 -Djmp_buf=int")
# better debug but optionnal/tweakable
# switch("passC", "-O0 -g3 -mllvm -inline-threshold=1")
--parallelBuild:1
--opt:none
Expand Down Expand Up @@ -152,7 +155,7 @@ then
. $WASISDK/wasisdk_env.sh
export XDG_CONFIG_HOME=${NIMSDK}
export NIMBLE_DIR=${NIMSDK}/pkg
export PATH=${NIMSDK}/${NIM_VERSION}/bin:\${WASI_SDK_PREFIX}/bin:$PATH
export PATH=${NIMSDK}/${NIM_VERSION}/bin:$PATH
echo "
* using nimsdk from \$(realpath \${NIMSDK}/\${NIM_VERSION}/bin)
Expand Down
7 changes: 4 additions & 3 deletions python-wasi-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,17 +198,18 @@ END
${SDKROOT}/python-nim-sdk.sh
fi

wget https://github.com/bytecodealliance/wasmtime/releases/download/v17.0.1/wasmtime-v17.0.1-x86_64-linux.tar.xz -O-|xzcat|tar xfv -
mv -vf $(find wasmtime*|grep /wasmtime$) ${WASISDK}/bin/

. ${SDKROOT}/scripts/pack-sdk.sh

else
echo "cd failed" 1>&2
exit 156
exit 208
fi
done


wget https://github.com/bytecodealliance/wasmtime/releases/download/v17.0.1/wasmtime-v17.0.1-x86_64-linux.tar.xz -O- xzcat | tar xfv -
mv -vf $(find wasmtime*|grep /wasmtime$) ${WASISDK}/bin/


exit 0
Expand Down

0 comments on commit 96f5e31

Please sign in to comment.