[compiler-rt] 626e2a6 - [compiler-rt] Use portable "#!/usr/bin/env bash" shebang for tests.
Shivam Gupta via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 24 06:40:56 PDT 2021
Author: Frederic Cambus
Date: 2021-09-24T19:10:07+05:30
New Revision: 626e2a6c6236d2fd7582928a0363d381c55eb43d
URL: https://github.com/llvm/llvm-project/commit/626e2a6c6236d2fd7582928a0363d381c55eb43d
DIFF: https://github.com/llvm/llvm-project/commit/626e2a6c6236d2fd7582928a0363d381c55eb43d.diff
LOG: [compiler-rt] Use portable "#!/usr/bin/env bash" shebang for tests.
In build_symbolizer.sh we can safely remove the -eu argument from the shebang (which is an unportable construct), as the scripts sets **-e** and **-u** already.
Differential Revision: https://reviews.llvm.org/D110039
Added:
Modified:
compiler-rt/lib/asan/scripts/asan_device_setup
compiler-rt/lib/gwp_asan/scripts/symbolize.sh
compiler-rt/lib/sanitizer_common/symbolizer/scripts/ar_to_bc.sh
compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
compiler-rt/lib/tsan/analyze_libtsan.sh
compiler-rt/lib/tsan/check_analyze.sh
compiler-rt/lib/tsan/check_cmake.sh
Removed:
################################################################################
diff --git a/compiler-rt/lib/asan/scripts/asan_device_setup b/compiler-rt/lib/asan/scripts/asan_device_setup
index 95f9d35f51ee6..494867917fdb1 100755
--- a/compiler-rt/lib/asan/scripts/asan_device_setup
+++ b/compiler-rt/lib/asan/scripts/asan_device_setup
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#===- lib/asan/scripts/asan_device_setup -----------------------------------===#
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
diff --git a/compiler-rt/lib/gwp_asan/scripts/symbolize.sh b/compiler-rt/lib/gwp_asan/scripts/symbolize.sh
index 6974ee816701b..0027fa00f0f89 100755
--- a/compiler-rt/lib/gwp_asan/scripts/symbolize.sh
+++ b/compiler-rt/lib/gwp_asan/scripts/symbolize.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# The lines that we're looking to symbolize look like this:
#0 ./a.out(_foo+0x3e6) [0x55a52e64c696]
diff --git a/compiler-rt/lib/sanitizer_common/symbolizer/scripts/ar_to_bc.sh b/compiler-rt/lib/sanitizer_common/symbolizer/scripts/ar_to_bc.sh
index 5c77bea832949..fa05d61a7c6d9 100755
--- a/compiler-rt/lib/sanitizer_common/symbolizer/scripts/ar_to_bc.sh
+++ b/compiler-rt/lib/sanitizer_common/symbolizer/scripts/ar_to_bc.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
function usage() {
echo "Usage: $0 INPUT... OUTPUT"
diff --git a/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh b/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
index 9359af051325a..d1d61fb7ab2ac 100755
--- a/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
+++ b/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -eu
+#!/usr/bin/env bash
#
# Run as: CLANG=bin/clang ZLIB_SRC=src/zlib \
# build_symbolizer.sh runtime_build/lib/clang/4.0.0/lib/linux/
diff --git a/compiler-rt/lib/tsan/analyze_libtsan.sh b/compiler-rt/lib/tsan/analyze_libtsan.sh
index ae29f1b5b05a1..367ccca894725 100755
--- a/compiler-rt/lib/tsan/analyze_libtsan.sh
+++ b/compiler-rt/lib/tsan/analyze_libtsan.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Script that prints information about generated code in TSan runtime.
diff --git a/compiler-rt/lib/tsan/check_analyze.sh b/compiler-rt/lib/tsan/check_analyze.sh
index 9a245c0c89abb..3bd817c136971 100755
--- a/compiler-rt/lib/tsan/check_analyze.sh
+++ b/compiler-rt/lib/tsan/check_analyze.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Script that checks that critical functions in TSan runtime have correct number
# of push/pop/rsp instructions to verify that runtime is efficient enough.
diff --git a/compiler-rt/lib/tsan/check_cmake.sh b/compiler-rt/lib/tsan/check_cmake.sh
index 7668c5b49e1a7..15faa5a904e7f 100755
--- a/compiler-rt/lib/tsan/check_cmake.sh
+++ b/compiler-rt/lib/tsan/check_cmake.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -u
set -e
More information about the llvm-commits
mailing list