mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-06 05:48:40 +00:00
tweak build script to allow clang builds of mule_main; fix clang build
This commit is contained in:
@@ -43,10 +43,10 @@ if "%asan%"=="1" set auto_compile_flags=%auto_compile_flags% -fsanitize=add
|
|||||||
:: --- Compile/Link Line Definitions ------------------------------------------
|
:: --- Compile/Link Line Definitions ------------------------------------------
|
||||||
set cl_common= /I..\src\ /I..\local\ /nologo /FC /Z7
|
set cl_common= /I..\src\ /I..\local\ /nologo /FC /Z7
|
||||||
set clang_common= -I..\src\ -I..\local\ -gcodeview -fdiagnostics-absolute-paths -Wall -Wno-unknown-warning-option -Wno-missing-braces -Wno-unused-function -Wno-writable-strings -Wno-unused-value -Wno-unused-variable -Wno-unused-local-typedef -Wno-deprecated-register -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-single-bit-bitfield-constant-conversion -Xclang -flto-visibility-public-std -D_USE_MATH_DEFINES -Dstrdup=_strdup -Dgnu_printf=printf
|
set clang_common= -I..\src\ -I..\local\ -gcodeview -fdiagnostics-absolute-paths -Wall -Wno-unknown-warning-option -Wno-missing-braces -Wno-unused-function -Wno-writable-strings -Wno-unused-value -Wno-unused-variable -Wno-unused-local-typedef -Wno-deprecated-register -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-single-bit-bitfield-constant-conversion -Xclang -flto-visibility-public-std -D_USE_MATH_DEFINES -Dstrdup=_strdup -Dgnu_printf=printf
|
||||||
set cl_debug= call cl /Od %cl_common%
|
set cl_debug= call cl /Od %cl_common% %auto_compile_flags%
|
||||||
set cl_release= call cl /O2 /DNDEBUG %cl_common%
|
set cl_release= call cl /O2 /DNDEBUG %cl_common% %auto_compile_flags%
|
||||||
set clang_debug= call clang -g -O0 %clang_common%
|
set clang_debug= call clang -g -O0 %clang_common% %auto_compile_flags%
|
||||||
set clang_release= call clang -g -O3 -DNDEBUG %clang_common%
|
set clang_release= call clang -g -O3 -DNDEBUG %clang_common% %auto_compile_flags%
|
||||||
set cl_link= /link /MANIFEST:EMBED /INCREMENTAL:NO /natvis:"%~dp0\src\natvis\base.natvis"
|
set cl_link= /link /MANIFEST:EMBED /INCREMENTAL:NO /natvis:"%~dp0\src\natvis\base.natvis"
|
||||||
set clang_link= -fuse-ld=lld -Xlinker /MANIFEST:EMBED -Xlinker /natvis:"%~dp0\src\natvis\base.natvis"
|
set clang_link= -fuse-ld=lld -Xlinker /MANIFEST:EMBED -Xlinker /natvis:"%~dp0\src\natvis\base.natvis"
|
||||||
set cl_out= /out:
|
set cl_out= /out:
|
||||||
@@ -56,6 +56,10 @@ set clang_out= -o
|
|||||||
set gfx=-DOS_FEATURE_GRAPHICAL=1
|
set gfx=-DOS_FEATURE_GRAPHICAL=1
|
||||||
set net=-DOS_FEATURE_SOCKET=1
|
set net=-DOS_FEATURE_SOCKET=1
|
||||||
set link_dll=-DLL
|
set link_dll=-DLL
|
||||||
|
if "%msvc%"=="1" set only_compile=/c
|
||||||
|
if "%clang%"=="1" set only_compile=-c
|
||||||
|
if "%msvc%"=="1" set EHsc=/EHsc
|
||||||
|
if "%clang%"=="1" set EHsc=
|
||||||
|
|
||||||
:: --- Choose Compile/Link Lines ----------------------------------------------
|
:: --- Choose Compile/Link Lines ----------------------------------------------
|
||||||
if "%msvc%"=="1" set compile_debug=%cl_debug%
|
if "%msvc%"=="1" set compile_debug=%cl_debug%
|
||||||
@@ -68,7 +72,6 @@ if "%clang%"=="1" set compile_link=%clang_link%
|
|||||||
if "%clang%"=="1" set out=%clang_out%
|
if "%clang%"=="1" set out=%clang_out%
|
||||||
if "%debug%"=="1" set compile=%compile_debug%
|
if "%debug%"=="1" set compile=%compile_debug%
|
||||||
if "%release%"=="1" set compile=%compile_release%
|
if "%release%"=="1" set compile=%compile_release%
|
||||||
set compile=%compile% %auto_compile_flags%
|
|
||||||
|
|
||||||
:: --- Prep Directories -------------------------------------------------------
|
:: --- Prep Directories -------------------------------------------------------
|
||||||
if not exist build mkdir build
|
if not exist build mkdir build
|
||||||
@@ -92,7 +95,7 @@ if "%raddbg_dump%"=="1" %compile% ..\src\raddbg_dump\raddbg_d
|
|||||||
if "%ryan_scratch%"=="1" %compile% ..\src\scratch\ryan_scratch.c %compile_link% %out%ryan_scratch.exe
|
if "%ryan_scratch%"=="1" %compile% ..\src\scratch\ryan_scratch.c %compile_link% %out%ryan_scratch.exe
|
||||||
if "%cpp_tests%"=="1" %compile% ..\src\scratch\i_hate_c_plus_plus.cpp %compile_link% %out%cpp_tests.exe
|
if "%cpp_tests%"=="1" %compile% ..\src\scratch\i_hate_c_plus_plus.cpp %compile_link% %out%cpp_tests.exe
|
||||||
if "%look_at_raddbg%"=="1" %compile% ..\src\scratch\look_at_raddbg.c %compile_link% %out%look_at_raddbg.exe
|
if "%look_at_raddbg%"=="1" %compile% ..\src\scratch\look_at_raddbg.c %compile_link% %out%look_at_raddbg.exe
|
||||||
if "%mule_main%"=="1" del vc*.pdb mule*.pdb && %cl_release% /MT /c ..\src\mule\mule_inline.cpp && %cl_release% /MT /c ..\src\mule\mule_o2.cpp && %cl_debug% /MT /EHsc ..\src\mule\mule_main.cpp ..\src\mule\mule_c.c mule_inline.obj mule_o2.obj
|
if "%mule_main%"=="1" del vc*.pdb mule*.pdb && %compile_release% %only_compile% ..\src\mule\mule_inline.cpp && %compile_release% %only_compile% ..\src\mule\mule_o2.cpp && %compile_debug% %EHsc% ..\src\mule\mule_main.cpp ..\src\mule\mule_c.c mule_inline.obj mule_o2.obj
|
||||||
if "%mule_module%"=="1" %compile% ..\src\mule\mule_module.cpp %compile_link% %link_dll% %out%mule_module.dll
|
if "%mule_module%"=="1" %compile% ..\src\mule\mule_module.cpp %compile_link% %link_dll% %out%mule_module.dll
|
||||||
if "%mule_hotload%"=="1" %compile% ..\src\mule\mule_hotload_main.c %compile_link% %out%mule_hotload.exe & %compile% ..\src\mule\mule_hotload_module_main.c %compile_link% %link_dll% %out%mule_hotload_module.dll
|
if "%mule_hotload%"=="1" %compile% ..\src\mule\mule_hotload_main.c %compile_link% %out%mule_hotload.exe & %compile% ..\src\mule\mule_hotload_module_main.c %compile_link% %link_dll% %out%mule_hotload_module.dll
|
||||||
popd
|
popd
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
// NOTE(allen): Inline Stepping
|
// NOTE(allen): Inline Stepping
|
||||||
|
|
||||||
extern unsigned int fixed_frac_bits = 5;
|
unsigned int fixed_frac_bits = 5;
|
||||||
static unsigned int bias = 7;
|
static unsigned int bias = 7;
|
||||||
|
|
||||||
static FORCE_INLINE unsigned int
|
static FORCE_INLINE unsigned int
|
||||||
|
|||||||
@@ -1407,7 +1407,7 @@ extended_type_coverage_eval_tests(void){
|
|||||||
Base *base_array[1024] = {0};
|
Base *base_array[1024] = {0};
|
||||||
for(int i = 0; i < sizeof(base_array)/sizeof(base_array[0]); i += 1)
|
for(int i = 0; i < sizeof(base_array)/sizeof(base_array[0]); i += 1)
|
||||||
{
|
{
|
||||||
if(i & 1 == 1)
|
if((i & 1) == 1)
|
||||||
{
|
{
|
||||||
base_array[i] = new DerivedA();
|
base_array[i] = new DerivedA();
|
||||||
}
|
}
|
||||||
@@ -1999,7 +1999,7 @@ control_flow_stepping_tests(void){
|
|||||||
if (i <= 1) goto done;
|
if (i <= 1) goto done;
|
||||||
if ((i&1) == 0) goto even_case;
|
if ((i&1) == 0) goto even_case;
|
||||||
|
|
||||||
odd_case:
|
// odd_case:
|
||||||
i = 3*i + 1;
|
i = 3*i + 1;
|
||||||
|
|
||||||
even_case:
|
even_case:
|
||||||
|
|||||||
Reference in New Issue
Block a user