Bitiquinho Posted July 26, 2013 Report Share Posted July 26, 2013 Hi, I want to know if it's possible to set my CXXFLAGS and LDFLAGS when compiling the game from svn, so that I can test possible performance gains with -Ofast and -flto (Link Time Optimizations) options. There's is no configure script for that, so can just I do the same way with update_workspaces script ? Like this:CXXFLAGS="-DNDEBUG -Ofast -flto -march=native -mtune=core2 -msse -msse2" LDFLAGS="-DNDEBUG -Ofast -flto -march=native -mtune=core2 -msse -msse2" ./update-workspaces.shSorry for possible bad english and thanks in advice. 1 Quote Link to comment Share on other sites More sharing options...
Yves Posted July 26, 2013 Report Share Posted July 26, 2013 Check premake4.lua in 0ad/build/premake.If you change anything in this file you have to run update-workspaces again and it will add the flags to the makefiles.The other way for temporary tests is to edit the makefiles directly in build/workspaces/gcc. Quote Link to comment Share on other sites More sharing options...
Bitiquinho Posted July 26, 2013 Author Report Share Posted July 26, 2013 Thanks for the quick answer. I'll experiment a little. Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted July 26, 2013 Report Share Posted July 26, 2013 You could also pass --minimal-flags to update-workspaces, which disables most of what premake4.lua adds, then set whatever options you want in CXXFLAGS/LDFLAGS as you said. Quote Link to comment Share on other sites More sharing options...
fabio Posted August 14, 2013 Report Share Posted August 14, 2013 See also http://trac.wildfiregames.com/ticket/1755 for how to modify premake4.lua for LTO.Did you do some tests? Quote Link to comment Share on other sites More sharing options...
Bitiquinho Posted August 15, 2013 Author Report Share Posted August 15, 2013 LTO build fails (gcc 4.8.0 here, 4.8.1 not in the repositories yet). Without -flto option I can build successfully but dont get much improvement over the binary release. Quote Link to comment Share on other sites More sharing options...
quantumstate Posted August 15, 2013 Report Share Posted August 15, 2013 What failure do you get with LTO? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.