Turn off ccache for vcpkg builds (this is only relevant to MSVC, where
ccache does not work yet.)
Throw an error if CMAKE_BUILD_TYPE is not valid or does not match case
exactly (to make comparisons simple.)
Add SetCompilerLinkerFlags.cmake lib with the functions:
add_compiler_flags()
For each flag passed in, add it to CMAKE_CXX_FLAGS and CMAKE_C_FLAGS if
not already present. Also clears all build-specific flag variables on
every call, if using this functions you must set build-specific flags
yourself.
add_linker_flags()
For each flag passed in, add it to
CMAKE_(EXE|SHARED|MODULE|STATIC)_LINKER_FLAGS if not already present.
Add remove_dupes() function to VbamFunctions.cmake from:
https://stackoverflow.com/a/41416298/262458
This is used to remove duplicate flags in SetCompilerLinkerFlags.cmake
described above.
Use the new functions to set compiler and linker flags for MSVC.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Update installdeps to support CLANG64/CLANG32 MSYS2 targets.
cmake:
Set POLICY CMP0060 to NEW to not convert full lib paths, this is the
default.
Stop disabling ffmpeg on WIN32+i686.
On MSYS2+clang add windows import libs to CMAKE_PREFIX_PATH.
For static builds on MSYS2 append full paths for static libs for tiff,
jbig and lzma to FFMPEG_LIBRARIES.
Add -Wno-unused-command-line-argument to all CFLAGS/CXXFLAGS so that
clang does not warn about gcc-specific options.
Enable -march/-mtune optimizations by default instead of only for
UPSTREAM_RELEASE.
Update find_wx_util() to search suffixes for WIN32 and add the "static"
suffix for static builds.
Remove all linker flags from wxWidgets_LIBRARIES and translate all wx*
libs as well as jpeg, tiff, jbig lzma and expat to full .a paths for
static builds.
Disable strutil tests on MSYS2+clang, currently does not build.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Use:
/Ot /Oy /Ob3 /GF /Gy
, instead of /O2 for x86, this makes it not crash on ROM load for the
OpenGL renderer.
Supposedly /O2 is equivalent to:
/Og /Oi /Ot /Oy /Ob2 /GF /Gy
, but the documentation states that /Og is automatically enabled when
any other optimizations are enabled automatically. So this should make
absolutely no difference, yet it does.
For x64 use:
/O2 /Ob3
, this overrides /Ob2 from /O2 to use more aggressive inlining, VS 2019
is required for this.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
For MSVC, add the optimization flags:
/fp:fast /Oi
, to favor speed for floating point operations and use intrinsic
operations where possible.
For release builds also add:
/O2
. Use sqrt() instead of std::sqrt() in XBRZ for MSVC x64 just in case to
make sure it uses the intrinsic version.
Test build is reported to run much faster.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Builds translations.zip and nothing else.
This is for the nightly builder when only translations are changed.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This is used by some hacked ROMs like Metroid II DX.
Add a config variable to enable the already existent core support for
this.
This conflicts with using a GB BIOS file, add checks and error dialogs
for this.
Also move including "ConfigManager.h" into "wxvbam.h".
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Use the X86_64 variable instead of AMD64 for this architecture in cmake.
For our upstream binary builds, use -march=core2 -mtune=rocketlake for
X86_64 on macOS, -march=core2 -mtune=znver3 for X86_64 on non-macOS (not
currently used) and -march=pentium-mmx -mtune=core2 for the future
Windows XP 32 bit MinGW build.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Instead of suffixing release zip files with 32bit or 64bit, add an
architecture suffix, which would be one of:
x86_32
x86_64
arm32
arm64
Allow codesign to fail on mac without aborting.
Disable the interactive pause for gpg signing because there is no
passphrase anymore.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
m4: 1.4.18 -> 1.4.19, remove patches.
libxml2: 2.9.12
wxwidgets: master (3.0.5.1 on mac for 10.7)
Run script with brew bash.
Unlink brew wxwidgets before build and relink after because it conflicts
with the built version, this needs to be fixed.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add indirect dependencies that cmake complains about and remove ccache
because it currently fails to build on NixOS unstable.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
The present ini variable is from vbam 1.x and is behaviourally backwards where setting disablemmx to true actually enables mmx, 2.x builds should not be using the ini from 1.x for various reasons.