mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-04-23 08:14:51 +02:00
Separate emscripten debug info
This commit is contained in:
parent
cb65cf8ffd
commit
e8921ca6db
20
.github/build.sh
vendored
20
.github/build.sh
vendored
@ -9,6 +9,7 @@ if [[ -z ${BSH_HOST_PLATFORM-} ]]; then >&2 echo "BSH_HOST_PLATFORM not set";
|
||||
if [[ -z ${BSH_HOST_LIBC-} ]]; then >&2 echo "BSH_HOST_LIBC not set"; exit 1; fi
|
||||
if [[ -z ${BSH_STATIC_DYNAMIC-} ]]; then >&2 echo "BSH_STATIC_DYNAMIC not set"; exit 1; fi
|
||||
if [[ -z ${BSH_DEBUG_RELEASE-} ]]; then >&2 echo "BSH_DEBUG_RELEASE not set"; exit 1; fi
|
||||
if [[ -z ${BSH_LINT-} ]]; then >&2 echo "BSH_LINT not set"; exit 1; fi
|
||||
if [[ -z ${RELEASE_NAME-} ]]; then >&2 echo "RELEASE_NAME not set"; exit 1; fi
|
||||
if [[ -z ${RELEASE_TYPE-} ]]; then >&2 echo "RELEASE_TYPE not set"; exit 1; fi
|
||||
if [[ -z ${MOD_ID-} ]]; then >&2 echo "MOD_ID not set"; exit 1; fi
|
||||
@ -119,7 +120,7 @@ if [[ -z ${BSH_NO_PACKAGES-} ]]; then
|
||||
fi
|
||||
;;
|
||||
emscripten)
|
||||
git clone https://github.com/emscripten-core/emsdk.git --branch 3.1.30
|
||||
git clone https://github.com/emscripten-core/emsdk.git --branch 3.1.72
|
||||
cd emsdk
|
||||
./emsdk install latest
|
||||
./emsdk activate latest
|
||||
@ -284,6 +285,9 @@ if [[ $BSH_HOST_PLATFORM == linux ]] && [[ $BSH_HOST_ARCH != aarch64 ]]; then
|
||||
meson_configure+=$'\t'-Db_pie=false
|
||||
c_link_args+=\'-no-pie\',
|
||||
fi
|
||||
if [[ $SEPARATE_DEBUG == yes ]] && [[ $BSH_HOST_PLATFORM == emscripten ]]; then
|
||||
c_link_args+=\'-gseparate-dwarf\',
|
||||
fi
|
||||
stable_or_beta=no
|
||||
if [[ $RELEASE_TYPE == beta ]]; then
|
||||
meson_configure+=$'\t'-Dbeta=true
|
||||
@ -488,10 +492,14 @@ else
|
||||
fi
|
||||
|
||||
if [[ $SEPARATE_DEBUG == yes ]] && [[ $BSH_HOST_PLATFORM-$BSH_HOST_LIBC != windows-msvc ]]; then
|
||||
$objcopy --only-keep-debug $strip_target $DEBUG_ASSET_PATH
|
||||
$strip --strip-debug --strip-unneeded $strip_target
|
||||
$objcopy --add-gnu-debuglink $DEBUG_ASSET_PATH $strip_target
|
||||
chmod -x $DEBUG_ASSET_PATH
|
||||
if [[ $BSH_HOST_PLATFORM == emscripten ]]; then
|
||||
mv $APP_EXE.wasm.debug.wasm $DEBUG_ASSET_PATH # yeah >_>
|
||||
else
|
||||
$objcopy --only-keep-debug $strip_target $DEBUG_ASSET_PATH
|
||||
$strip --strip-debug --strip-unneeded $strip_target
|
||||
$objcopy --add-gnu-debuglink $DEBUG_ASSET_PATH $strip_target
|
||||
chmod -x $DEBUG_ASSET_PATH
|
||||
fi
|
||||
fi
|
||||
if [[ $BSH_HOST_PLATFORM == android ]]; then
|
||||
$JAVA_HOME_8_X64/bin/keytool -genkeypair -keystore keystore.jks -alias androidkey -validity 10000 -keyalg RSA -keysize 2048 -keypass bagelsbagels -storepass bagelsbagels -dname "CN=nobody"
|
||||
@ -539,7 +547,7 @@ if [[ $BSH_HOST_PLATFORM == darwin ]]; then
|
||||
exit 1
|
||||
fi
|
||||
elif [[ $PACKAGE_MODE == emscripten ]]; then
|
||||
tar cvf $ASSET_PATH $APP_EXE.js $APP_EXE.worker.js $APP_EXE.wasm
|
||||
tar cvf $ASSET_PATH $APP_EXE.js $APP_EXE.wasm
|
||||
elif [[ $PACKAGE_MODE == appimage ]]; then
|
||||
# so far this can only happen with $BSH_HOST_PLATFORM-$BSH_HOST_LIBC == linux-gnu, but this may change later
|
||||
case $BSH_HOST_ARCH in
|
||||
|
2
.github/prepare.py
vendored
2
.github/prepare.py
vendored
@ -152,7 +152,7 @@ for arch, platform, libc, statdyn, bplatform, runso
|
||||
( 'aarch64', 'android', 'bionic', 'static', 'linux', 'ubuntu-22.04', '.apk', 'check', None, None, None, 'debug', 0, False ), # priority = 0: rarely used debug build
|
||||
( 'aarch64', 'android', 'bionic', 'static', 'linux', 'ubuntu-22.04', '.apk', 'publish', '.dbg', None, 'arm64-and-gcc-static', 'release', 10, True ),
|
||||
( 'wasm32', 'emscripten', 'emscripten', 'static', 'linux', 'ubuntu-22.04', '.tar', 'check', None, None, None, 'debug', 0, False ), # priority = 0: rarely used debug build
|
||||
( 'wasm32', 'emscripten', 'emscripten', 'static', 'linux', 'ubuntu-22.04', '.tar', 'publish', None, 'emscripten', 'wasm32-ems-static', 'release', 10, False ), # I have no idea how to separate debug info on emscripten, TODO: enable lint once emscripten ships clang-tidy
|
||||
( 'wasm32', 'emscripten', 'emscripten', 'static', 'linux', 'ubuntu-22.04', '.tar', 'publish','.dbg.wasm','emscripten', 'wasm32-ems-static', 'release', 10, False ), # TODO: enable lint once emscripten ships clang-tidy
|
||||
]:
|
||||
if priority < do_priority:
|
||||
continue
|
||||
|
@ -220,10 +220,8 @@ if host_platform == 'emscripten'
|
||||
'-s', 'USE_ZLIB=1',
|
||||
'-s', 'DISABLE_EXCEPTION_CATCHING=0',
|
||||
]
|
||||
if is_debug
|
||||
project_link_args += [ '--source-map-base=./' ]
|
||||
emcc_args += [ '-gsource-map' ]
|
||||
endif
|
||||
project_link_args += [ '--source-map-base=./' ]
|
||||
emcc_args += [ '-gsource-map' ]
|
||||
project_link_args += emcc_args
|
||||
project_cpp_args += emcc_args
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user