From c09664b56d8dad4ee8b3e4c7fde2304127e9642f Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Wed, 14 May 2025 11:41:53 -0500 Subject: [PATCH 1/3] Remove workaround for removed CI runner --- scripts/generate_source.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/scripts/generate_source.py b/scripts/generate_source.py index 4afcdf9e1..9efac9ed3 100755 --- a/scripts/generate_source.py +++ b/scripts/generate_source.py @@ -201,13 +201,6 @@ def main(argv): # Need pass style file incase running with --verify and it can't find the file automatically in the temp directory style_file = os.path.join(repo_dir, '.clang-format') - if common_codegen.IsGHA() and args.verify: - # Have found that sometimes (~5%) the 20.04 Ubuntu machines have clang-format v11 but we need v14 to - # use a dedicated style_file location. For these case there we can survive just skipping the verify check - stdout = subprocess.check_output(['clang-format', '--version']).decode("utf-8") - version = stdout[stdout.index('version') + 8:][:2] - if int(version) < 14: - return 0 # Success # get directory where generators will run if args.verify or args.incremental: From dda70d50985d87c9d705a5e1a9641ce969fb62a9 Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Wed, 14 May 2025 11:50:45 -0500 Subject: [PATCH 2/3] Add clang-format to build requirements --- BUILD.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/BUILD.md b/BUILD.md index cf2349134..3c74f13f8 100644 --- a/BUILD.md +++ b/BUILD.md @@ -10,6 +10,7 @@ Instructions for building this repository on Linux, Windows, and MacOS. - [Repository Content](#repository-content) - [Installed Files](#installed-files) - [Build Requirements](#build-requirements) + - [Building with Code Generation Requirements](#building-with-code-generation-requirements) - [Test Requirements](#test-requirements) - [Repository Set-Up](#repository-set-up) - [Display Drivers](#display-drivers) @@ -84,6 +85,12 @@ indicated by *install_dir*: 2. `CMake` version 3.22.1 or greater 3. `Git` +### Building with Code Generation Requirements + +1. `Python 3.11` +2. `clang-format` version 14 or higher + * Only required when submitting changes + ### Test Requirements 1. `C++17` capable compiler @@ -225,6 +232,11 @@ cmake -S . -B build -D LOADER_CODEGEN=ON cmake --build . --target loader_codegen ``` +`clang-format` is run on generated code files so that the generator scripts do +not need format their output manually. +If `clang-format` is not available when running code generation, a warning will +be issued but does not stop code generation from occuring. + ### Build Options When generating build files through CMake, several options can be specified to From c5e933a1789b7203e76ea2615cc3333e076e0e9d Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Wed, 14 May 2025 11:51:31 -0500 Subject: [PATCH 3/3] Cleanup BUILD.md table of contents --- BUILD.md | 110 +++++++++++++++++++++++++++---------------------------- 1 file changed, 54 insertions(+), 56 deletions(-) diff --git a/BUILD.md b/BUILD.md index 3c74f13f8..8c37b70ba 100644 --- a/BUILD.md +++ b/BUILD.md @@ -1,62 +1,60 @@ -# Build Instructions +# Build Instructions Instructions for building this repository on Linux, Windows, and MacOS. -## Table Of Contents - -- [Build Instructions](#build-instructions) - - [Table Of Contents](#table-of-contents) - - [Contributing to the Repository](#contributing-to-the-repository) - - [Repository Content](#repository-content) - - [Installed Files](#installed-files) - - [Build Requirements](#build-requirements) - - [Building with Code Generation Requirements](#building-with-code-generation-requirements) - - [Test Requirements](#test-requirements) - - [Repository Set-Up](#repository-set-up) - - [Display Drivers](#display-drivers) - - [Repository Dependencies](#repository-dependencies) - - [Vulkan-Headers](#vulkan-headers) - - [Test Dependencies](#test-dependencies) - - [Warnings as errors off by default!](#warnings-as-errors-off-by-default) - - [Build and Install Directory Locations](#build-and-install-directory-locations) - - [Building Dependent Repositories with Known-Good Revisions](#building-dependent-repositories-with-known-good-revisions) - - [Automatically](#automatically) - - [Manually](#manually) - - [Notes About the Manual Option](#notes-about-the-manual-option) - - [Generated source code](#generated-source-code) - - [Build Options](#build-options) - - [Building On Windows](#building-on-windows) - - [Windows Development Environment Requirements](#windows-development-environment-requirements) - - [Windows Build - Microsoft Visual Studio](#windows-build---microsoft-visual-studio) - - [Windows Quick Start](#windows-quick-start) - - [Use `CMake` to Create the Visual Studio Project Files](#use-cmake-to-create-the-visual-studio-project-files) - - [Build the Solution From the Command Line](#build-the-solution-from-the-command-line) - - [Build the Solution With Visual Studio](#build-the-solution-with-visual-studio) - - [Windows Install Target](#windows-install-target) - - [Building On Linux](#building-on-linux) - - [Linux Development Environment Requirements](#linux-development-environment-requirements) - - [Required Package List](#required-package-list) - - [Linux Build](#linux-build) - - [Linux Quick Start](#linux-quick-start) - - [Use CMake to Create the Make Files](#use-cmake-to-create-the-make-files) - - [Build the Project](#build-the-project) - - [Linux Notes](#linux-notes) - - [WSI Support Build Options](#wsi-support-build-options) - - [Linux Install to System Directories](#linux-install-to-system-directories) - - [Linux 32-bit support](#linux-32-bit-support) - - [Building on MacOS](#building-on-macos) - - [MacOS Development Environment Requirements](#macos-development-environment-requirements) - - [Clone the Repository](#clone-the-repository) - - [MacOS build](#macos-build) - - [Building with the Unix Makefiles Generator](#building-with-the-unix-makefiles-generator) - - [Building with the Xcode Generator](#building-with-the-xcode-generator) - - [Building on Fuchsia](#building-on-fuchsia) - - [SDK Symbols](#sdk-symbols) - - [Building on QNX](#building-on-qnx) - - [Cross Compilation](#cross-compilation) - - [Unknown function handling which requires explicit assembly implementations](#unknown-function-handling-which-requires-explicit-assembly-implementations) - - [Platforms which fully support unknown function handling](#platforms-which-fully-support-unknown-function-handling) - - [Tests](#tests) +## Table Of Contents + +- [Contributing to the Repository](#contributing-to-the-repository) +- [Repository Content](#repository-content) + - [Installed Files](#installed-files) +- [Build Requirements](#build-requirements) + - [Building with Code Generation Requirements](#building-with-code-generation-requirements) + - [Test Requirements](#test-requirements) +- [Repository Set-Up](#repository-set-up) + - [Display Drivers](#display-drivers) + - [Repository Dependencies](#repository-dependencies) + - [Vulkan-Headers](#vulkan-headers) + - [Test Dependencies](#test-dependencies) + - [Warnings as errors off by default!](#warnings-as-errors-off-by-default) + - [Build and Install Directory Locations](#build-and-install-directory-locations) + - [Building Dependent Repositories with Known-Good Revisions](#building-dependent-repositories-with-known-good-revisions) + - [Automatically](#automatically) + - [Manually](#manually) + - [Notes About the Manual Option](#notes-about-the-manual-option) + - [Generated source code](#generated-source-code) + - [Build Options](#build-options) +- [Building On Windows](#building-on-windows) + - [Windows Development Environment Requirements](#windows-development-environment-requirements) + - [Windows Build - Microsoft Visual Studio](#windows-build---microsoft-visual-studio) + - [Windows Quick Start](#windows-quick-start) + - [Use `CMake` to Create the Visual Studio Project Files](#use-cmake-to-create-the-visual-studio-project-files) + - [Build the Solution From the Command Line](#build-the-solution-from-the-command-line) + - [Build the Solution With Visual Studio](#build-the-solution-with-visual-studio) + - [Windows Install Target](#windows-install-target) +- [Building On Linux](#building-on-linux) + - [Linux Development Environment Requirements](#linux-development-environment-requirements) + - [Required Package List](#required-package-list) + - [Linux Build](#linux-build) + - [Linux Quick Start](#linux-quick-start) + - [Use CMake to Create the Make Files](#use-cmake-to-create-the-make-files) + - [Build the Project](#build-the-project) + - [Linux Notes](#linux-notes) + - [WSI Support Build Options](#wsi-support-build-options) + - [Linux Install to System Directories](#linux-install-to-system-directories) + - [Linux 32-bit support](#linux-32-bit-support) +- [Building on MacOS](#building-on-macos) + - [MacOS Development Environment Requirements](#macos-development-environment-requirements) + - [Clone the Repository](#clone-the-repository) + - [MacOS build](#macos-build) + - [Building with the Unix Makefiles Generator](#building-with-the-unix-makefiles-generator) + - [Building with the Xcode Generator](#building-with-the-xcode-generator) +- [Building on Fuchsia](#building-on-fuchsia) + - [SDK Symbols](#sdk-symbols) +- [Building on QNX](#building-on-qnx) +- [Cross Compilation](#cross-compilation) + - [Unknown function handling which requires explicit assembly implementations](#unknown-function-handling-which-requires-explicit-assembly-implementations) + - [Platforms which fully support unknown function handling](#platforms-which-fully-support-unknown-function-handling) +- [Tests](#tests) ## Contributing to the Repository