This makes 'scons dist' work, although the resulting tarballs are not
yet identical to cmake tarballs.
Remove awk usage made obsolete by the git transition
(7f85fa000c).
Update src/revision.hpp reference to use src/revision.h. The former
name is unused since at least 7625b1e079.
As per sigurd's trial and error: RELRO's options are unknown entirely and -fstack-protector-strong results in compile errors. Building with just PIE and _FORTIFY_SOURCE enabled does then compile, but results in a broken executable.
This is workaround for windows style path confusing scons if they appear
in CPPATH etc. Paths without prefix still happen to be valid and they
start with "/", not "c:".
Technically, all this code should work on Vista, (including the recent switch to using
SHGetKnownFolderPath), but since we're also considering requiring Visual Studio 2017
for building, we need Windows 7.
Travis now also makes use of this to set the optimization level for the -O0 builds, rather than extra_flags_*. This additionally fixes an issue where using -O0 in the release build with LTO resulted in the individual *.o files being compiled with -O0, but LTO then still linked with release's default -O3.
After some discussion, we concluded that this code was unmaintained, not even used in
some places (display.cpp, units/frame.cpp), leaving the only area that really used it
at all the image surface cache. Considering there was never really a conclusive benchmark
of its benefits and because said surface cache will be used a lot less going forward,
we're just removing it and simplifying everything for everyone.
Closes#1260 since it's now irrelevant.
Commit dfc42e8a8d removed said code since
Wesnoth can use IMG_SavePNG() from SDL_image 2.0 instead. However, the
author left the build-time configuration options intact, and also part
of the necessary code for CMake to link Wesnoth against libpng.
Note that this change also eliminates an unnecessary direct link-time
dependency on libpng when using both CMake and SCons.
This reverts commit 44f567c6a3.
Enabling LTO by default causes too many problems, inclusing build
failures for @doofus-01 and link failures with Clang for me.
Players and packagers can still amanually enable LTO in case it
works fine for them.
The detection for when Clang is used was incorrect, resulting in GCC-only
parameter being passed to Clang.
In addition, at least on my system LTO+Clang caused linking errors even
with that fixed. As an emergency fix, I completely disabled LTO for Clang.
LTO for Windows is disabled for now, as TDM-GCC does not work well with it.
LTO for Travis is also disabled, due to the extra time linking with LTO takes.