summaryrefslogtreecommitdiff
path: root/chromium/third_party/SPIRV-Tools/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/SPIRV-Tools/src/utils')
-rwxr-xr-xchromium/third_party/SPIRV-Tools/src/utils/check_symbol_exports.py6
-rwxr-xr-xchromium/third_party/SPIRV-Tools/src/utils/roll_deps.sh31
2 files changed, 26 insertions, 11 deletions
diff --git a/chromium/third_party/SPIRV-Tools/src/utils/check_symbol_exports.py b/chromium/third_party/SPIRV-Tools/src/utils/check_symbol_exports.py
index e14c2eb8964..bcd77da6876 100755
--- a/chromium/third_party/SPIRV-Tools/src/utils/check_symbol_exports.py
+++ b/chromium/third_party/SPIRV-Tools/src/utils/check_symbol_exports.py
@@ -55,11 +55,11 @@ def check_library(library):
# _Z[0-9]+spv[A-Z_] : C++ symbol starting with spv[A-Z_]
symbol_ok_pattern = re.compile(r'^(spv[A-Z]|_ZN|_Z[0-9]+spv[A-Z_])')
- # In addition, the following pattern whitelists global functions that are added
+ # In addition, the following pattern allowlists global functions that are added
# by the protobuf compiler:
# - AddDescriptors_spvtoolsfuzz_2eproto()
# - InitDefaults_spvtoolsfuzz_2eproto()
- symbol_whitelist_pattern = re.compile(r'_Z[0-9]+(InitDefaults|AddDescriptors)_spvtoolsfuzz_2eprotov')
+ symbol_allowlist_pattern = re.compile(r'_Z[0-9]+(InitDefaults|AddDescriptors)_spvtoolsfuzz_2eprotov')
seen = set()
result = 0
@@ -70,7 +70,7 @@ def check_library(library):
if symbol not in seen:
seen.add(symbol)
#print("look at '{}'".format(symbol))
- if not (symbol_whitelist_pattern.match(symbol) or symbol_ok_pattern.match(symbol)):
+ if not (symbol_allowlist_pattern.match(symbol) or symbol_ok_pattern.match(symbol)):
print('{}: error: Unescaped exported symbol: {}'.format(PROG, symbol))
result = 1
return result
diff --git a/chromium/third_party/SPIRV-Tools/src/utils/roll_deps.sh b/chromium/third_party/SPIRV-Tools/src/utils/roll_deps.sh
index 622afc9ed89..d5c547fe073 100755
--- a/chromium/third_party/SPIRV-Tools/src/utils/roll_deps.sh
+++ b/chromium/third_party/SPIRV-Tools/src/utils/roll_deps.sh
@@ -13,19 +13,34 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Attempts to roll all entries in DEPS to origin/master and creates a
-# commit.
+# Attempts to roll all entries in DEPS to tip-of-tree and create a commit.
#
# Depends on roll-dep from depot_path being in PATH.
+effcee_dir="third_party/effcee/"
+effcee_trunk="origin/main"
+googletest_dir="third_party/googletest/"
+googletest_trunk="origin/master"
+re2_dir="third_party/re2/"
+re2_trunk="origin/master"
+spirv_headers_dir="third_party/spirv-headers/"
+spirv_headers_trunk="origin/master"
+
# This script assumes it's parent directory is the repo root.
repo_path=$(dirname "$0")/..
-effcee_dir="external/effcee/"
-googletest_dir="external/googletest/"
-re2_dir="external/re2/"
-spirv_headers_dir="external/spirv-headers/"
-
cd "$repo_path"
-roll-dep "$@" "${effcee_dir}" "${googletest_dir}" "${re2_dir}" "${spirv_headers_dir}"
+if [[ $(git diff --stat) != '' ]]; then
+ echo "Working tree is dirty, commit changes before attempting to roll DEPS"
+ exit 1
+fi
+
+old_head=$(git rev-parse HEAD)
+
+roll-dep --ignore-dirty-tree --roll-to="${effcee_trunk}" "${effcee_dir}"
+roll-dep --ignore-dirty-tree --roll-to="${googletest_trunk}" "${googletest_dir}"
+roll-dep --ignore-dirty-tree --roll-to="${re2_trunk}" "${re2_dir}"
+roll-dep --ignore-dirty-tree --roll-to="${spirv_headers_trunk}" "${spirv_headers_dir}"
+
+git rebase --interactive "${old_head}"