diff options
author | 2016-05-12 08:42:02 +0200 | |
---|---|---|
committer | 2016-05-12 08:42:02 +0200 | |
commit | 2fe208917976a66a315c83672cc2242ffb2ac88a (patch) | |
tree | 461cb81c293cd0a429db12a2ffe055a4b9400861 /3rdparty/bx | |
parent | f7f6569add35e5588fcdf686af4b4d9ad5396b11 (diff) |
Update BGFX, BX, Benchmark and RapidJSON (nw)
Diffstat (limited to '3rdparty/bx')
-rw-r--r-- | 3rdparty/bx/include/bx/string.h | 17 | ||||
-rw-r--r-- | 3rdparty/bx/scripts/toolchain.lua | 18 | ||||
-rwxr-xr-x | 3rdparty/bx/tools/bin/darwin/genie | bin | 442656 -> 463136 bytes | |||
-rwxr-xr-x | 3rdparty/bx/tools/bin/linux/genie | bin | 417336 -> 437784 bytes | |||
-rw-r--r-- | 3rdparty/bx/tools/bin/windows/genie.exe | bin | 421376 -> 443392 bytes |
5 files changed, 27 insertions, 8 deletions
diff --git a/3rdparty/bx/include/bx/string.h b/3rdparty/bx/include/bx/string.h index 640de064910..937f15d1def 100644 --- a/3rdparty/bx/include/bx/string.h +++ b/3rdparty/bx/include/bx/string.h @@ -386,6 +386,23 @@ namespace bx va_end(argList); } + /// Replace all instances of substring. + template <typename Ty> + inline Ty replaceAll(const Ty& _str, const char* _from, const char* _to) + { + Ty str = _str; + size_t startPos = 0; + const size_t fromLen = strlen(_from); + const size_t toLen = strlen(_to); + while ( (startPos = str.find(_from, startPos) ) != Ty::npos) + { + str.replace(startPos, fromLen, _to); + startPos += toLen; + } + + return str; + } + /// Extract base file name from file path. inline const char* baseName(const char* _filePath) { diff --git a/3rdparty/bx/scripts/toolchain.lua b/3rdparty/bx/scripts/toolchain.lua index 77e7132d30a..d7d1ec8f189 100644 --- a/3rdparty/bx/scripts/toolchain.lua +++ b/3rdparty/bx/scripts/toolchain.lua @@ -168,9 +168,9 @@ function toolchain(_buildDir, _libDir) print("Set EMSCRIPTEN enviroment variable.") end - premake.gcc.cc = "$(EMSCRIPTEN)/emcc" - premake.gcc.cxx = "$(EMSCRIPTEN)/em++" - premake.gcc.ar = "$(EMSCRIPTEN)/emar" + premake.gcc.cc = "\"$(EMSCRIPTEN)/emcc\"" + premake.gcc.cxx = "\"$(EMSCRIPTEN)/em++\"" + premake.gcc.ar = "\"$(EMSCRIPTEN)/emar\"" premake.gcc.llvm = true location (path.join(_buildDir, "projects", _ACTION .. "-asmjs")) @@ -428,6 +428,7 @@ function toolchain(_buildDir, _libDir) "NoRTTI", "NoExceptions", "NoEditAndContinue", + "NoFramePointer", "Symbols", } @@ -466,8 +467,9 @@ function toolchain(_buildDir, _libDir) "_CRT_SECURE_NO_DEPRECATE", } buildoptions { - "/Oy-", -- Suppresses creation of frame pointers on the call stack. - "/Ob2", -- The Inline Function Expansion + "/wd4201", -- warning C4201: nonstandard extension used: nameless struct/union + "/wd4324", -- warning C4324: '': structure was padded due to alignment specifier + "/Ob2", -- The Inline Function Expansion } linkoptions { "/ignore:4221", -- LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library @@ -840,8 +842,8 @@ function toolchain(_buildDir, _libDir) objdir (path.join(_buildDir, "asmjs/obj")) libdirs { path.join(_libDir, "lib/asmjs") } buildoptions { - "-isystem$(EMSCRIPTEN)/system/include", - "-isystem$(EMSCRIPTEN)/system/include/libc", + "-i\"system$(EMSCRIPTEN)/system/include\"", + "-i\"system$(EMSCRIPTEN)/system/include/libc\"", "-Wunused-value", "-Wundef", } @@ -1223,7 +1225,7 @@ function strip() configuration { "asmjs" } postbuildcommands { "$(SILENT) echo Running asmjs finalize.", - "$(SILENT) $(EMSCRIPTEN)/emcc -O2 " + "$(SILENT) \"$(EMSCRIPTEN)/emcc\" -O2 " -- .. "-s EMTERPRETIFY=1 " -- .. "-s EMTERPRETIFY_ASYNC=1 " .. "-s TOTAL_MEMORY=268435456 " diff --git a/3rdparty/bx/tools/bin/darwin/genie b/3rdparty/bx/tools/bin/darwin/genie Binary files differindex 76ea0372048..54b5fcd9ca5 100755 --- a/3rdparty/bx/tools/bin/darwin/genie +++ b/3rdparty/bx/tools/bin/darwin/genie diff --git a/3rdparty/bx/tools/bin/linux/genie b/3rdparty/bx/tools/bin/linux/genie Binary files differindex 910b28098e0..2a498c42bf1 100755 --- a/3rdparty/bx/tools/bin/linux/genie +++ b/3rdparty/bx/tools/bin/linux/genie diff --git a/3rdparty/bx/tools/bin/windows/genie.exe b/3rdparty/bx/tools/bin/windows/genie.exe Binary files differindex 356155ae32a..85f9260c388 100644 --- a/3rdparty/bx/tools/bin/windows/genie.exe +++ b/3rdparty/bx/tools/bin/windows/genie.exe |