Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

Allow users to use a non-system version of perl, python and awk, which is useful
in certain package managers.

Reviewed By: JDevlieghere, MaskRay

Differential Revision: https://reviews.llvm.org/D95119
This commit is contained in:
Harmen Stoppels 2021-02-25 11:31:42 +01:00 committed by Raphael Isemann
parent 87dbcd8865
commit a54f160b3a
18 changed files with 28 additions and 20 deletions

View File

@ -1,9 +1,10 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
#
# Simple little Perl script that takes the cxx-sections.data file as
# input and generates a directory structure that mimics the standard's
# structure.
use English;
use warnings;
$current_indent_level = -4;
while ($line = <STDIN>) {

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# [PR 11661] Note that we hardwire to /usr/bin/python because we
# want to the use the system version of Python on Mac OS X.

View File

@ -1,10 +1,11 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
# This tiny little script, which should be run from the clang
# directory (with clang in your patch), tries to take each
# compilable Clang test and build a PCH file from that test, then read
# and dump the contents of the PCH file just created.
use POSIX;
use warnings;
$exitcode = 0;
sub testfiles($$) {

View File

@ -1,5 +1,6 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
use strict;
use warnings;
use File::Temp qw/ tempdir /;
my $prog = "reducer";
@ -31,8 +32,9 @@ push @$command, $srcFile;
my $commandStr = "@$command";
print OUT <<ENDTEXT;
#!/usr/bin/perl -w
#!/usr/bin/env perl
use strict;
use warnings;
my \$BAD = 1;
my \$GOOD = 0;
`rm -f $reduceOut`;

View File

@ -1,5 +1,6 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
use strict;
use warnings;
require File::Temp;
use File::Temp ();

View File

@ -1,4 +1,4 @@
#!/usr/dcs/software/supported/bin/perl -w
#!/usr/dcs/software/supported/bin/perl
# LLVM Web Demo script
#
@ -6,6 +6,7 @@ use strict;
use CGI;
use POSIX;
use Mail::Send;
use warnings;
$| = 1;

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
#
# This script tests debugging information generated by a compiler.
# Input arguments

View File

@ -607,7 +607,7 @@ a function that can be used by LLDB's python command code:
::
#!/usr/bin/python
#!/usr/bin/env python
import lldb
import commands
@ -715,7 +715,7 @@ print the process, thread and frame objects if the process stopped:
::
#!/usr/bin/python
#!/usr/bin/env python
import lldb
import os

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
use strict;

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
#
# Program: GenLibDeps.pl
#

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
use Getopt::Std;
$DEBUG = 0;

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
#
# Program: findsym.pl
#
@ -8,6 +8,8 @@
# Syntax: findsym.pl <directory_with_libraries_in_it> <symbol>
#
use warnings;
# Give first option a name.
my $Directory = $ARGV[0];
my $Symbol = $ARGV[1];

View File

@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/env python3
##===- utils/llvmbuild - Build the LLVM project ----------------*-python-*-===##
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
# Wrapper around LLVM tools to generate a native .o from llvm-gxx using an
# LLVM back-end (CBE by default).

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
#
#//===----------------------------------------------------------------------===//

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
#
#//===----------------------------------------------------------------------===//

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
#
#//===----------------------------------------------------------------------===//

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
use strict;
use Pod::LaTeX;