IN THIS ARTICLE
Waf User Options and Settings
Waf User Options and Settings
In Lumberyard, the Waf options for configure and build time operations in are determined primarily by the following files in the lumberyard_version\dev\_WAF_
subdirectory:
- default_settings.json – Declares most of the configurable settings that control how Lumberyard and its game projects are built, including the default values.
- Platform-specific settings – Settings and defaults declared in the
settings
sections of.json
files in thelumberyard_version\dev\_WAF_\settings\platforms
subdirectory, including the following:common.android.json
– Options for Android.platform.darwin_x64.json
– Options for macOS.platform.ios.json
– Options for iOS.common.win_msvc.json
– Windows options for Microsoft Visual Studio.platform.win_x64_vs2017.json
– Windows options for Microsoft Visual Studio 2017.platform.win_x64_vs2019.json
– Windows options for Microsoft Visual Studio 2019.
- user_settings.options – Use this file to override default values defined in the
default_settings.json
file and platform-specific settings files.
Topics
default_settings.json
The default_settings.json
file and the settings
sections of platform-specific .json
files use the following format to organize related settings into groups:
"Group Name":[
{
"long_form": "Command line form",
"short_form": "Optional short form of the command line option",
"attribute": "Waf option attribute",
"default_value": "Default value",
"description": "Brief description of the setting"
},...
],
...
Each option can have the following attributes:
- long_form – The long form of the command line argument that Waf accepts as a command-line override to the setting. This overrides both the default value and any override value in the
user_settings.options
file. The long form is usually preceded with a double hyphen (for example,--enable-my-option
). - short_form – (Optional) The short form of the command argument override option (for example,
-s
). - attribute – The name of the attribute for configure and builds. The attribute is set to the Options WAF module object. This form of the attribute name is used in the
user_settings.options
override file. - default_value – The default value if the setting is not overridden in the
user_settings.options
file or by the related command line argument. - description – A brief description of the option.
The following example shows the enabled_game_projects
attribute in the Game Projects
section of the default_settings.json
file.
...
"Game Projects": [
{
"long_form": "--enabled-game-projects",
"attribute": "enabled_game_projects",
"default_value": "StarterGame,CloudGemSamples",
"description": "Comma-separated list of game projects to enable for compiling"
}
],
...
user_settings.options
Use the user_settings.options
file to override the default values specified in default_settings.json
and platform-specific settings .json
files. This configuration file is in a standard .cfg
file format (not .json
) with section names in brackets, as in the following example:
[Game Projects]
;enabled_game_projects = StarterGame,CloudGemSamples
The groupings are defined in the default_settings.json
file and in the platform-specific settings .json
files. The user_settings.options
file uses the form of the attribute for each setting as it is defined in the corresponding .json
file.
Overriding Default Values
The default values are commented out with a semi-colon ‘;’ comment token at the beginning of each line in the user_settings.options
file. To override a value, remove the semicolon from the beginning of the line and set the attribute to the value that you want. For example, the option to use IncrediBuild is off (False
) by default. If you want to set it to True
, modify the corresponding section of the user_settings.options
file to resemble the following:
[Incredibuild Options]
use_incredibuild = True
;incredibuild_max_cores = 128
;auto_update_incredibuild_settings = False
;incredibuild_profile = Tools/build/waf-1.7.13/profile.xml
Overriding user_settings.options Changes
If you use the the user_settings.options
file to override a default value like use_incredibuild
, you can override the change temporarily by using the command line argument defined for the setting, as shown in the following example:
lmbr_waf build_win_x64_vs2017_profile -p all --use-incredibuild=False
Note
Using the lmbr_waf
command to override a value does not update the value in the user_settings.options
file.
Waf User Settings (user_settings.options)
Global Waf build system settings are specified in the user_settings.options
file located in the lumberyard_version\dev\_WAF_
subdirectory. If the user_settings.options
file does not exist, Lumberyard uses the default_settings.json
and platform-specific .json
files to create a new one automatically. Every build that runs refers to this file to get the option values specific to the build.
The settings listed can be modified in the file directly, or through the Lumberyard WAF settings dialog box. To invoke the settings dialog box, enter show_option_dialog
command into Waf as follows:
lmbr_waf show_option_dialog
The tables in the following sections describe the options available for override in the user_settings.options
file. To override any setting, you can use the Override Parameter for the attribute. For more information, see
Overriding user_settings.options Changes.
Topics
default_settings.json Options
The following tables describe the options defined in the default_settings.json
file.
Build Options
Attribute | Override Parameter | Description | Default |
---|---|---|---|
copy_3rd_party_pdbs | --copy-3rd-party-pdbs | Copies .pdb files from third party libraries for debugging. This option increases the memory usage of your Visual Studio development environment. | True |
crash_handler_token | --crash-handler-token | Token that you use to submit crash reports. | |
crash_handler_url | --crash-handler-url | Endpoint where you submit crash reports. | |
enable_dynamic_file_globbing | --enable-dynamic-file-globbing | Enables globbing of files during all build operations, globbing only once during configure. Excessive usage of file globbing negatively impacts build performance. | False |
enable_link_time_optimization | --enable-link-time-optimization | If true, link time optimizations and code generation are enabled in the performance and release configurations. | False |
enable_memory_tracking | --enable-memory-tracking | Enable the AZCORE_ENABLE_MEMORY_TRACKING define, which allows the Memory Driller to run and track all allocations. This option severely impacts code execution times. | False |
enable_msvc_timings | --enable-msvc-timings | Enable output timing information for msvc compile and link operations. | False |
enable_whole_program_optimization | --enable-whole-program-optimization | If set to True, whole program optimizations are enabled for performance and release builds. | False |
external_crash_reporting | --external-crash-reporting | Zip and upload symbols and build client with external crash reporting enabled. The value set is an additional build tag that is passed to the crash reporter system. | |
gems_optional | --gems-optional | Allows building of projects without gems.json files. | False |
generate_debug_info | --generate-debug-info | Option to generate debug symbols and .pdb files for the build. | True |
generate_map_file | --generate-map-file | Generate a map file during linking if the platform supports it. | False |
generate_sig_debug_output | --sig-delta -s | Generate debug output showing signature differences that caused a task to rerun. | False |
layout_binaries_only | --layout-binaries-only | Update only the binaries in a current layout. This supports programmer rapid iteration mode. | False |
layout_hard_linking | --layout-hard-linking | If true, layouts are hard links, not full copies of files. | True |
layout_include_pdbs | --layout-include-pdbs | When adding the binaries to the layout, include the .pdb files. | False |
max_parallel_link | --max-parallel-link | Controls the number of C++ linking operations that happen in parallel. | 2 |
packaged_build_time | --packaged-build-time | A float value indicating the time that the build was packaged. | |
product_sku | -product-sku | Enables a project wide define PRODUCT_SKU_value. The specified value alters where .pak files are built to and read from and determines which platform resources are used in the gem\resources\ directory. For example, for a demo version of the game, you could set product_sku = demo. After PRODUCT_SKU_demo is defined, you can disable systems based on its value. | default |
symbol_token | --symbol-token | Specify the token used for uploading symbols. | |
uber_file_size | --uber-file-size | Maximum content size of auto-generated uber files. | 307200 |
upload_symbol_list | --upload-symbol-list | Specify the list of symbol patterns to upload for crash reporting. | |
use_crcfix | --use-crcfix | Use the crcfix tool to precompute CRCs in AZ_CRC macros. | True |
use_debug_code_generator | --use_debug_code_generator | Uses the version of the code generator located in the \Bin64xxxx.Debug directory instead of the \Bin64xxxx directory. | False |
use_precompiled_header | --use-precompiled-header | Use a precompiled header for compilation where applicable. | True |
use_uber_files | --use-uber-files | Use uber files for compilation. | False |
version | --force-version | The version of the game project to embed in the game launchers. | 0.0.0.0 |
win_build_renderer | --win-build-renderer | Specifies the type of renderer for a monolithic build. Possible values are DX11 or DX12. | DX11 |
Deployment Options
Attribute | Override Parameter | Description | Default |
---|---|---|---|
deploy_projects_automatically | --deploy-projects-automatically | Automatically runs the deploy command after each build. | True |
Game Projects
Attribute | Override Parameter | Description | Default |
---|---|---|---|
enabled_game_projects | --enabled-game-projects | Comma-separated list of game projects to enable for compiling. By default, the possible values are: [See the AWS documentation website for more details] | CloudGemSamples, StarterGame |
IncrediBuild Options
Attribute | Override Parameter | Description | Default |
---|---|---|---|
auto_update_incredibuild_settings | --auto-update-incredibuild-settings | Automatically attempts to update the registry for IncrediBuild, if needed. These registry updates are required to configure IncrediBuild to work properly with the Waf build system. | False |
incredibuild_max_cores | --incredibuild-max-cores | Control the number of processes spawned by IncrediBuild. | 128 |
incredibuild_profile | --incredibuild-profile | The IncrediBuild configuration value to load for IncrediBuild builds. If left blank, this value is generated automatically. | |
use_incredibuild | -i --use-incredibuild | Use IncrediBuild if available. Windows PC builds require at a minimum the Make and Build tools package. Android builds additionally require the Dev Tools Acceleration package. | False |
Misc Options
Attribute | Override Parameter | Description | Default |
---|---|---|---|
bootstrap_third_party_override | --3rdpartypath | Optional parameter to pass the location of the \3rdParty directory as part of the bootstrap process. | |
bootstrap_tool_param | --bootstrap-tool-param | Value set by Lumberyard Setup Assistant to inform Waf which platforms should be enabled. This setting is automatically configured through Lumberyard Setup Assistant and should not be updated manually. | |
has_server_configs | --has-server-configs | Optional parameter to enable the _dedicated_server configurations. | True |
has_test_configs | --has-test-configs | Optional parameter to enable the _test configurations. | True |
max_cores | --max-cores | Number of parallel processes for local builds. To limit the number of cores used, set a specific value. A value less than or equal to 0 indicates that as many cores as needed will be used based on available hardware. | 0 |
Packaging Options
Attribute | Override Parameter | Description | Default |
---|---|---|---|
copy_assets | --always-copy-assets | An option specific to iOS and macOS. When running the packaging command, always copy any assets that are specified to the package, even for debug or profile builds. | False |
package_projects_automatically | --package-projects-automatically | Automatically run the packaging command after each build, where available. This option is supported on Android, iOS, and macOS. | True |
run_xcode_for_packaging | --runxcode-for-packaging | An option specific to iOS and macOS. When running the packaging command, run xcode_* from the command line to generate the app bundle resources for iOS and macOS platforms. | True |
Visual Studio Project Generator
Attribute | Override Parameter | Description | Default |
---|---|---|---|
default_project | --visual-studio-solution-default-project | The Visual Studio default project if not set in the solution user options (.suo ) file. | Editor |
msvs_version | --msvs-version | Version of the Visual Studio solution to generate when creating a new project with Project Configurator. | 15 |
specs_to_include_in_project_generation | --specs-to-include-in-project-generation | List of Waf spec files to include in the Visual Studio solution generation. | all, game, game_and_engine |
visual_studio_solution_folder | --visual-studio-solution-folder | Name of the directory in which the generated Visual Studio solution should be stored. | Solutions |
Output Folder Options
Output folder options determine build output paths and folder name extensions for specific types of builds and environments.
The output path attributes in the Output Folder table can have configuration-based extensions from the Output Folder Name Extensions table. The output path attributes are autogenerated by Waf from the enabled platforms. The default values are defined by the default_folder_name
attribute in each target’s lumberyard_version\dev\_WAF_\settings\platforms\platform.target.json\
file.
Output Folder
Attribute | Override Parameter | Description | Default |
---|---|---|---|
out_folder_android_armv8_clang | --output-folder-android-armv8-clang | The base output folder name for the android_armv8_clang platform. | BinAndroidArmv8Clang |
out_folder_ios | --output-folder-ios | Absolute or relative iOS target platform build output path. | BinIos |
output_folder_darwin_x64 | --output-darwin-x64 | Absolute or relative macOS (Darwin) target platform build output path. | BinMac64 |
out_folder_win_x64_vs2017 | --output-folder-win64-vs2017 | The base output folder name for the win_x64_vs2017 platform. | Bin64vc141 |
out_folder_win_x64_vs2019 | --output-folder-win64-vs2019 | The base output folder name for the win_x64_vs2019 platform. | Bin64vc142 |
The following name extensions are appended to the output folder based on the target platform builds. These configuration extension options are autogenerated by Waf. The default values are defined by the default_output_ext
attribute for each configuration in the lumberyard_version\dev\_WAF_\settings\build_configurations.json
file.
Output Folder Name Extensions
Attribute | Override Parameter | Description | Default |
---|---|---|---|
output_folder_ext_debug | --output-folder-ext-debug | The output folder name extension for debug builds. | Debug |
output_folder_ext_performance | --output-folder-ext-performance | The output folder name extension for performance builds. | Performance |
output_folder_ext_profile | --output-folder-ext-profile | The output folder name extension for profile builds. | |
output_folder_ext_release | --output-folder-ext-release | The output folder name extension for release builds. | Release |
Platform-Specific Options
Specific settings for Android, iOS, macOS, and Windows are defined in files located in the lumberyard_version\dev\_WAF_\settings\platforms\
directory as noted.
All Platforms
The following settings define whether or not a platform is enabled to build. The default value comes from the value of the enabled
key found in each platform-specific file in the lumberyard_version\dev\_WAF_\settings\platforms\
directory.
Enable Platform
Attribute | Override Parameter | Description | Default |
---|---|---|---|
enable_android_armv8_clang | --enable-android-armv8-clang | Enable the android_armv8_clang platform to build. | True |
enable_win_x64_vs2017 | --enable-win64-vs2017 | Enable the win_x64_vs2017 platform to build. | True |
enable_win_x64_vs2019 | --enable-win64-vs2019 | Enable the win_x64_vs2019 platform to build. | True |
Android
This section has been relocated to another part of the Lumberyard documentation, and is now part of the Reference for Android. See Waf settings.
iOS
The following settings for iOS are defined in the lumberyard_version\dev\_WAF_\settings\platforms\platform.ios.json
file.
iOS Options
Attribute | Override Parameter | Description | Default |
---|---|---|---|
ios_paks | --ios-paks | Forces .pak files to be built in non-release builds. | False |
iOS Project Generator
Attribute | Override Parameter | Description | Default |
---|---|---|---|
generate_ios_projects_automatically | --generate-ios-projects-automatically | Automatically generate an Xcode project for iOS. | True |
ios_project_name | --ios-project-name | Name of the generated iOS project. | LumberyardiOSSDK |
ios_project_folder | --ios-project-folder | Name of the directory in which the generated iOS projects should be stored. | Solutions |
macOS
The following settings for macOS are defined in the lumberyard_version\dev\_WAF_\settings\platforms\platfrom.darwin_x64.json
file.
Mac Options
Attribute | Override Parameter | Description | Default |
---|---|---|---|
mac_build_monolithic | --mac-build-monolithic | Boolean flag to generate a monolithic or a non-monolithic build for macOS. | False |
darwin_paks | --darwin-paks | Forces .pak files to be built in non-release builds. | False |
Mac Project Generator
Attribute | Override Parameter | Description | Default |
---|---|---|---|
generate_mac_projects_automatically | --generate-mac-projects-automatically | Automatically generate Xcode projects for macOS. | True |
mac_project_name | --mac-project-name | Name of the generated project. | LumberyardSDK |
mac_project_folder | --mac-project-folder | Name of the directory in which the generated macOS projects should be stored. | Solutions |
Windows
The following settings for Visual Studio are defined in the lumberyard_version\dev\_WAF_\settings\platforms\common.win_msvc.json
file.
Visual Studio Options
Attribute | Override Parameter | Description | Default |
---|---|---|---|
generate_vs_solution_automatically | --generate-vs-solution-automatically | Automatically generate Visual Studio solutions during every configure. | True |
The following settings for Visual Studio 2017 are defined in the lumberyard_version\dev\_WAF_\settings\platforms\platform.win_x64_vs2017.json
file.
Visual Studio 2017 Options
Attribute | Override Parameter | Description | Default |
---|---|---|---|
generate_vs2017_projects_automatically | --generate-vs2017-projects-automatically | Automatically generate Visual Studio 2017 projects and solutions during every configure if the Windows VS2017 platform is enabled. | True |
vs2017_solution_name | --vs2017-solution-name | The name of the generated Visual Studio 2017 solution. | LumberyardSDK_vs2017 |
win_vs2017_vcvarsall_args | --win-vs2017-vcvarsall-args | Additional arguments to pass to the vcvarsall.bat file. | |
win_vs2017_vswhere_args | --win-vs2017-vswhere-args | The arguments to pass to vswhere when locating Visual Studio 2017 executables. The default maximum is up to but not including the next major version of Visual Studio. The default minimum is the last known ABI incompatibility for Lumberyard builds. | -version [15.9.28307.770,16.0) |
win_vs2017_winkit | --win-vs2017-winkit | The windows kit that Visual Studio 2017 builds Windows targets against. |
The following settings for Visual Studio 2019 are defined in the lumberyard_version\dev\_WAF_\settings\platforms\platform.win_x64_vs2019.json
file.
Visual Studio 2019 Options
Attribute | Override Parameter | Description | Default |
---|---|---|---|
generate_vs2019_projects_automatically | --generate-vs2019-projects-automatically | Automatically generate Visual Studio 2019 projects and solutions during every configure if the Windows VS2019 platform is enabled. | True |
vs2019_solution_name | --vs2019-solution-name | The name of the generated Visual Studio 2019 solution. | LumberyardSDK_vs2019 |
win_vs2019_vcvarsall_args | --win-vs2019-vcvarsall-args | Additional arguments to pass to the vcvarsall.bat file. | |
win_vs2019_vswhere_args | --win-vs2019-vswhere-args | The arguments to pass to vswhere when locating Visual Studio 2019 executables. The default maximum is up to but not including the next major version of Visual Studio. The default minimum is the last known ABI incompatibility for Lumberyard builds. | -version [16.2.29230.47,17.0) |
win_vs2019_winkit | --win-vs2019-winkit | The windows kit that Visual Studio 2019 builds Windows targets against. |