[PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-02-25 Thread Raphael Isemann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa54f160b3a98: Prefer /usr/bin/env xxx over /usr/bin/xxx 
where xxx = perl, python, awk (authored by haampie, committed by teemperor).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95119/new/

https://reviews.llvm.org/D95119

Files:
  clang/test/make_test_dirs.pl
  clang/tools/scan-build/bin/set-xcode-analyzer
  clang/utils/TestUtils/pch-test.pl
  clang/utils/analyzer/reducer.pl
  clang/utils/analyzer/update_plist_test.pl
  clang/www/demo/index.cgi
  debuginfo-tests/llgdb-tests/test_debuginfo.pl
  lldb/docs/use/python-reference.rst
  lldb/scripts/disasm-gdb-remote.pl
  llvm/utils/GenLibDeps.pl
  llvm/utils/codegen-diff
  llvm/utils/findsym.pl
  llvm/utils/llvm-compilers-check
  llvm/utils/llvm-native-gxx
  openmp/runtime/tools/check-execstack.pl
  openmp/runtime/tools/check-instruction-set.pl
  openmp/runtime/tools/message-converter.pl
  polly/lib/External/isl/doc/mypod2latex

Index: polly/lib/External/isl/doc/mypod2latex
===
--- polly/lib/External/isl/doc/mypod2latex
+++ polly/lib/External/isl/doc/mypod2latex
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use strict;
 use Pod::LaTeX;
Index: openmp/runtime/tools/message-converter.pl
===
--- openmp/runtime/tools/message-converter.pl
+++ openmp/runtime/tools/message-converter.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 #//===--===//
Index: openmp/runtime/tools/check-instruction-set.pl
===
--- openmp/runtime/tools/check-instruction-set.pl
+++ openmp/runtime/tools/check-instruction-set.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 #//===--===//
Index: openmp/runtime/tools/check-execstack.pl
===
--- openmp/runtime/tools/check-execstack.pl
+++ openmp/runtime/tools/check-execstack.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 #//===--===//
Index: llvm/utils/llvm-native-gxx
===
--- llvm/utils/llvm-native-gxx
+++ llvm/utils/llvm-native-gxx
@@ -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).
 
Index: llvm/utils/llvm-compilers-check
===
--- llvm/utils/llvm-compilers-check
+++ llvm/utils/llvm-compilers-check
@@ -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.
Index: llvm/utils/findsym.pl
===
--- llvm/utils/findsym.pl
+++ llvm/utils/findsym.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 #
 # Program:  findsym.pl
 #
@@ -8,6 +8,8 @@
 # Syntax:   findsym.pl  
 #
 
+use warnings;
+
 # Give first option a name.
 my $Directory = $ARGV[0];
 my $Symbol = $ARGV[1];
Index: llvm/utils/codegen-diff
===
--- llvm/utils/codegen-diff
+++ llvm/utils/codegen-diff
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use Getopt::Std;
 $DEBUG = 0;
Index: llvm/utils/GenLibDeps.pl
===
--- llvm/utils/GenLibDeps.pl
+++ llvm/utils/GenLibDeps.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 #
 # Program:  GenLibDeps.pl
 #
Index: lldb/scripts/disasm-gdb-remote.pl
===
--- lldb/scripts/disasm-gdb-remote.pl
+++ lldb/scripts/disasm-gdb-remote.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use strict;
 
Index: lldb/docs/use/python-reference.rst
===
--- lldb/docs/use/python-reference.rst
+++ lldb/docs/use/python-reference.rst
@@ -607,7 +607,7 @@
 
 ::
 
-  #!/usr/bin/python
+  #!/usr/bin/env python
 
   import lldb
   import commands
@@ -715,7 +715,7 @@
 
 ::
 
-  #!/usr/bin/python
+  #!/usr/bin/env python
 
   import lldb
   import os
Index: debuginfo-tests/llgdb-tests/test_debuginfo.pl
===
--- debuginfo-tests/llgdb-tests/test_debuginfo.pl
+++ debuginfo-tests/llgdb-tests/test_debuginfo.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 #
 # This script tests debugging information generated by a compiler.
 # Input 

[PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-02-24 Thread Harmen Stoppels via Phabricator via cfe-commits
haampie added a comment.

I don't have commit access, would be great if you could do that for me!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95119/new/

https://reviews.llvm.org/D95119

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-02-24 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere added a comment.

In D95119#2584709 , @haampie wrote:

> Should this be merged?

Do you have commit access? If not I can land this for you.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95119/new/

https://reviews.llvm.org/D95119

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-02-24 Thread Harmen Stoppels via Phabricator via cfe-commits
haampie added a comment.

Should this be merged?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95119/new/

https://reviews.llvm.org/D95119

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-01-28 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.

LGTM, unless @MaskRay has any other concerns.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95119/new/

https://reviews.llvm.org/D95119

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-01-28 Thread Harmen Stoppels via Phabricator via cfe-commits
haampie updated this revision to Diff 319871.
haampie added a comment.
Herald added a subscriber: arphaman.

I dropped the awk bits, since there's no portable way to do it there, and 
replaced all `perl -w` with `perl` and `use warnings`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95119/new/

https://reviews.llvm.org/D95119

Files:
  clang/test/make_test_dirs.pl
  clang/tools/scan-build/bin/set-xcode-analyzer
  clang/utils/TestUtils/pch-test.pl
  clang/utils/analyzer/reducer.pl
  clang/utils/analyzer/update_plist_test.pl
  clang/www/demo/index.cgi
  debuginfo-tests/llgdb-tests/test_debuginfo.pl
  lldb/docs/use/python-reference.rst
  lldb/scripts/disasm-gdb-remote.pl
  llvm/utils/GenLibDeps.pl
  llvm/utils/codegen-diff
  llvm/utils/findsym.pl
  llvm/utils/llvm-compilers-check
  llvm/utils/llvm-native-gxx
  openmp/runtime/tools/check-execstack.pl
  openmp/runtime/tools/check-instruction-set.pl
  openmp/runtime/tools/message-converter.pl
  polly/lib/External/isl/doc/mypod2latex

Index: polly/lib/External/isl/doc/mypod2latex
===
--- polly/lib/External/isl/doc/mypod2latex
+++ polly/lib/External/isl/doc/mypod2latex
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use strict;
 use Pod::LaTeX;
Index: openmp/runtime/tools/message-converter.pl
===
--- openmp/runtime/tools/message-converter.pl
+++ openmp/runtime/tools/message-converter.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 #//===--===//
Index: openmp/runtime/tools/check-instruction-set.pl
===
--- openmp/runtime/tools/check-instruction-set.pl
+++ openmp/runtime/tools/check-instruction-set.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 #//===--===//
Index: openmp/runtime/tools/check-execstack.pl
===
--- openmp/runtime/tools/check-execstack.pl
+++ openmp/runtime/tools/check-execstack.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 #//===--===//
Index: llvm/utils/llvm-native-gxx
===
--- llvm/utils/llvm-native-gxx
+++ llvm/utils/llvm-native-gxx
@@ -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).
 
Index: llvm/utils/llvm-compilers-check
===
--- llvm/utils/llvm-compilers-check
+++ llvm/utils/llvm-compilers-check
@@ -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.
Index: llvm/utils/findsym.pl
===
--- llvm/utils/findsym.pl
+++ llvm/utils/findsym.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 #
 # Program:  findsym.pl
 #
@@ -8,6 +8,8 @@
 # Syntax:   findsym.pl  
 #
 
+use warnings;
+
 # Give first option a name.
 my $Directory = $ARGV[0];
 my $Symbol = $ARGV[1];
Index: llvm/utils/codegen-diff
===
--- llvm/utils/codegen-diff
+++ llvm/utils/codegen-diff
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use Getopt::Std;
 $DEBUG = 0;
Index: llvm/utils/GenLibDeps.pl
===
--- llvm/utils/GenLibDeps.pl
+++ llvm/utils/GenLibDeps.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 #
 # Program:  GenLibDeps.pl
 #
Index: lldb/scripts/disasm-gdb-remote.pl
===
--- lldb/scripts/disasm-gdb-remote.pl
+++ lldb/scripts/disasm-gdb-remote.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use strict;
 
Index: lldb/docs/use/python-reference.rst
===
--- lldb/docs/use/python-reference.rst
+++ lldb/docs/use/python-reference.rst
@@ -595,7 +595,7 @@
 
 ::
 
-  #!/usr/bin/python
+  #!/usr/bin/env python
 
   import lldb
   import commands
@@ -703,7 +703,7 @@
 
 ::
 
-  #!/usr/bin/python
+  #!/usr/bin/env python
 
   import lldb
   import os
Index: debuginfo-tests/llgdb-tests/test_debuginfo.pl
===
--- debuginfo-tests/llgdb-tests/test_debuginfo.pl
+++ debuginfo-tests/llgdb-tests/test_debuginfo.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 #
 # This script tests debugging information generated by a compiler.
 # Input arguments
Index: 

[PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-01-28 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere requested changes to this revision.
JDevlieghere added a comment.
This revision now requires changes to proceed.

Oops, didn't mean to accept.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95119/new/

https://reviews.llvm.org/D95119

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-01-28 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.

In D95119#2525925 , @MaskRay wrote:

> `#!/usr/bin/env perl -w` (2 arguments) unfortunately does not work on Linux 
> and many other systems.

Not sure if there's a similar thing for `awk`, but I think `use warnings` is 
preferred nowadays over `perl -w`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95119/new/

https://reviews.llvm.org/D95119

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-01-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment.

Several `llvm/utils/` scripts can probably just be removed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95119/new/

https://reviews.llvm.org/D95119

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-01-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment.

`#!/usr/bin/env perl -w` (2 arguments) unfortunately does not work on Linux and 
many other systems.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95119/new/

https://reviews.llvm.org/D95119

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-01-27 Thread Harmen Stoppels via Phabricator via cfe-commits
haampie added a comment.

@JDevlieghere, would you care to review? This is another instance of moving 
away from system binaries to whatever the user / package manager wants the 
build to use.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95119/new/

https://reviews.llvm.org/D95119

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-01-21 Thread Harmen Stoppels via Phabricator via cfe-commits
haampie created this revision.
haampie added a reviewer: JDevlieghere.
Herald added a reviewer: bollu.
haampie requested review of this revision.
Herald added projects: clang, Sanitizers, LLDB, OpenMP, LLVM.
Herald added subscribers: llvm-commits, openmp-commits, lldb-commits, 
Sanitizers, cfe-commits.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95119

Files:
  clang/test/make_test_dirs.pl
  clang/tools/scan-build/bin/set-xcode-analyzer
  clang/utils/TestUtils/pch-test.pl
  clang/utils/analyzer/reducer.pl
  clang/utils/analyzer/update_plist_test.pl
  compiler-rt/utils/generate_netbsd_ioctls.awk
  compiler-rt/utils/generate_netbsd_syscalls.awk
  debuginfo-tests/llgdb-tests/test_debuginfo.pl
  lldb/docs/use/python-reference.rst
  lldb/scripts/disasm-gdb-remote.pl
  llvm/utils/GenLibDeps.pl
  llvm/utils/codegen-diff
  llvm/utils/findsym.pl
  llvm/utils/llvm-compilers-check
  llvm/utils/llvm-native-gxx
  openmp/runtime/tools/check-execstack.pl
  openmp/runtime/tools/check-instruction-set.pl
  openmp/runtime/tools/message-converter.pl
  polly/lib/External/isl/doc/mypod2latex

Index: polly/lib/External/isl/doc/mypod2latex
===
--- polly/lib/External/isl/doc/mypod2latex
+++ polly/lib/External/isl/doc/mypod2latex
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use strict;
 use Pod::LaTeX;
Index: openmp/runtime/tools/message-converter.pl
===
--- openmp/runtime/tools/message-converter.pl
+++ openmp/runtime/tools/message-converter.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 #//===--===//
Index: openmp/runtime/tools/check-instruction-set.pl
===
--- openmp/runtime/tools/check-instruction-set.pl
+++ openmp/runtime/tools/check-instruction-set.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 #//===--===//
Index: openmp/runtime/tools/check-execstack.pl
===
--- openmp/runtime/tools/check-execstack.pl
+++ openmp/runtime/tools/check-execstack.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 #//===--===//
Index: llvm/utils/llvm-native-gxx
===
--- llvm/utils/llvm-native-gxx
+++ llvm/utils/llvm-native-gxx
@@ -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).
 
Index: llvm/utils/llvm-compilers-check
===
--- llvm/utils/llvm-compilers-check
+++ llvm/utils/llvm-compilers-check
@@ -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.
Index: llvm/utils/findsym.pl
===
--- llvm/utils/findsym.pl
+++ llvm/utils/findsym.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl -w
 #
 # Program:  findsym.pl
 #
Index: llvm/utils/codegen-diff
===
--- llvm/utils/codegen-diff
+++ llvm/utils/codegen-diff
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use Getopt::Std;
 $DEBUG = 0;
Index: llvm/utils/GenLibDeps.pl
===
--- llvm/utils/GenLibDeps.pl
+++ llvm/utils/GenLibDeps.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl -w
 #
 # Program:  GenLibDeps.pl
 #
Index: lldb/scripts/disasm-gdb-remote.pl
===
--- lldb/scripts/disasm-gdb-remote.pl
+++ lldb/scripts/disasm-gdb-remote.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use strict;
 
Index: lldb/docs/use/python-reference.rst
===
--- lldb/docs/use/python-reference.rst
+++ lldb/docs/use/python-reference.rst
@@ -595,7 +595,7 @@
 
 ::
 
-  #!/usr/bin/python
+  #!/usr/bin/env python
 
   import lldb
   import commands
@@ -703,7 +703,7 @@
 
 ::
 
-  #!/usr/bin/python
+  #!/usr/bin/env python
 
   import lldb
   import os
Index: debuginfo-tests/llgdb-tests/test_debuginfo.pl
===
--- debuginfo-tests/llgdb-tests/test_debuginfo.pl
+++ debuginfo-tests/llgdb-tests/test_debuginfo.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 #
 # This script tests