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

Disable optimizations for macOS builds #26564

Merged
merged 2 commits into from
Nov 11, 2018
Merged

Disable optimizations for macOS builds #26564

merged 2 commits into from
Nov 11, 2018

Conversation

Veid
Copy link
Contributor

@Veid Veid commented Nov 6, 2018

Summary

SUMMARY: Build "Disable optimizations for macOS builds"

Purpose of change

Fixes #23171

Describe the solution

Disable compiler optimizations for macOS builds.

Additional context

I believe (not sure) specific/older versions of clang appear to have a bug such that they don't copy the std::function object properly with optimization switch turned on. This is a band-aid fix that should stop the macOS builds from crashing, for now.

See:
#23171
#17898 (diff)

…ang appear to have a bug such that they don't copy the std::function object properly with optimization switch turned on. This is a band-aid fix that should stop the macOS builds from crashing, for now.
@ZhilkinSerg ZhilkinSerg added Code: Build Issues regarding different builds and build environments OS: macOS Issues related to macOS / OSX operating system labels Nov 6, 2018
@ZhilkinSerg ZhilkinSerg self-assigned this Nov 6, 2018
@ralreegorganon
Copy link
Contributor

You're changing this for all macOS builds, cross-compiled and native, but it compiles natively and runs just fine on the latest releases:

clang --version
Apple LLVM version 10.0.0 (clang-1000.10.44.2)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
sw_vers
ProductName:	Mac OS X
ProductVersion:	10.14.1
BuildVersion:	18B75
make NATIVE=osx OSX_MIN=10.14 CLANG=1 CCACHE=1 LUA=1 TILES=1 RELEASE=1 -j6

Can you consider making this a bit more targeted, given you're kicking it all the way down to -O0? OSX_MIN and OSXCROSS both exist in the makefile and provide some levers to focus this a bit more.

@jfcaron3
Copy link

This needs to be reverted, I think. 10.11 is now two years past end-of-life, but with some new features enabled by default in stable, the game is very very slow and not enjoyable to play on medium Mac hardware. I can confirm that compiling the game for myself on 10.13 is actually playable.

How much more work would it be to maintain two macOS builds? One for <=10.11 and one for >10.11?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code: Build Issues regarding different builds and build environments OS: macOS Issues related to macOS / OSX operating system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cross-compiled macOS experimentals crash on open
4 participants