From a0c29e7dd67abb15c74c85f07741784877edfdcd Mon Sep 17 00:00:00 2001 From: Joe Ludwig Date: Mon, 2 Sep 2013 11:39:10 -0700 Subject: General: * Fixed a variety of server browser issues with mods based on this SDK * Fixed many warnings on various platforms * Added source code for fgdlib and raytrace * Updated many source files with the latest shared source from TF2. OSX: * Added support for Xcode 4.6 * Switched OSX builds to use Xcode instead of makefiles * Moved libs from src/lib/osx32 to src/lib/public/osx32 or src/lib/common/osx32 to match windows better. Linux: * Moved libs from src/lib/linux32 to src/lib/public/linux32 or src/lib/common/linux32 to match windows better. --- mp/src/devtools/base.xcconfig | 46 +++++++++++++++++++++++++ mp/src/devtools/bin/osx32/xcode_ccache_wrapper | 3 ++ mp/src/devtools/bin/vpc.exe | Bin 1129472 -> 1133568 bytes mp/src/devtools/bin/vpc_linux | Bin 1184881 -> 1177324 bytes mp/src/devtools/bin/vpc_osx | Bin 1101980 -> 1098508 bytes mp/src/devtools/debug.xcconfig | 4 +++ mp/src/devtools/makefile_base_posix.mak | 2 +- mp/src/devtools/release.xcconfig | 4 +++ 8 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 mp/src/devtools/base.xcconfig create mode 100644 mp/src/devtools/bin/osx32/xcode_ccache_wrapper create mode 100644 mp/src/devtools/debug.xcconfig create mode 100644 mp/src/devtools/release.xcconfig (limited to 'mp/src/devtools') diff --git a/mp/src/devtools/base.xcconfig b/mp/src/devtools/base.xcconfig new file mode 100644 index 00000000..d5ba4a16 --- /dev/null +++ b/mp/src/devtools/base.xcconfig @@ -0,0 +1,46 @@ +ALWAYS_SEARCH_USER_PATHS = YES +HEADER_SEARCH_PATHS = $(HEADER_SEARCH_PATHS) $(SDKROOT)/usr/include/malloc + +ARCHS = i386 +ONLY_ACTIVE_ARCH = NO +COPY_PHASE_STRIP = NO +DEBUG_INFORMATION_FORMAT = dwarf-with-dsym + +DEAD_CODE_STRIPPING = YES +PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES + +GCC_C_LANGUAGE_STANDARD = gnu99 +GCC_ENABLE_OBJC_EXCEPTIONS = YES +GCC_SYMBOLS_PRIVATE_EXTERN = YES +GCC_INLINES_ARE_PRIVATE_EXTERN = YES +GCC_REUSE_STRINGS = YES + +// CPP11_NO_LIBCXX is used to gate some C++11 features that require that we +// switch to libc++. We haven't switched to libc++11 because we have been unable +// to find a clean way to build libcef_dll_wrapper with libc++. +// We currently build libcef for Steam which needs to run on 10.5, and Xcode +// does not support linking with libc++ and targeting 10.5. +// Once libcef_dll_wrapper has been built with libc++, and you rebuild protobuf +// with libc++ (which is trivial), you can remove CPP11_NO_LIBCXX and add the +// following line to the xcconfig: +// CLANG_CXX_LIBRARY = libc++ +GCC_PREPROCESSOR_DEFINITIONS = _DLL_EXT=.dylib NO_MALLOC_OVERRIDE=1 VPROF_LEVEL=1 NO_HOOK_MALLOC=1 PNG_NO_PEDANTIC_WARNINGS CPP11_NO_LIBCXX +BASE_CFLAGS= -Usprintf -Ustrncpy -UPROTECTED_THINGS_ENABLE + +GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO +WARNING_CFLAGS = -Wno-deprecated-writable-strings -Wno-switch-enum -Wno-switch -Wno-unused-value -Wno-parentheses -Wno-logical-op-parentheses -Wno-c++11-narrowing + +// CLANG - and use the ccache wrapper +GCC_VERSION = com.apple.compilers.llvm.clang.1_0 +CC = $(SOURCE_ROOT)/devtools/bin/osx32/xcode_ccache_wrapper +LDPLUSPLUS = $(DT_TOOLCHAIN_DIR)/usr/bin/clang++ +CLANG_WARN_CXX0X_EXTENSIONS = NO +CLANG_CXX_LANGUAGE_STANDARD = gnu++11 + +// include gets confused, 'cause ivp has one, and the system has one, and only one +// gets into the header map, so sacrifice speed for corectness. +USE_HEADERMAP = NO + +SDKROOT = macosx10.7 +MACOSX_DEPLOYMENT_TARGET = 10.5 +GCC_FAST_MATH = YES diff --git a/mp/src/devtools/bin/osx32/xcode_ccache_wrapper b/mp/src/devtools/bin/osx32/xcode_ccache_wrapper new file mode 100644 index 00000000..4f038475 --- /dev/null +++ b/mp/src/devtools/bin/osx32/xcode_ccache_wrapper @@ -0,0 +1,3 @@ +#!/bin/bash + +exec $(dirname $0)/ccache "${DT_TOOLCHAIN_DIR}"/usr/bin/clang -Qunused-arguments "$@" diff --git a/mp/src/devtools/bin/vpc.exe b/mp/src/devtools/bin/vpc.exe index ddc1328c..2394de95 100644 Binary files a/mp/src/devtools/bin/vpc.exe and b/mp/src/devtools/bin/vpc.exe differ diff --git a/mp/src/devtools/bin/vpc_linux b/mp/src/devtools/bin/vpc_linux index d6534046..c69b62f5 100755 Binary files a/mp/src/devtools/bin/vpc_linux and b/mp/src/devtools/bin/vpc_linux differ diff --git a/mp/src/devtools/bin/vpc_osx b/mp/src/devtools/bin/vpc_osx index 0f9ef14b..701d780e 100755 Binary files a/mp/src/devtools/bin/vpc_osx and b/mp/src/devtools/bin/vpc_osx differ diff --git a/mp/src/devtools/debug.xcconfig b/mp/src/devtools/debug.xcconfig new file mode 100644 index 00000000..668a3cf1 --- /dev/null +++ b/mp/src/devtools/debug.xcconfig @@ -0,0 +1,4 @@ +#include "base.xcconfig" +GCC_OPTIMIZATION_LEVEL = 0 +OTHER_CFLAGS = $(derived) $(BASE_CFLAGS) + diff --git a/mp/src/devtools/makefile_base_posix.mak b/mp/src/devtools/makefile_base_posix.mak index 7ad95035..8b32dec5 100644 --- a/mp/src/devtools/makefile_base_posix.mak +++ b/mp/src/devtools/makefile_base_posix.mak @@ -42,7 +42,7 @@ CFLAGS = $(ARCH_FLAGS) $(CPPFLAGS) $(WARN_FLAGS) -fvisibility=$(SymbolVisibility # In -std=gnu++0x mode we get lots of errors about "error: narrowing conversion". -fpermissive # turns these into warnings in gcc, and -Wno-c++11-narrowing suppresses them entirely in clang 3.1+. ifeq ($(CXX),clang++) - CXXFLAGS = $(CFLAGS) -Wno-c++11-narrowing -Wno-dangling-else + CXXFLAGS = $(CFLAGS) -Wno-c++11-narrowing else CXXFLAGS = $(CFLAGS) -fpermissive endif diff --git a/mp/src/devtools/release.xcconfig b/mp/src/devtools/release.xcconfig new file mode 100644 index 00000000..5e1a475f --- /dev/null +++ b/mp/src/devtools/release.xcconfig @@ -0,0 +1,4 @@ +#include "base.xcconfig" + +GCC_OPTIMIZATION_LEVEL = 2 +OTHER_CFLAGS = $(derived) $(BASE_CFLAGS) -ftree-vectorize -fpredictive-commoning -funswitch-loops -- cgit v1.2.3