Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @REM Only for learning quality-of-life after intro to compiler toolchain.
- @REM Will be replaced later with the file-aware TUP build system.
- @SETLOCAL
- @REM Here we define all the flags we're compiling with
- @REM Recommended minimum: -std=c++17 -O2 -Wall -Wextra -pedantic
- @SET FLAGS=-std=c++17 -fmax-errors=3 -O2 -Wall -Wextra -Werror=pedantic -pedantic-errors -Wformat=2 -Wshadow -Wreorder -Wduplicated-cond -Wduplicated-branches -Wnoexcept -Wconversion -Wsign-conversion -Wnon-virtual-dtor -Wsign-promo -Wdouble-promotion -Wold-style-cast -Wuseless-cast -Wcast-align -Wstrict-aliasing=1 -Wstrict-overflow=3 -Wnull-dereference -Wzero-as-null-pointer-constant -fno-fat-lto-objects -s -Wno-odr -fuse-linker-plugin -static
- @REM Note To Self: removed -flto due to conflict bugs present in mingw v8.1.0
- @ECHO.
- @REM First, we assemble an object file (.o) for each source (.cpp)
- @REM Note the -c argument, saying to gen ASM objects but not to link
- g++ %FLAGS% "main.cpp" -c -o "main.o"
- @ECHO.
- @REM Next, we link each of the assemblies (.o) into an executible (.exe)
- @REM Note the lack of -c, saying to perform linkage
- g++ %FLAGS% "main.o" -o "main.exe"
- @ECHO.
- @REM we could do this in one step, without generating ASM objects via:
- @REM g++ %FLAGS% "main.cpp" -o "main.exe"
- @ENDLOCAL
- @PAUSE
Add Comment
Please, Sign In to add comment