From 626e2a6c6236d2fd7582928a0363d381c55eb43d Mon Sep 17 00:00:00 2001 From: Frederic Cambus Date: Fri, 24 Sep 2021 19:04:16 +0530 Subject: [PATCH] [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 --- compiler-rt/lib/asan/scripts/asan_device_setup | 2 +- compiler-rt/lib/gwp_asan/scripts/symbolize.sh | 2 +- compiler-rt/lib/sanitizer_common/symbolizer/scripts/ar_to_bc.sh | 2 +- .../lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh | 2 +- compiler-rt/lib/tsan/analyze_libtsan.sh | 2 +- compiler-rt/lib/tsan/check_analyze.sh | 2 +- compiler-rt/lib/tsan/check_cmake.sh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/compiler-rt/lib/asan/scripts/asan_device_setup b/compiler-rt/lib/asan/scripts/asan_device_setup index 95f9d35f51ee..494867917fdb 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 6974ee816701..0027fa00f0f8 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 5c77bea83294..fa05d61a7c6d 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 9359af051325..d1d61fb7ab2a 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 ae29f1b5b05a..367ccca89472 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 9a245c0c89ab..3bd817c13697 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 7668c5b49e1a..15faa5a904e7 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