-
Notifications
You must be signed in to change notification settings - Fork 66
build_configuration
This page describes the various build configurations used in the project, detailing the different types of builds, their purpose, and the associated compiler flags for each configuration. These configurations control how the code is compiled and optimized for different development and release scenarios.
There are four main build configurations in the project, each designed for different purposes:
-
Purpose: The release configuration is used for building the final version of the game that will be distributed to end users.
-
Features:
- Maximum optimization (
/O2
) for better performance. - No debugging information is included to ensure smaller binary size and improved performance.
- Suitable for production builds.
- Maximum optimization (
-
Compiler Flags:
-
/O2
: Optimization for speed. -
/D "_RELEASE"
: Defines the release configuration. -
/D "NDEBUG"
: Disables debugging code.
-
-
Use Case: This configuration is used when preparing the game for release to the end user.
-
Purpose: The debug configuration is used for development and debugging. It includes debugging symbols and disables optimizations to make it easier to step through code.
-
Features:
- No optimization (
/Od
), making debugging easier but with slower execution. - Debugging symbols and additional information are included to help track issues.
- The build is less efficient but provides full access to debugging features.
- No optimization (
-
Compiler Flags:
-
/Od
: Disables optimizations to facilitate debugging. -
/D "_DEBUG"
: Defines the debug configuration. -
/ZI
: Generates debugging information. -
/Gm
: Enables minimal rebuilds.
-
-
Use Case: Used during development for debugging and resolving issues in the code.
-
Purpose: The internal configuration is used for internal development purposes, offering optimization and some debugging features to help developers while maintaining performance.
-
Features:
- Combines optimization (
/O2
) for performance with limited debugging options. - Suitable for internal testing and development, where performance is important, but some debugging features are still needed.
- Combines optimization (
-
Compiler Flags:
-
/O2
: Optimization for speed. -
/D "_INTERNAL"
: Defines the internal build configuration. -
/D "NDEBUG"
: Disables debugging in the final build. -
/Zi
: Generates debugging information.
-
-
Use Case: Used for internal builds when developers need optimized performance but still want some debugging tools available.
-
Purpose: The profile configuration is used for performance profiling and optimization. It is designed to help developers analyze performance bottlenecks and gather performance data.
-
Features:
- Includes optimization (
/O2
) and performance profiling flags. - Supports detailed stack tracing (
IG_DEBUG_STACKTRACE
) to gather performance metrics. - Designed for analyzing how the game performs under various conditions and measuring optimization effectiveness.
- Includes optimization (
-
Compiler Flags:
-
/O2
: Optimization for performance. -
/D "_PROFILE"
: Enables profiling configuration. -
/D "IG_DEBUG_STACKTRACE"
: Enables stack trace debugging for performance analysis. -
/D "NDEBUG"
: Disables debugging code in the final build.
-
-
Use Case: Used for profiling and performance analysis to optimize code and identify potential bottlenecks.
Below is a list of the key compiler flags used across different configurations:
-
/O2
: Optimizes the code for speed. This flag is typically used in release builds and performance profiling builds. -
/Od
: Disables optimizations, which is useful during debugging when you want to ensure that the debugger can easily track code execution.
-
/D "_DEBUG"
: Defines the build as a debug version, enabling debugging-specific features in the code. -
/D "_RELEASE"
: Defines the build as a release version, disabling debugging features and optimizing for performance. -
/D "_INTERNAL"
: Marks the build as an internal version, which may include some debugging information while still being optimized for performance. -
/D "NDEBUG"
: Disables debugging code, typically used in release and internal builds.
-
/D "_PROFILE"
: Enables performance profiling in the build. This flag is used to gather performance data during runtime. -
/D "IG_DEBUG_STACKTRACE"
: Enables stack trace generation, which helps in analyzing performance issues and crashes.
-
/ZI
: Generates debugging information and supports editing and continuing in Visual Studio. -
/WX
: Treats warnings as errors, which is often used to enforce strict coding standards. -
/Gm
: Enables minimal rebuild, allowing faster incremental builds. -
/MD
: Links with the dynamic version of the C runtime library, commonly used for Windows builds. -
/Yu"PreRTS.h"
: Tells the compiler to use precompiled headers, which can speed up compilation time.
- Release: Use this configuration when preparing the final version of the game for distribution. It ensures the game is optimized for performance with no debugging overhead.
- Debug: Use this configuration during development when you need to debug issues. It disables optimizations and includes debugging information.
- Internal: Use this configuration for internal builds where you need some debugging features but still require optimized performance.
- Profile: Use this configuration when analyzing the performance of the game. It helps identify bottlenecks and areas that can be optimized further.
- How to Get Involved
- How to Contribution
- Replays for testing
- Community forks
- License
- Credits
- Changelog
- FAQ
- Known Issues
- Contact & Community
-
Visual Studio 6 Guides:
-
Visual Studio 2022 Guides:
- DirectX
- STLport
- Max4SDK
- NVASM
- Benchmark
- MilesSoundSystem
- Bink
- SafeDisk
- Asimp3
- GameSpy
- ZLib
- LZHCompress