diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua index a8b5a78..6fb00cc 100644 --- a/scripts/toolchain.lua +++ b/scripts/toolchain.lua @@ -941,7 +941,7 @@ function toolchain(_buildDir, _libDir) } linkoptions { - "-s MAX_WEBGL_VERSION=2" + "-s MAX_WEBGL_VERSION=2", } configuration { "wasm2js" } @@ -949,7 +949,7 @@ function toolchain(_buildDir, _libDir) objdir (path.join(_buildDir, "wasm2js/obj")) libdirs { path.join(_libDir, "lib/wasm2js") } linkoptions { - "-s WASM=0" + "-s WASM=0", } configuration { "wasm" } diff --git a/tests/os_test.cpp b/tests/os_test.cpp index c332b52..6f11515 100644 --- a/tests/os_test.cpp +++ b/tests/os_test.cpp @@ -14,15 +14,19 @@ TEST_CASE("getProcessMemoryUsed", "") // DBG("bx::getProcessMemoryUsed %d", bx::getProcessMemoryUsed() ); } +#if BX_CONFIG_SUPPORTS_THREADING + TEST_CASE("semaphore_timeout", "") { bx::Semaphore sem; - int64_t start = bx::getHPCounter(); - bool ok = sem.wait(900); - int64_t elapsed = bx::getHPCounter() - start; + int64_t start = bx::getHPCounter(); + bool ok = sem.wait(900); + int64_t elapsed = bx::getHPCounter() - start; int64_t frequency = bx::getHPFrequency(); - double ms = double(elapsed) / double(frequency) * 1000; - printf("%f\n", ms); + double ms = double(elapsed) / double(frequency) * 1000; + bx::printf("%f\n", ms); REQUIRE(!ok); } + +#endif // BX_CONFIG_SUPPORTS_THREADING diff --git a/tests/thread_test.cpp b/tests/thread_test.cpp index d238db1..b517eac 100644 --- a/tests/thread_test.cpp +++ b/tests/thread_test.cpp @@ -6,6 +6,8 @@ #include "test.h" #include +#if BX_CONFIG_SUPPORTS_THREADING + bx::DefaultAllocator s_allocator; bx::MpScUnboundedBlockingQueue s_mpsc(&s_allocator); @@ -69,3 +71,5 @@ TEST_CASE("MpScUnboundedBlockingQueue", "") REQUIRE(result == 0x1389); } + +#endif // BX_CONFIG_SUPPORTS_THREADING