Skip to content

Use new production=yes option #22

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

Merged
merged 1 commit into from
Feb 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build-android/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e

export BUILD_NAME=official
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="debug_symbols=no"
export OPTIONS="production=yes"
export OPTIONS_MONO="module_mono_enabled=yes mono_static=no"
export TERM=xterm

Expand Down
4 changes: 3 additions & 1 deletion build-ios/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ set -e

export BUILD_NAME=official
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="debug_symbols=no"
# Keep LTO disabled for iOS - it works but it makes linking apps on deploy very slow,
# which is seen as a regression in the current workflow.
export OPTIONS="production=yes use_lto=no"
Comment on lines +9 to +11
Copy link
Member Author

Choose a reason for hiding this comment

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

@naithar 3.2.4 RC 2 used this with OPTIONS="production=yes" only.
I guess this change should fix godotengine/godot#46064.

Copy link
Member

Choose a reason for hiding this comment

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

What about -flto=thin, it should be supported and work much faster.

Copy link
Member Author

Choose a reason for hiding this comment

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

We could try it, though that requires changes to platform/iphone/detect.py. Might also be worth reworking how we pass LTO options as e.g. for -flto=thin on Linux you need to pass use_lto=yes use_lld=yes use_thinlto=yes.

Copy link
Contributor

@naithar naithar Feb 22, 2021

Choose a reason for hiding this comment

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

What about -flto=thin, it should be supported and work much faster.

It was 3x faster for tvOS builds #21, so we can try using it. I can still provide macOS based non-lto builds just in case.

@akien-mga should I also change tvOS build script to support production flag?

Copy link
Member Author

Choose a reason for hiding this comment

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

should I also change tvOS build script to support production flag?

Yeah, sounds good.

Copy link
Member

Choose a reason for hiding this comment

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

What about -flto=thin, it should be supported and work much faster.

And it's using much less memory (under 900 MB), waiting for a few minutes for release builds seems pretty reasonable.

Copy link
Member

Choose a reason for hiding this comment

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

Also, LTO flags are completely missing from macOS detect.py.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I think we should overhaul the LTO flags to make sure they're consistent across all platforms and use the most optimal configuration by default (so thin on Clang/LLD).

Copy link
Member Author

Choose a reason for hiding this comment

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

I opened godotengine/godot#46317 to continue the discussion on LTO for iOS and macOS.

Copy link
Member Author

Choose a reason for hiding this comment

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

I had a small doubt whether this override would work... and it turns out it didn't :)
Needs some fixes to how we handle overriding options that would get default values from dev=yes and production=yes: godotengine/godot#46365

export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
export TERM=xterm

Expand Down
2 changes: 1 addition & 1 deletion build-javascript/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e

export BUILD_NAME=official
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="debug_symbols=no use_lto=yes"
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 TERM=xterm

Expand Down
2 changes: 1 addition & 1 deletion build-linux/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e

export BUILD_NAME=official
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="debug_symbols=no use_lto=yes"
export OPTIONS="production=yes"
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
export TERM=xterm

Expand Down
2 changes: 1 addition & 1 deletion build-macosx/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e

export BUILD_NAME=official
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="osxcross_sdk=darwin20 debug_symbols=no"
export OPTIONS="osxcross_sdk=darwin20 production=yes"
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes mono_prefix=/root/dependencies/mono"
export TERM=xterm

Expand Down
2 changes: 1 addition & 1 deletion build-mono-glue/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e

export BUILD_NAME=official
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="debug_symbols=no"
export OPTIONS="debug_symbols=no use_static_cpp=no"
export TERM=xterm

rm -rf godot
Expand Down
2 changes: 1 addition & 1 deletion build-server/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e

export BUILD_NAME=official
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="debug_symbols=no use_static_cpp=yes use_lto=yes"
export OPTIONS="production=yes"
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
export TERM=xterm
export CC="gcc-9"
Expand Down
2 changes: 1 addition & 1 deletion build-uwp/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e

export BUILD_NAME=official
export SCONS="call scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="debug_symbols=no"
export OPTIONS="production=yes"
export BUILD_ARCHES="x86 x64 arm"
export ANGLE_SRC_PATH='c:\angle'

Expand Down
2 changes: 1 addition & 1 deletion build-windows/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e

export BUILD_NAME=official
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="debug_symbols=no use_lto=yes"
export OPTIONS="production=yes"
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
export TERM=xterm
export MONO32_PREFIX=/root/dependencies/mono-32
Expand Down