Index: ps/trunk/build/premake/premake5.lua =================================================================== --- ps/trunk/build/premake/premake5.lua +++ ps/trunk/build/premake/premake5.lua @@ -199,6 +199,13 @@ -- being used as a DLL (which is currently not the case in 0ad) defines { "LIB_STATIC_LINK" } + -- Enable C++14 standard. + filter "action:vs*" + buildoptions { "/std:c++14" } + filter "action:not vs*" + buildoptions { "-std=c++14" } + filter {} + -- various platform-specific build flags if os.istarget("windows") then @@ -291,11 +298,6 @@ end end - buildoptions { - -- Enable C++11 standard. - "-std=c++0x" - } - if arch == "arm" then -- disable warnings about va_list ABI change and use -- compile-time flags for futher configuration. @@ -311,10 +313,10 @@ links { "gcov" } end - -- We don't want to require SSE2 everywhere yet, but OS X headers do - -- require it (and Intel Macs always have it) so enable it here + -- MacOS always provides SSE3 so enable that. + -- TODO: after <10.12 support is dropped, we can assume SSE4.1 is present. if os.istarget("macosx") then - buildoptions { "-msse2" } + buildoptions { "-msse3" } end -- Check if SDK path should be used @@ -336,8 +338,7 @@ defines { "BUNDLE_IDENTIFIER=" .. _OPTIONS["macosx-bundle"] } end - -- On OS X, force using libc++ since it has better C++11 support, - -- now required by the game + -- Only libc++ is supported on MacOS if os.istarget("macosx") then buildoptions { "-stdlib=libc++" } linkoptions { "-stdlib=libc++" } Index: ps/trunk/libraries/osx/build-osx-libs.sh =================================================================== --- ps/trunk/libraries/osx/build-osx-libs.sh +++ ps/trunk/libraries/osx/build-osx-libs.sh @@ -61,13 +61,6 @@ # * OpenGL # -------------------------------------------------------------- -# Force build architecture, as sometimes environment is broken. -# For a universal fat binary, the approach would be to build every -# dependency with both archs and combine them with lipo, then do the -# same thing with the game itself. -# Choices are "x86_64" or "i386" (ppc and ppc64 not supported) -ARCH=${ARCH:="x86_64"} - # Define compiler as "clang", this is all Mavericks supports. # gcc symlinks may still exist, but they are simply clang with # slightly different config, which confuses build scripts. @@ -94,17 +87,14 @@ # and CRT version, and use it to set the macosx_version_min linker flag LDFLAGS="$LDFLAGS -mmacosx-version-min=$MIN_OSX_VERSION" fi -# Force using libc++ since it has better C++11 support required by the game -# but pre-Mavericks still use libstdc++ by default -# Also enable c++0x for consistency with the game build -C_FLAGS="$C_FLAGS -arch $ARCH -fvisibility=hidden" -LDFLAGS="$LDFLAGS -arch $ARCH -stdlib=libc++" -CFLAGS="$CFLAGS $C_FLAGS" -CXXFLAGS="$CXXFLAGS $C_FLAGS -stdlib=libc++ -std=c++0x" +CFLAGS="$CFLAGS $C_FLAGS -fvisibility=hidden" +CXXFLAGS="$CXXFLAGS $C_FLAGS -stdlib=libc++ -std=c++14 -msse3" OBJCFLAGS="$OBJCFLAGS $C_FLAGS" OBJCXXFLAGS="$OBJCXXFLAGS $C_FLAGS" +LDFLAGS="$LDFLAGS -stdlib=libc++" + JOBS=${JOBS:="-j2"} set -e @@ -431,7 +421,6 @@ CONF_OPTS="--prefix=$INSTALL_DIR --disable-shared - --enable-macosx_arch=$ARCH --enable-unicode --with-cocoa --with-opengl