Skip to content

Commit

Permalink
Premake combined ASAN, LSAN, UBSan configurations into a single ASan_…
Browse files Browse the repository at this point in the history
…LSan_UBSan configuration 10/30/2024 | 24w44a2
  • Loading branch information
GamesTrap committed Oct 30, 2024
1 parent 18763f9 commit 071cd32
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 46 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
compiler: [clang, gcc]
configuration: [Debug, Release, RelWithDebInfo, Profiling, ASan, TSan, LSan, UBSan]
configuration: [Debug, Release, RelWithDebInfo, Profiling, ASan_LSan_UBSan, TSan]
clang_version: [19]
gcc_version: [14]
env:
Expand Down Expand Up @@ -282,7 +282,7 @@ jobs:
strategy:
matrix:
compiler: [clang, gcc]
configuration: [Debug, Release, RelWithDebInfo, Profiling, ASan, TSan, LSan, UBSan]
configuration: [Debug, Release, RelWithDebInfo, Profiling, ASan_LSan_UBSan, TSan]
needs: build-linux
steps:
- name: Cleanup workspace
Expand Down
1 change: 1 addition & 0 deletions SITREPS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5338,3 +5338,4 @@ SITREP 10/30/2024|24w44a2
- Changed TRAP Engine version to 24w44a2(0.11.32)
- GitHub Actions Added nightly build workflow ~<20 mins
- GitHub Actions Only trigger Build-Docs when new tag is added ~<5 mins
- Premake combined ASAN, LSAN, UBSan configurations into a single ASan_LSan_UBSan configuration ~<5 mins
2 changes: 1 addition & 1 deletion TRAP/src/Window/WindowingAPILinuxX11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4817,7 +4817,7 @@ void TRAP::INTERNAL::WindowingAPI::CreateKeyTablesX11()
std::string Name;
};

static constexpr std::array<Keys, 121u> KeyMap =
static const std::array<Keys, 121u> KeyMap =
{
{
{ .Key=TRAP::Input::Key::Grave_Accent, .Name="TLDE"}, { .Key=TRAP::Input::Key::One, .Name="AE01"},
Expand Down
2 changes: 2 additions & 0 deletions UnitTests/src/Utils/Optional.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1582,11 +1582,13 @@ TEST_CASE("TRAP::Optional<T&>", "[utils][optional]")
static constexpr i32 constexprFortyTwo = 42;
static constexpr auto GetInt = [](i32){return 42;};

#ifndef TRAP_ASAN
static constexpr TRAP::Optional<const i32&> o16 = constexprFortyTwo;
static constexpr auto o16r = o16.Transform(GetInt);

static constexpr TRAP::Optional<const i32&> o20 = constexprFortyTwo;
static constexpr auto o20r = std::move(o20).Transform(GetInt);
#endif /*TRAP_ASAN*/

static constexpr TRAP::Optional<i32&> o32 = TRAP::NullOpt;
static constexpr auto o32r = o32.Transform(GetInt);
Expand Down
49 changes: 6 additions & 43 deletions premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ workspace "TRAP"
filter "system:linux"
configurations
{
"ASan",
"UBSan",
"LSan",
"ASan_LSan_UBSan",
"TSan"
}

Expand Down Expand Up @@ -91,62 +89,27 @@ workspace "TRAP"
optimize "Full"
symbols "On"

filter {"language:C or C++", "configurations:ASAN"}
defines
{
"TRAP_RELWITHDEBINFO",
"TRAP_ASAN"
}
runtime "Release"
optimize "Debug"
symbols "On"
buildoptions
{
"-fsanitize=address",
"-fno-omit-frame-pointer",
"-g"
}
linkoptions
{
"-fsanitize=address"
}

filter {"language:C or C++", "configurations:UBSAN"}
filter {"language:C or C++", "configurations:ASan_LSan_UBSan"}
defines
{
"TRAP_RELWITHDEBINFO",
"TRAP_ASAN",
"TRAP_LSAN",
"TRAP_UBSAN"
}
runtime "Release"
optimize "Debug"
symbols "On"
buildoptions
{
"-fsanitize=undefined",
"-fsanitize=address,leak,undefined",
"-fno-omit-frame-pointer",
"-g"
}
linkoptions
{
"-fsanitize=undefined"
}

filter {"language:C or C++", "configurations:LSAN"}
defines
{
"TRAP_RELWITHDEBINFO",
"TRAP_LSAN"
}
runtime "Release"
optimize "Debug"
symbols "On"
buildoptions
{
"-fsanitize=leak",
"-fno-omit-frame-pointer",
"-g"
"-fsanitize=address,leak,undefined"
}
linkoptions "-fsanitize=leak"

filter {"language:C or C++", "configurations:TSAN"}
defines
Expand Down

0 comments on commit 071cd32

Please sign in to comment.