Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 65 additions & 55 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,60 @@
# Build Instructions
# Build Instructions <!-- omit from toc -->

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)
- [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 <!-- omit from toc -->

- [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
Expand Down Expand Up @@ -84,6 +83,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
Expand Down Expand Up @@ -225,6 +230,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
Expand Down
7 changes: 0 additions & 7 deletions scripts/generate_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading