Skip to content

Commit 5ec7c09

Browse files
committed
repo: Add known-good support
Change-Id: I2ae79d5f0cdcd565b8728e0f960e0b1266f10df0
1 parent 160b8f3 commit 5ec7c09

File tree

3 files changed

+727
-0
lines changed

3 files changed

+727
-0
lines changed

BUILD.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,54 @@ child of the build directory with the name `install`. The remainder of these
152152
instructions follow this convention, although you can use any name for these
153153
directories and place them in any location.
154154

155+
### Building Dependent Repositories with Known-Good Revisions
156+
157+
There is a Python utility script, `scripts/update_deps.py`, that you can use
158+
to gather and build the dependent repositories mentioned above. This program
159+
also uses information stored in the `scripts/known-good.json` file to checkout
160+
dependent repository revisions that are known to be compatible with the
161+
revision of this repository that you currently have checked out.
162+
163+
Here is a usage example for this repository:
164+
165+
git clone [email protected]:KhronosGroup/VulkanTools.git
166+
cd VulkanTools
167+
mkdir build
168+
cd build
169+
../scripts/update_deps.py
170+
cmake -C helper.cmake ..
171+
cmake --build .
172+
173+
174+
#### Notes
175+
176+
- You may need to adjust some of the CMake options based on your platform. See
177+
the platform-specific sections later in this document.
178+
- The `update_deps.py` script fetches and builds the dependent repositories in
179+
the current directory when it is invoked. In this case, they are built in
180+
the `build` directory.
181+
- The `build` directory is also being used to build this
182+
(Vulkan-Tools) repository. But there shouldn't be any conflicts
183+
inside the `build` directory between the dependent repositories and the
184+
build files for this repository.
185+
- The `--dir` option for `update_deps.py` can be used to relocate the
186+
dependent repositories to another arbitrary directory using an absolute or
187+
relative path.
188+
- The `update_deps.py` script generates a file named `helper.cmake` and places
189+
it in the same directory as the dependent repositories (`build` in this
190+
case). This file contains CMake commands to set the CMake `*_INSTALL_DIR`
191+
variables that are used to point to the install artifacts of the dependent
192+
repositories. You can use this file with the `cmake -C` option to set these
193+
variables when you generate your build files with CMake. This lets you avoid
194+
entering several `*_INSTALL_DIR` variable settings on the CMake command line.
195+
- If using "MINGW" (Git For Windows), you may wish to run
196+
`winpty update_deps.py` in order to avoid buffering all of the script's
197+
"print" output until the end and to retain the ability to interrupt script
198+
execution.
199+
- Please use `update_deps.py --help` to list additional options and read the
200+
internal documentation in `update_deps.py` for further information.
201+
202+
155203

156204
## Linux Build
157205

scripts/known_good.json

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{
2+
"repos" : [
3+
{
4+
"name" : "glslang",
5+
"url" : "https://github.com/KhronosGroup/glslang.git",
6+
"sub_dir" : "glslang",
7+
"build_dir" : "glslang/build",
8+
"install_dir" : "glslang/build/install",
9+
"commit" : "1323bf8e39fa17da3e0901a4b1ab5dfd61ee5460",
10+
"prebuild" : [
11+
"python update_glslang_sources.py"
12+
]
13+
},
14+
{
15+
"name" : "Vulkan-Headers",
16+
"url" : "https://github.com/KhronosGroup/Vulkan-Headers.git",
17+
"sub_dir" : "Vulkan-Headers",
18+
"build_dir" : "Vulkan-Headers/build",
19+
"install_dir" : "Vulkan-Headers/build/install",
20+
"commit" : "db09f95ac00e44149f3894bf82c918e58277cfdb"
21+
},
22+
{
23+
"name" : "Vulkan-Loader",
24+
"url" : "https://github.com/KhronosGroup/Vulkan-Loader.git",
25+
"sub_dir" : "Vulkan-Loader",
26+
"build_dir" : "Vulkan-Loader/build",
27+
"install_dir" : "Vulkan-Loader/build/install",
28+
"commit" : "4573f327dd9a5e4114d5c56682892290affa46e5",
29+
"deps" : [
30+
{
31+
"var_name" : "VULKAN_HEADERS_INSTALL_DIR",
32+
"repo_name" : "Vulkan-Headers"
33+
}
34+
],
35+
"cmake_options" : [
36+
"-DBUILD_TESTS=NO"
37+
]
38+
},
39+
{
40+
"name" : "Vulkan-Tools",
41+
"url" : "https://github.com/KhronosGroup/Vulkan-Tools.git",
42+
"sub_dir" : "Vulkan-Tools",
43+
"build_dir" : "Vulkan-Tools/build",
44+
"install_dir" : "Vulkan-Tools/build/install",
45+
"commit" : "ca05ec7c9706eb2949e489b4719fe499b0059d36",
46+
"deps" : [
47+
{
48+
"var_name" : "VULKAN_HEADERS_INSTALL_DIR",
49+
"repo_name" : "Vulkan-Headers"
50+
},
51+
{
52+
"var_name" : "VULKAN_LOADER_INSTALL_DIR",
53+
"repo_name" : "Vulkan-Loader"
54+
}
55+
]
56+
},
57+
{
58+
"name" : "Vulkan-ValidationLayers",
59+
"url" : "https://github.com/KhronosGroup/Vulkan-ValidationLayers.git",
60+
"sub_dir" : "Vulkan-ValidationLayers",
61+
"build_dir" : "Vulkan-ValidationLayers/build",
62+
"install_dir" : "Vulkan-ValidationLayers/build/install",
63+
"commit" : "0506d320de7ffa3492c733b5d3b776daee9f5f4a",
64+
"deps" : [
65+
{
66+
"var_name" : "GLSLANG_INSTALL_DIR",
67+
"repo_name" : "glslang"
68+
},
69+
{
70+
"var_name" : "VULKAN_HEADERS_INSTALL_DIR",
71+
"repo_name" : "Vulkan-Headers"
72+
},
73+
{
74+
"var_name" : "VULKAN_LOADER_INSTALL_DIR",
75+
"repo_name" : "Vulkan-Loader"
76+
},
77+
{
78+
"var_name" : "VULKAN_TOOLS_INSTALL_DIR",
79+
"repo_name" : "Vulkan-Tools"
80+
}
81+
],
82+
"cmake_options" : [
83+
"-DBUILD_TESTS=NO"
84+
]
85+
}
86+
],
87+
"install_names" : {
88+
"glslang" : "GLSLANG_INSTALL_DIR",
89+
"Vulkan-Headers" : "VULKAN_HEADERS_INSTALL_DIR",
90+
"Vulkan-Loader" : "VULKAN_LOADER_INSTALL_DIR",
91+
"Vulkan-Tools" : "VULKAN_TOOLS_INSTALL_DIR",
92+
"Vulkan-ValidationLayers" : "VULKAN_VALIDATIONLAYERS_INSTALL_DIR"
93+
}
94+
}

0 commit comments

Comments
 (0)