1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-04 23:36:00 +02:00

Wasm calling convention fixes. IDEHelper/Tests runs on wasm now.

This commit is contained in:
Brian Fiete 2024-10-25 11:20:01 -04:00
parent c0ebcc8fda
commit 31746c1f19
12 changed files with 99 additions and 13 deletions

View file

@ -19,3 +19,7 @@ PreBuildCmds = ["/usr/bin/c++ $(ProjectDir)/CLib/main.cpp -g -c -o $(ProjectDir)
[Configs.Test.macOS]
OtherLinkFlags = "$(LinkFlags) $(ProjectDir)/CLib/main.o"
PreBuildCmds = ["/usr/bin/c++ $(ProjectDir)/CLib/main.cpp -g -c -o $(ProjectDir)/CLib/main.o"]
[Configs.Test.wasm32]
OtherLinkFlags = "$(LinkFlags) $(ProjectDir)/CLib/main_wasm.o -sSTACK_SIZE=1048576"
PreBuildCmds = ["$(EmccPath) $(ProjectDir)/CLib/main.cpp -g -c -o $(ProjectDir)/CLib/main_wasm.o"]

View file

@ -11,6 +11,11 @@ IntermediateType = "ObjectAndIRCode"
[Configs.Debug.Win32]
IntermediateType = "ObjectAndIRCode"
[Configs.Debug.wasm32]
AllocType = "CRT"
EnableObjectDebugFlags = false
EmitObjectAccessCheck = false
[Configs.Test.Win64]
IntermediateType = "ObjectAndIRCode"
COptimizationLevel = "O2"
@ -26,6 +31,12 @@ COptimizationLevel = "O2"
ConfigSelections = {TestsB = {Config = "Test"}}
[Configs.Test.Win32]
ConfigSelections = {TestsB = {Config = "Test"}}
[Configs.Test.wasm32]
AllocType = "CRT"
EnableObjectDebugFlags = false
EmitObjectAccessCheck = false
IntermediateType = "ObjectAndIRCode"
ConfigSelections = {TestsB = {Config = "Test"}}
@ -50,3 +61,13 @@ EmitObjectAccessCheck = false
EnableRealtimeLeakCheck = false
AllocStackTraceDepth = 0
COptimizationLevel = "O2"
[Configs.TestFail.wasm32]
AllocType = "CRT"
EnableObjectDebugFlags = false
EmitObjectAccessCheck = false
[Configs.Paranoid.wasm32]
AllocType = "CRT"
EnableObjectDebugFlags = false
EmitObjectAccessCheck = false

View file

@ -92,6 +92,7 @@ namespace Tests
Test.Assert(ptr[i] == data[i]);
}
#if BF_ENABLE_OBJECT_DEBUG_FLAGS
[Test]
public static void Test()
{
@ -129,5 +130,6 @@ namespace Tests
Test.Assert(cf.mC == 234);
cf.mB.Append('!', 2048);
}
#endif
}
}

View file

@ -259,6 +259,7 @@ namespace Tests
Test.Assert(t.InstanceSize == 8);
}
#if !BF_PLATFORM_WASM
[Test]
static void TestA()
{
@ -683,5 +684,6 @@ namespace Tests
fieldIdx++;
}
}
#endif
}
}