-
-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JavaScript: Re-enable build for 4.0 now that WebGL 2 works #62
Conversation
@@ -5,8 +5,8 @@ set -e | |||
# Config | |||
|
|||
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no" | |||
export OPTIONS="production=yes" | |||
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes mono_prefix=/root/mono-installs/wasm-runtime-release use_lto=no" | |||
export OPTIONS="production=yes use_thinlto=yes" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Faless We'd have to do a proper benchmark but I think using ThinLTO for the Web platform would be better than (full) LTO. Clang/Emscripten's full LTO is single thread and just takes hours despite running on a ThreadRipper. While ThinLTO is multithreaded and takes minutes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cp out/javascript/templates/godot.javascript.opt.threads.zip ${templatesdir}/webassembly_threads_release.zip | ||
cp out/javascript/templates/godot.javascript.opt.debug.threads.zip ${templatesdir}/webassembly_threads_debug.zip | ||
|
||
cp out/javascript/templates/godot.javascript.opt.gdnative.threads.zip ${templatesdir}/webassembly_gdnative_threads_release.zip | ||
cp out/javascript/templates/godot.javascript.opt.debug.gdnative.threads.zip ${templatesdir}/webassembly_gdnative_threads_debug.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we now only supports threads enabled, the _threads
suffix might be redundant? The _gdnative
one should likely also be updated to match GDExtension. And I guess the Regular and GDNative without Threads export options should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solved in #67.
Follow-up to godotengine/godot#65094. Also reverts LTO change from #62, we found that while it's much slower to link, full LTO still produces smaller binaries and that's quite important for the Web platform.
Follow-up to godotengine/godot#65094. Also reverts LTO change from #62, we found that while it's much slower to link, full LTO still produces smaller binaries and that's quite important for the Web platform.
I made a test build with these changes yesterday: https://downloads.tuxfamily.org/godotengine/testing/4.0.alpha15-ish.web/
I couldn't get the web editor build to render anything in Firefox or Chromium on Linux, not sure why.
It might be my CORS server deployment methods which isn't working as expected. Or maybe we regressed on WebGL 2.0 support again.