diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b45a037 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +Build diff --git a/main.cpp b/asan_example.cpp similarity index 100% rename from main.cpp rename to asan_example.cpp diff --git a/build.bat b/build.bat index 8cdd910..d4d0588 100644 --- a/build.bat +++ b/build.bat @@ -1,2 +1,8 @@ @echo off -cl main.cpp -Z7 -fsanitize=address -nologo -link || exit /b 1 +set script_dir_backslash=%~dp0 +set script_dir=%script_dir_backslash:~0,-1% + +if not exist Build mkdir Build +pushd Build +cl %script_dir%\asan_example.cpp -Zi -O2 -fsanitize=address -nologo -link || exit /b 1 +popd