Skip to content

Commit 3b334b2

Browse files
authored
Merge pull request KhronosGroup#2429 from ben-clayton/test-gn-presubmit
Fix GN build and presubmits
2 parents ea52b3c + 0f52e7e commit 3b334b2

File tree

7 files changed

+88
-3
lines changed

7 files changed

+88
-3
lines changed

.gitignore

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
*.a
33
*.so
44
*.exe
5-
*.gclient_entries
65
.vscode/
76
tags
87
TAGS
@@ -12,4 +11,10 @@ Test/localResults/
1211
External/googletest
1312
External/spirv-tools
1413
out/
15-
third_party/llvm-build
14+
15+
# GN generated files
16+
.cipd/
17+
*.gclient_entries
18+
third_party/
19+
buildtools/
20+
tools/

DEPS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,8 @@ hooks = [
7575
'condition': 'not build_with_chromium',
7676
},
7777
]
78+
79+
recursedeps = [
80+
# buildtools provides clang_format, libc++, and libc++abi
81+
'buildtools',
82+
]

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ This only needs to be done once after updating `glslang`.
200200
With the current directory set to your `glslang` checkout, type:
201201

202202
```bash
203+
./update_glslang_sources.py
203204
gclient sync --gclientfile=standalone.gclient
204205
gn gen out/Default
205206
```

kokoro/linux-clang-gn/build-docker.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
set -e # Fail on any error.
3737
set -x # Display commands being run.
3838

39+
echo "Fetching external projects..."
40+
./update_glslang_sources.py
41+
3942
echo "Fetching depot_tools..."
4043
mkdir -p /tmp/depot_tools
4144
curl https://storage.googleapis.com/chrome-infra/depot_tools.zip -o /tmp/depot_tools.zip

kokoro/linux-clang-gn/build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ docker run --rm -i \
4343
--workdir "${ROOT_DIR}" \
4444
--env ROOT_DIR="${ROOT_DIR}" \
4545
--env SCRIPT_DIR="${SCRIPT_DIR}" \
46-
--env BUILD_SHARED_LIBS="${BUILD_SHARED_LIBS:-0}" \
4746
--entrypoint "${SCRIPT_DIR}/build-docker.sh" \
4847
"gcr.io/shaderc-build/radial-build:latest"
48+
49+
sudo chown -R "$(id -u):$(id -g)" "${ROOT_DIR}"

kokoro/linux-clang-gn/continuous.cfg

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Copyright (C) 2020 Google, Inc.
2+
#
3+
# All rights reserved.
4+
#
5+
# Redistribution and use in source and binary forms, with or without
6+
# modification, are permitted provided that the following conditions
7+
# are met:
8+
#
9+
# Redistributions of source code must retain the above copyright
10+
# notice, this list of conditions and the following disclaimer.
11+
#
12+
# Redistributions in binary form must reproduce the above
13+
# copyright notice, this list of conditions and the following
14+
# disclaimer in the documentation and/or other materials provided
15+
# with the distribution.
16+
#
17+
# Neither the name of Google Inc. nor the names of its
18+
# contributors may be used to endorse or promote products derived
19+
# from this software without specific prior written permission.
20+
#
21+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22+
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23+
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24+
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25+
# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26+
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27+
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28+
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30+
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31+
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32+
# POSSIBILITY OF SUCH DAMAGE.
33+
34+
# Continuous build configuration.
35+
build_file: "glslang/kokoro/linux-clang-gn/build.sh"

kokoro/linux-clang-gn/presubmit.cfg

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Copyright (C) 2020 Google, Inc.
2+
#
3+
# All rights reserved.
4+
#
5+
# Redistribution and use in source and binary forms, with or without
6+
# modification, are permitted provided that the following conditions
7+
# are met:
8+
#
9+
# Redistributions of source code must retain the above copyright
10+
# notice, this list of conditions and the following disclaimer.
11+
#
12+
# Redistributions in binary form must reproduce the above
13+
# copyright notice, this list of conditions and the following
14+
# disclaimer in the documentation and/or other materials provided
15+
# with the distribution.
16+
#
17+
# Neither the name of Google Inc. nor the names of its
18+
# contributors may be used to endorse or promote products derived
19+
# from this software without specific prior written permission.
20+
#
21+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22+
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23+
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24+
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25+
# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26+
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27+
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28+
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30+
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31+
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32+
# POSSIBILITY OF SUCH DAMAGE.
33+
34+
# Presubmit build configuration.
35+
build_file: "glslang/kokoro/linux-clang-gn/build.sh"

0 commit comments

Comments
 (0)