msvc/clang: Build with -W4 and address problems

This commit is contained in:
2021-10-07 23:59:05 +11:00
parent 199ef27fe3
commit 9d711ad7b8
3 changed files with 34 additions and 49 deletions
+3 -3
View File
@@ -11,16 +11,16 @@ where /q cl || (
REM MSVC cl build
echo [SCRIPT] Building tests via cl to build\intc_tests_cpp_msvc.exe
pushd build
cl -nologo -O2 -D INTC_TESTS_WITH_MAIN -I %script_dir% -TP %script_dir%\intc_tests.c /Fe:intc_tests_cpp_msvc /link
cl -nologo -fsanitize=address -W4 -O2 -D INTC_TESTS_WITH_MAIN -I %script_dir% -TP %script_dir%\intc_tests.c /Fe:intc_tests_cpp_msvc /link /DEBUG
echo [SCRIPT] Building tests via cl to build\intc_tests_c_msvc.exe
cl -nologo -O2 -D INTC_TESTS_WITH_MAIN -I %script_dir% -TC %script_dir%\intc_tests.c /Fe:intc_tests_c_msvc /link
cl -nologo -fsanitize=address -W4 -O2 -D INTC_TESTS_WITH_MAIN -I %script_dir% -TC %script_dir%\intc_tests.c /Fe:intc_tests_c_msvc /link /DEBUG
popd
REM Optional clang-cl build if we have the compiler on the path
where /q clang-cl || goto :eof
echo [SCRIPT] Building tests via clang-cl to build\intc_tests_cpp_clang.exe
pushd build
clang-cl -nologo -O2 -D INTC_TESTS_WITH_MAIN -I %script_dir% -TP %script_dir%\intc_tests.c /Fe:intc_tests_cpp_clang /link
clang-cl -nologo -fsanitize=address -W4 -O2 -D INTC_TESTS_WITH_MAIN -I %script_dir% -TP %script_dir%\intc_tests.c /Fe:intc_tests_cpp_clang /link /DEBUG
popd build