Skip to content
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

Merged
merged 1 commit into from
Aug 29, 2022

Conversation

akien-mga
Copy link
Member

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.

@akien-mga akien-mga requested a review from Faless August 26, 2022 12:45
@@ -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"
Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As seen in #66 this isn't the best option in the end so I'm reverting this change in #67.

Comment on lines +257 to +261
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
Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solved in #67.

@akien-mga akien-mga merged commit ccb6b90 into main Aug 29, 2022
@akien-mga akien-mga deleted the godot4-enable-web branch August 29, 2022 07:14
akien-mga added a commit that referenced this pull request Sep 7, 2022
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.
akien-mga added a commit that referenced this pull request Sep 7, 2022
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant